From b5cc531c9c5d2f7ab9066bbe732dad730cc063d9 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Thu, 24 Apr 2014 19:22:27 -0400 Subject: added another tournament with 3 teams per match and 1 player per team for tomer to test --- db/seeds.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'db') diff --git a/db/seeds.rb b/db/seeds.rb index 61cf44a..78c8ea0 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -123,4 +123,21 @@ if Rails.env.development? end 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, set_rounds: 1, randomized_teams: true, sampling_method: nil) + + for i in 0..9 + if i == 0 + tourn6.hosts.push(players_for_league[i]) + end + tourn6.join(players_for_league[i]) + end + tourn6.join(players_for_league[9]) + tourn6.join(davis) + tourn6.join(foy) + tourn6.join(guntas) + tourn6.join(luke) + tourn6.join(marco) + + end -- cgit v1.2.3-2-g168b From 86992e85220e9a42ed498497ca733e39fb7266fc Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Thu, 24 Apr 2014 21:46:10 -0400 Subject: seeds and elimination small changes --- db/seeds.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'db') diff --git a/db/seeds.rb b/db/seeds.rb index 78c8ea0..7628efe 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -138,6 +138,25 @@ if Rails.env.development? tourn6.join(guntas) tourn6.join(luke) tourn6.join(marco) +=begin + hash1 = {:username => "TeslasMind", :id => id} + hash2 = {:username => "Alpha142", :id => id} + hash3 = {:username => "ImFromNasa", :id => id} + hash4 = {:username => "NalfeinX", :id => id} + hash5 = {:username => "GTBPhoenix", :id => id} + hash6 = {:username => , :id => id} + hash7 = {:username => username, :id => id} + hash8 = {:username => username, :id => id} + hash9 = {:username => username, :id => id} + hash10 = {:username => username, :id => id} + +FOR ROUNG ROBIN + +http://stackoverflow.com/questions/6648512/scheduling-algorithm-for-a-round-robin-tournament + + +=end + end -- cgit v1.2.3-2-g168b