Fetching remote data from the REST service works, basic drawing too.

That's a first prototype.
This commit is contained in:
Manuel Friedli 2023-04-15 19:37:50 +02:00
parent aa8ddde965
commit fee75ff8a7
8 changed files with 190 additions and 3696 deletions

View file

@ -2,9 +2,14 @@ import React from 'react';
import Row from "./Row";
export default function Maze({labyrinth}) {
export default function Maze({labyrinth, showSolution = false}) {
if (!labyrinth.grid) {
return <div>No valid maze.</div>
}
const maze = labyrinth.grid.map((row, rowIdx) => <Row key={"r" + rowIdx} spec={row}
index={rowIdx}/>);
index={rowIdx}
showSolution={showSolution}/>);
return (
<div className={"maze"}>
{maze}