mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
Fix
This commit is contained in:
@@ -86,12 +86,10 @@ module.exports = class MinesweeperCommand extends Command {
|
|||||||
|
|
||||||
displayBoard(board, mask) {
|
displayBoard(board, mask) {
|
||||||
let str = '';
|
let str = '';
|
||||||
str += '⬛⬛';
|
str += '⬛';
|
||||||
str += nums.slice(0, board.length).join('');
|
str += nums.slice(0, board.length).join('');
|
||||||
str += `\n${'⬛'.repeat(board.length + 2)}\n`;
|
|
||||||
for (let i = 0; i < board.length; i++) {
|
for (let i = 0; i < board.length; i++) {
|
||||||
str += nums[i];
|
str += nums[i];
|
||||||
str += '⬛';
|
|
||||||
board[i].forEach((item, j) => {
|
board[i].forEach((item, j) => {
|
||||||
if (mask[i][j]) {
|
if (mask[i][j]) {
|
||||||
if (item === '*') {
|
if (item === '*') {
|
||||||
|
|||||||
Reference in New Issue
Block a user