23 lines
529 B
JavaScript
23 lines
529 B
JavaScript
/**
|
|
* The state of the board.
|
|
*
|
|
* @type {Board}
|
|
*/
|
|
export const State = /** @type {Board} */ (
|
|
Array(6).fill("").map(
|
|
() => (Array(7).fill("").map(
|
|
() =>
|
|
{
|
|
let id = Math.floor(Math.random() * 3);
|
|
|
|
switch (id)
|
|
{
|
|
case 1:
|
|
return "r";
|
|
case 2:
|
|
return "b";
|
|
default:
|
|
return "";
|
|
}
|
|
})))
|
|
);
|