-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseed.rb
72 lines (65 loc) · 1.7 KB
/
seed.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
class Tournament
attr_accessor :team1, :team2, :team3, :team4, :team5, :team6, :team7, :team8, :team9
def initialize(team1, team2, team3, team4, team5, team6, team7, team8, team9)
@team1 = team1
@team2 = team2
@team3 = team3
@team4 = team4
@team5 = team5
@team6 = team6
@team7 = team7
@team8 = team8
@team9 = team9
end
def list_seeds
puts
puts "Here are the teams you've entered:"
puts "(1) " + @team1
puts "(2) " + @team2
puts "(3) " + @team3
puts "(4) " + @team4
puts "(5) " + @team5
puts "(6) " + @team6
puts "(7) " + @team7
puts "(8) " + @team8
puts "(9) " + @team9
end
def set_matchup
puts
puts "ROUND 1:"
puts "(1) " + @team1 + " have a 'bye'."
puts "(2) " + @team2 + " v " + "(9) " + @team9
puts "(3) " + @team3 + " v " + "(8) " + @team8
puts "(4) " + @team4 + " v " + "(7) " + @team7
puts "(5) " + @team5 + " v " + "(6) " + @team6
end
end
while true
puts "Welcome to the NBA Tournament Generator.\nEnter nine Western Conference teams:"
puts "Team 1:"
team1 = gets.chomp.capitalize
puts "Team 2:"
team2 = gets.chomp.capitalize
puts "Team 3:"
team3 = gets.chomp.capitalize
puts "Team 4:"
team4 = gets.chomp.capitalize
puts "Team 5:"
team5 = gets.chomp.capitalize
puts "Team 6:"
team6 = gets.chomp.capitalize
puts "Team 7:"
team7 = gets.chomp.capitalize
puts "Team 8:"
team8 = gets.chomp.capitalize
puts "Team 9:"
team9 = gets.chomp.capitalize
first_round = Tournament.new(team1, team2, team3, team4, team5, team6, team7, team8, team9)
first_round.list_seeds()
first_round.set_matchup()
puts
puts "Do you agree with this matchup? Yes or No?"
agree = gets.chomp.capitalize
break if agree == "Yes" || agree == "Y"
end
puts "LET'S BALL!!!!"