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
Wip #5
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5 +/- ##
==========================================
- Coverage 99.69% 98.28% -1.42%
==========================================
Files 22 24 +2
Lines 649 582 -67
==========================================
- Hits 647 572 -75
- Misses 2 10 +8
Continue to review full report at Codecov.
|
@@ -3,5 +3,56 @@ | |||
|
|||
# TicTacToe (Ruby Edtion) | |||
|
|||
The venerable game of TicTacToe, written in Ruby. | |||
The venerable game of TicTacToe, written in Ruby, otherwise known as noughts and crosses. |
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.
TIL
|
||
## Playing | ||
|
||
Make sure that the game's entry point is executable: |
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.
Git does check in the files permissions...so I think you can do some git magic to make sure this file is executable in VC.
|
||
## Testing | ||
|
||
The tests can be run with `bundler`: |
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.
It's not that bundler is running it, it's that it's just a way to make sure you're using the executable of that thing found in that app's bundle. https://stackoverflow.com/questions/6588674/what-does-bundle-exec-rake-mean
Like global vs local installs....so it's rspec
def get_input(valid_input, error_message = '', prompt = '') | ||
begin | ||
input = nil |
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.
This feels like it's doing more than just get input. It's validating/displaying errors as well...Hmm.
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.
Would it be better named as something like get_validated_input
? Or is the function doing too much? I figured that this set of actions is repeated several times in various places, so needs to be encapsulated in a method somewhere.
A bunch of refactoring and general tidying up. The code should be cleaner and better organised.