summaryrefslogtreecommitdiff
path: root/db/seeds.rb
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-28 00:04:47 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-28 00:04:47 -0400
commit6b66877bda4c0e4a33bb3109304636d5ada85904 (patch)
tree7065307802fec8452afc89c8a7b445fd2ceca772 /db/seeds.rb
parent33fcf6de9feaaa6f90dfe5082e08d280c930dae1 (diff)
parent7a4832621f1a0bb2e4b86ee9f879a73df0188a3e (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'db/seeds.rb')
-rw-r--r--db/seeds.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/db/seeds.rb b/db/seeds.rb
index c37dcf7..ea0338d 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -85,7 +85,7 @@ if Rails.env.development?
#chess
chess_tourn = Tournament.create(game_id: 2, status: 0, name: "Chess Seed", min_players_per_team: 1, max_players_per_team: 1, min_teams_per_match: 2,
- max_teams_per_match: 2, sampling_method: nil)
+ max_teams_per_match: 2, sampling_method: "manual")
chess_tourn.hosts.push(davis)
chess_tourn.join(davis)
@@ -93,15 +93,16 @@ if Rails.env.development?
#Rock Paper Scissors
rps = Tournament.create(game_id: 4, status: 0, name: "Rock, Paper, Scissors Seed", min_players_per_team: 1, max_players_per_team: 3, min_teams_per_match: 2,
- max_teams_per_match: 2, sampling_method: nil)
+ max_teams_per_match: 2, sampling_method: "manual")
+ rps.stages.create(scheduling_method: "elimination" , seeding_method: "random_seeding")
rps.hosts.push(davis)
rps.join(davis)
rps.join(foy)
rps.join(guntas)
tourn5 = Tournament.create(game_id: 1, status: 0, name: "5 Teams, 2 Teams Per Match", min_players_per_team: 1, max_players_per_team: 1, min_teams_per_match: 2,
- max_teams_per_match: 2, sampling_method: nil)
+ max_teams_per_match: 2, sampling_method: "manual")
for i in 0..9
if i == 0
@@ -109,10 +110,11 @@ if Rails.env.development?
end
tourn5.join(players_for_league[i])
end
+ tourn5.stages.create(scheduling_method: "elimination" , seeding_method: "random_seeding")
tourn5.join(players_for_league[9])
tourn6 = Tournament.create(game_id: 1, status: 0, name: "3 teams per match", min_players_per_team: 1, max_players_per_team: 1, min_teams_per_match: 3,
- max_teams_per_match: 3, sampling_method: nil)
+ max_teams_per_match: 3, sampling_method: "manual")
for i in 0..9
if i == 0
@@ -120,6 +122,7 @@ if Rails.env.development?
end
tourn6.join(players_for_league[i])
end
+ tourn6.stages.create(scheduling_method: "elimination" , seeding_method: "random_seeding")
tourn6.join(players_for_league[9])
tourn6.join(davis)
tourn6.join(foy)
@@ -138,7 +141,13 @@ if Rails.env.development?
hash4 = {:username => "NalfeinX", :id => id}
hash5 = {:username => "GTBPhoenix", :id => id}
hash6 = {:username => , :id => id}
- hash7 = {:username => username, :id => id}
+ hash7 = {:username => username, :id => id}ages.first.create_matchesages.first.create_matches
+end
+if success
+format.html { redirect_to @tournament,
+end
+if success
+format.html { redirect_to @tournament,
hash8 = {:username => username, :id => id}
hash9 = {:username => username, :id => id}
hash10 = {:username => username, :id => id}