Fetching remote data from the REST service works, basic drawing too.
That's a first prototype.
This commit is contained in:
parent
aa8ddde965
commit
fee75ff8a7
8 changed files with 190 additions and 3696 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue