Skip to content

Commit

Permalink
style: better display in shell
Browse files Browse the repository at this point in the history
  • Loading branch information
arthaud-proust committed Sep 17, 2023
1 parent acd5673 commit ba5eb0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion game.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const FRAME_INTERVAL = 1500;

function matrixToString(matrix) {
return matrix.map(row =>
row.map(ceil => ceil === ALIVE ? "■" : "").join(' ')
row.map(ceil => ceil === ALIVE ? "■" : " ").join(' ')
).join("\n")
}

Expand Down
2 changes: 1 addition & 1 deletion game.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('matToString', () => {
[DEAD, DEAD, ALIVE],
]

expect(matrixToString(matrix)).toBe("□\n□ □ □\n□ □ ■");
expect(matrixToString(matrix)).toBe(" \n \n ■");
})
});

Expand Down

0 comments on commit ba5eb0a

Please sign in to comment.