From 4a744b0425333284979ef76206c457ff7dcf5907 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 1 Jun 2020 07:25:53 -0700 Subject: [PATCH] tictactoe: Use empty strings instead of null objects for empty squares So that the data in the board array is always of a consistent type. --- tictactoe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tictactoe.js b/tictactoe.js index 1f559bd..f9b357b 100644 --- a/tictactoe.js +++ b/tictactoe.js @@ -7,7 +7,7 @@ class TicTacToe extends Game { constructor(id) { super(id); this.moves = []; - this.board = Array(9).fill(null); + this.board = Array(9).fill(""); } /* Returns Boolean indicating whether move was legal and added. */ -- 2.43.0