mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 23:26:40 -08:00
21 lines
349 B
Ruby
21 lines
349 B
Ruby
require_relative "./game.rb"
|
|
|
|
def intro
|
|
puts "Welcome to Blackjack"
|
|
end
|
|
|
|
def ask_for_players_count
|
|
puts "How many of you want to join the table?"
|
|
return gets.to_i
|
|
end
|
|
|
|
begin
|
|
intro
|
|
players_count = ask_for_players_count
|
|
Game.new(players_count).start
|
|
rescue SystemExit, Interrupt
|
|
exit
|
|
rescue => exception
|
|
p exception
|
|
end
|