Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Conversation

sentayhuJo
Copy link

@sentayhuJo
Copy link
Author

https://rawgit.com/sentayhuJo/javascript-module2/ticTacBranch/tictactoe-game/index.html

I modified the code , i think its bug free, check it out and give me comment ,

Thanks

flag=1;
markWinner(diagonal2ClassName,flag);
return diagonals2[0] + ' is the winner.';
}else if (moves>8)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should do this check first, along with moves < 5 so you don't run the logic above unnecessarily.

*Style the matching line to RED
*@return {<string>}
*/
for(var row=0;row<3;row++){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if you guys are allowed to use Array.map() or Array.filter() for this assignment, but they would both make this markup much more easy to follow. Even if you can't use them, you should rewrite this with them and see what you come up with.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants