Created
March 3, 2017 19:10
-
-
Save itzsaga/9ceefd702914f382ad64395fe172bf31 to your computer and use it in GitHub Desktop.
A problem trying to figure out how to get my ternary to pass tests
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
| # This is passing tests | |
| if draw?(board) | |
| puts "Cats Game!" | |
| else | |
| puts "Congratulations #{winner(board)}!" | |
| end | |
| # This is not passing tests | |
| draw?(board) ? puts "Cats Game!" : puts "Congratulations #{winner(board)}!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment