-
Notifications
You must be signed in to change notification settings - Fork 0
/
dice.rb
76 lines (64 loc) · 2.88 KB
/
dice.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
require "pry"
require "colorize"
def seperator
puts
end
class Dice
def initialize(player)
@player = player
@cost = 0
@win_amount =500
@winnings = 500
end
def welcome
@player.bankroll.wallet >= @cost
end
def start_game
new_balance = @player.bankroll.minus_from_wallet(@cost)
puts "YOUR BALANCE IS: $#{new_balance} "
seperator
seperator
choice
end
def choice
seperator
seperator
puts "............................................................................................................"
puts " WELCOME TO THE ATM, PLEASE PRESS 1 THEN ENTER. "
puts "............................................................................................................"
puts " | Add funds | "
seperator
puts " 1) $500 "
puts "............................................................................................................"
seperator
puts "............................................................................................................"
seperator
seperator
@choice = gets.to_i
case @choice
when 1
# system("clear")
puts "NEW AMOUNT IN WALLET: $#{@player.bankroll.add_to_wallet(@winnings)}"
return
else
puts " YOURE NOT REALLY GOOD AT THIS, ARENT YOU? (hint: pick a number) "
welcome
end
choice
return
end
end
# puts "......................................................................................"
# # puts "......................................................................................"
# puts ".................... ..... .... ....................."
# puts ".......................... ........... .............. ..........................."
# puts ".......................... ........... .......... ..........................."
# puts ".......................... ........... .............. ..........................."
# puts ".......................... ........... ......... ..........................."
# puts "......................................................................................"
# puts "......................................................................................"
# seperator
# puts " A game of Soldiers and Kings. As in War, you either win, or you lose. "
# puts " $1,500 per play "
# seperator
# seperator