From 6290cef3fef59965cc330a7840f2bcc8bc13fb28 Mon Sep 17 00:00:00 2001 From: thibaud-leclere Date: Sat, 28 Mar 2026 13:19:44 +0100 Subject: [PATCH] feat: integrate GameRow into GameGrid --- assets/react/controllers/GameGrid.jsx | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/assets/react/controllers/GameGrid.jsx b/assets/react/controllers/GameGrid.jsx index 2981c9a..73cb81a 100644 --- a/assets/react/controllers/GameGrid.jsx +++ b/assets/react/controllers/GameGrid.jsx @@ -1,25 +1,18 @@ import React from 'react'; +import GameRow from './GameRow'; export default function GameGrid({ grid, width, middle }) { return ( {grid.map((row, rowIndex) => ( - - {Array.from({ length: width + 1 }, (_, colIndex) => { - const start = middle - row.pos; - const charIndex = colIndex - start; - const name = row.actorName; - const isInRange = charIndex >= 0 && charIndex < name.length; - const isHighlighted = charIndex === row.pos; - - return ( - - ); - })} - + ))}
- {isInRange ? name[charIndex].toUpperCase() : ''} -