Public
Edited
Jan 10, 2023
Insert cell
Insert cell
Insert cell
Insert cell
function generateNextMoves(boardList) {
const m = getNextTurn(boardList);
const availableIndexList = availablePositions(boardList);
}
Insert cell
Insert cell
function isWinBoard(board) {
const winningLines = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[1, 4, 7],
[2, 5, 8],
[3, 6, 9],
[1, 5, 9],
[3, 5, 7]
];
}
Insert cell
function allMatch(cells) {
}
Insert cell
function pickCells(board, positions) {
return positions.map((i) => board[i - 1]);
}
Insert cell
Insert cell
Insert cell
Insert cell
mark = ({ x: "x", o: "o", empty: '·' })
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more