class Bowling::Ball
Attributes
ball_position[RW]
frame[RW]
knocked_pins[RW]
score[RW]
Public Class Methods
Public Instance Methods
first_ball?()
click to toggle source
# File lib/bowling/ball.rb, line 45 def first_ball? ball_position == 0 end
knock_over( amount )
click to toggle source
next_ball()
click to toggle source
# File lib/bowling/ball.rb, line 24 def next_ball if strike? frame.next_frame.first_ball else frame.balls[ball_position + 1] end end
perfect?()
click to toggle source
# File lib/bowling/ball.rb, line 40 def perfect? knocked_pins == 10 end