import React from 'react';
import GameRow from './GameRow';

export default function GameGrid({ grid, width, middle }) {
    return (
        <table id="actors">
            <tbody>
                {grid.map((row, rowIndex) => (
                    <GameRow
                        key={rowIndex}
                        actorName={row.actorName}
                        pos={row.pos}
                        colStart={middle - row.pos}
                        totalWidth={width}
                    />
                ))}
            </tbody>
        </table>
    );
}
