Reference · Mazes, arrows and mixed boards
restartArrowsfunction
Restore every native arrow and the original hearts, clearing mistakes and removals.
Import it
import { restartArrows } from "@johnmorrisdotca/meikyuu";
Definition
function restartArrows(game: ArrowGame): ArrowGame
Parameters
| Name | Type | Description |
|---|---|---|
game | ArrowGame | The current immutable native game state. |
Returns
ArrowGame
Restore every native arrow and the original hearts, clearing mistakes and removals.
Examples
import type { ArrowRecipe } from "@johnmorrisdotca/meikyuu";
import { makeArrows, newArrowGame, restartArrows } from "@johnmorrisdotca/meikyuu";
const arrowRecipe: ArrowRecipe = {shape:"square",w:5,h:5,longest:3,seed:42};
const arrows = makeArrows(arrowRecipe);
const arrowGame = newArrowGame(arrows);
console.log(restartArrows(arrowGame).status);playingWhat it prints (run when this page was built)