mirror of
https://github.com/danbee/scoreboard
synced 2025-03-04 08:59:11 +00:00
Don't swap the serve
The players already swap ends so this is unnecessary.
This commit is contained in:
parent
8659b2bd85
commit
2877b08a63
11
lib/match.rb
11
lib/match.rb
@ -15,11 +15,9 @@ class Match
|
||||
players[colour].score.increment
|
||||
if @one.has_beaten(@two)
|
||||
reset_scores
|
||||
swap_initial_serve
|
||||
@one.games.increment
|
||||
elsif @two.has_beaten(@one)
|
||||
reset_scores
|
||||
swap_initial_serve
|
||||
@two.games.increment
|
||||
end
|
||||
set_serve
|
||||
@ -42,15 +40,6 @@ class Match
|
||||
end
|
||||
end
|
||||
|
||||
def swap_initial_serve
|
||||
case self.initial_serve.value
|
||||
when 'red'
|
||||
set_initial_serve(:blue)
|
||||
when 'blue'
|
||||
set_initial_serve(:red)
|
||||
end
|
||||
end
|
||||
|
||||
def undo_point(colour)
|
||||
player = players[colour]
|
||||
if player.score.value > 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user