Séparé les classes dans des fichiers
This commit is contained in:
1 parent
87e89775cc
commit
3fcc1b5318
3 files changed
+43
-20
No files matched your search
@@ -1,33 +1,20 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require_relative "lib/game"
|
||||
require_relative "lib/terminal_ui"
|
||||
|
||||
# Instance du jeu
|
||||
game = Game.new("Alice", "Bob")
|
||||
ui = TerminalUI.new
|
||||
|
||||
game.determine_dealer
|
||||
puts "The dealer is #{game.dealer.name}."
|
||||
game.deal
|
||||
puts "#{game.player1.name} has #{game.player1.hand.count} cards."
|
||||
puts "#{game.player2.name} has #{game.player2.hand.count} cards."
|
||||
puts "The stock has #{game.stock.length} cards."
|
||||
puts
|
||||
ui.debug_game(game)
|
||||
|
||||
game.change_dealer
|
||||
puts "The dealer is #{game.dealer.name}."
|
||||
game.deal
|
||||
puts "#{game.player1.name} has #{game.player1.hand.count} cards."
|
||||
puts "#{game.player2.name} has #{game.player2.hand.count} cards."
|
||||
puts "The stock has #{game.stock.length} cards."
|
||||
ui.debug_game(game)
|
||||
|
||||
# Mise en place du jeu
|
||||
# puts "#{game.player1.name} has :"
|
||||
# puts
|
||||
# puts "#{game.player2.name} has :"
|
||||
# puts game.player2.hand
|
||||
# puts
|
||||
# puts "Upcard is #{game.upcard} so the trump suit is #{game.trump_suit}."
|
||||
# puts
|
||||
# puts "The stock has #{game.stock.length} cards :"
|
||||
# puts
|
||||
# puts game.stock
|
||||
# card = ui.choose_card(game.player1)
|
||||
# puts "#{game.player1.name} chose #{card}."
|
||||
|
||||
Reference in new issue
Block a user