Add RuboCop and Helix project config

This commit is contained in:
julien committed 2026-10-10 14:30:45 +02:00
1 parent 5feefbcd54
commit 7b33d9a8ef
14 files changed
+28 -105

No files matched your search

+4 -5
View File
@@ -1,17 +1,16 @@
# Gère l'affichage et les saisies dans le terminal.
class TerminalUI
# Demande au joueur de choisir une carte et la retourne.
def choose_card(player)
player.hand.each_with_index do |card, index|
puts "#{index + 1}. #{card}"
end
print "Choose a card: "
print 'Choose a card: '
choice = gets.chomp.to_i
until choice.between?(1, player.hand.length)
print "Invalid choice. Choose a card: "
print 'Invalid choice. Choose a card: '
choice = gets.chomp.to_i
end
@@ -25,7 +24,7 @@ class TerminalUI
# Affiche un avertissement si le coup joué ne respecte pas les règles.
def display_wrong_card
puts "You cannot play this card."
puts 'You cannot play this card.'
end
# Affiche le joueur ayant remporté le pli.
@@ -52,7 +51,7 @@ class TerminalUI
puts "Trump suit: #{game.trump_suit}"
puts
puts "Stock:"
puts 'Stock:'
puts game.stock.length
puts
end