Commencé à implémenter les plis
This commit is contained in:
1 parent
5307ef055a
commit
3cdcec55b2
3 files changed
+17
-6
No files matched your search
+3
-2
@@ -64,6 +64,9 @@ class Game
|
||||
lead_card = @ui.choose_card(player1)
|
||||
follow_card = @ui.choose_card(player2)
|
||||
|
||||
player1.play
|
||||
player2.play
|
||||
|
||||
if lead_card.suit != follow_card.suit && follow_card.suit != @trump_suit
|
||||
@trick_winner = @player1
|
||||
elsif lead_card.suit == follow_card.suit && lead_card.strength > follow_card.strength
|
||||
@@ -72,9 +75,7 @@ class Game
|
||||
@trick_winner = @player2
|
||||
end
|
||||
|
||||
if @trick_winner
|
||||
@trick_winner.add_point
|
||||
end
|
||||
end
|
||||
|
||||
def play
|
||||
|
||||
Reference in new issue
Block a user