Skip to content
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

Merged
merged 19 commits into from Nov 6, 2018
Merged

Wip #5

merged 19 commits into from Nov 6, 2018

Conversation

junglie85
Copy link
Collaborator

A bunch of refactoring and general tidying up. The code should be cleaner and better organised.

@codecov-io
Copy link

codecov-io commented Nov 5, 2018

Codecov Report

Merging #5 into master will decrease coverage by 1.41%.
The diff coverage is 98.09%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
spec/game/hard_player_spec.rb 100% <100%> (ø) ⬆️
lib/game/easy_player.rb 100% <100%> (ø) ⬆️
spec/game/game_spec.rb 100% <100%> (ø) ⬆️
lib/game/human_player.rb 100% <100%> (ø) ⬆️
lib/game/game_engine.rb 100% <100%> (ø)
spec/console_client/mock_game_ui.rb 100% <100%> (ø)
spec/console_client/text_provider_spec.rb 100% <100%> (ø) ⬆️
lib/console_client/text_provider.rb 100% <100%> (ø) ⬆️
lib/game/player.rb 100% <100%> (ø) ⬆️
lib/game/game.rb 100% <100%> (ø) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7510e9...016dbc1. Read the comment docs.

@@ -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.
Copy link

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:
Copy link

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`:
Copy link

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
Copy link

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.

Copy link
Collaborator Author

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.

@junglie85 junglie85 merged commit 037012d into master Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants