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

Solmaz's partially completed bowling challenge #398

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bookloversolmaz
Copy link

No description provided.

@bookloversolmaz bookloversolmaz changed the title Solmaz's partial completed bowling challenge Solmaz's partially completed bowling challenge Apr 24, 2023
Copy link

@tomcarmichael tomcarmichael left a comment

Choose a reason for hiding this comment

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

Looks like a really good start and I i like the approach to calculating strikes and spares with FX notation

expect(score.score_count(0)).to eq(0)
end

context "players score less than 10 in single frame" do

Choose a reason for hiding this comment

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

nice use of context to make the test readable as documentation

context "players score less than 10 in single frame" do
it "adds the score 3 to counter which is at 0" do
score = Score.new
score.score_count(3)

Choose a reason for hiding this comment

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

perhaps line 13 is not necessary here

score = Score.new
score.score_count(5)
score.score_count(3)
expect(score.score_count(8)).to eq (8)

Choose a reason for hiding this comment

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

could perhaps create a new method with no args to just read the score for testing as this may be a self fulfilling test at the moment

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.

2 participants