-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JLN js-tic-tac-toe #19
base: jln/master
Are you sure you want to change the base?
Conversation
self.incrementScore(4, player); | ||
} else if (track_space.substring(2,4) == "c3") { | ||
self.incrementScore(5, player); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clean up these else if statements, you could use JavaScript's switch statement. It's very similar to Ruby's case statement!
Your code was very clean and easy to follow, so there was not much for me to comment on! I liked your logic for gameplay. You'll find that there are a lot of similar functions in Javascript and Ruby, like the switch case statement, that you can use to clean up the code a bit. Really awesome job for your first Javascript project! |
Completed all project requirements and some optional requirements:
Additional work not yet completed: