# Copyright 2006 Michael Lewis # Distributed under the terms of the GNU General Public License v2 require "Player" class UserPlayer < Player def initialize( money = 500 ) super( money ) @verbose = true table.setVerbose end # "h" = hit # "s" = stand # "d" = double # "l" = split def move( table ) puts "Dealer Card: " + table.showing_card.to_s puts "Your Hand: " + hand.to_s puts "(h)it -- (s)tand -- (d)ouble -- sp(l)it" gets[0,1] end def place_bet @hands.clear puts "Bet please?" bet = gets.to_f @hands << PlayerHand.new( bet ) @bet_total += bet @money -= bet end end