Skip to content

Commit

Permalink
nulled moves array after starting new game
Browse files Browse the repository at this point in the history
  • Loading branch information
pavliukpetro committed Jul 2, 2016
1 parent 8d996ce commit 2724ffa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
var cells;
var message = document.querySelector('.message');
var move;
var movesArr = [[],[],[]]
var movesArr = [[],[],[]];

newGameBtn.addEventListener("click", function(){
var i;
move = 'x';
movesArr = [[],[],[]];
cells = document.querySelectorAll('.cell');
message.innerHTML = 'X turn';
message.classList.remove('winx');
Expand Down

0 comments on commit 2724ffa

Please sign in to comment.