whiteboarding details and completed mark on the board and alternate b…#5
Open
melonunderground wants to merge 3 commits intogh-pagesfrom
Open
whiteboarding details and completed mark on the board and alternate b…#5melonunderground wants to merge 3 commits intogh-pagesfrom
melonunderground wants to merge 3 commits intogh-pagesfrom
Conversation
…etween players. stuck on win functions
stephsingler
reviewed
May 4, 2018
03week/ticTacToe.js
Outdated
| (board[1][0] === playerTurn && board[1][1] === playerTurn && board[1][2] === playerTurn) || | ||
| (board[2][0] === playerTurn && board[2][1] === playerTurn && board[2][2] === playerTurn)) { | ||
| return true; | ||
| } |
There was a problem hiding this comment.
look up an array method that checks if EVERY item in the array is the same. this will cut down your code.
stephsingler
reviewed
May 4, 2018
03week/ticTacToe.js
Outdated
| (board[0][1] === playerTurn && board[1][1] === playerTurn && board[2][1] === playerTurn) || | ||
| (board[0][2] === playerTurn && board[1][2] === playerTurn && board[2][2] === playerTurn)) { | ||
| return true; | ||
| } |
There was a problem hiding this comment.
same as above. you can refactor with a method
stephsingler
reviewed
May 4, 2018
03week/ticTacToe.js
Outdated
| if ((board[0][0] === playerTurn && board[1][1] === playerTurn && board[2][2] === PlayerTurn) || | ||
| (board[0][2] === playerTurn && board[1][1] === playerTurn && board[2][0] === playerTurn)) { | ||
| return true; | ||
| } |
stephsingler
suggested changes
May 4, 2018
stephsingler
left a comment
There was a problem hiding this comment.
Great start! Since you're ahead you should try and look up a method that will cut down you having to hard code every single instance of the board
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…etween players. stuck on win functions
Checkpoint Rubric
This is the rubric that your instructor will use to grade your checkpoints. Please do not edit.
Checkpoint 1
Checkpoint 2
Checkpoint 3