Dev Vlog #10 β Added Minesweeper! π£
Hey everyone, welcome back to another WebOS update!
This time I made another classic game, Minesweeper.
Some lines of code to make the mines and tile revealing work, like:
const revealCell = (row: number, col: number) => {
if (board[row][col].isMine) {
setGameStatus('lost');
return;
}
const newBoard = board.map((r) => [...r]);
newBoard[row][col].isRevealed = true;
setBoard(newBoard);
};
The game now has tile movement, merging tiles, and adding new tiles after each move.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.