public void Seed() { //Create players _system.CreateMember("89052060389", "Benny"); _system.CreateMember("85052234324", "Max"); _system.CreateMember("95123523122", "Jonny"); _system.CreateMember("89052012312", "David"); _system.CreateMember("79063234112", "Peter"); //Create rounds with series var serie1Id = _system.CreateSerie(_system.GetParty(1), 50); var serie2Id = _system.CreateSerie(_system.GetParty(2), 70); var serie1 = _system.GetSerie(serie1Id); var serie2 = _system.GetSerie(serie2Id); var round1Id = _system.CreateRound(serie1, serie2); var round1 = _system.GetRound(round1Id); var serie3Id = _system.CreateSerie(_system.GetParty(1), 50); var serie4Id = _system.CreateSerie(_system.GetParty(2), 110); var serie3 = _system.GetSerie(serie3Id); var serie4 = _system.GetSerie(serie4Id); var round2Id = _system.CreateRound(serie3, serie4); var round2 = _system.GetRound(round2Id); var serie5Id = _system.CreateSerie(_system.GetParty(1), 230); var serie6Id = _system.CreateSerie(_system.GetParty(2), 110); var serie5 = _system.GetSerie(serie5Id); var serie6 = _system.GetSerie(serie6Id); var round3Id = _system.CreateRound(serie5, serie6); var round3 = _system.GetRound(round3Id); roundList.Add(round1); roundList.Add(round2); roundList.Add(round3); }
public Match CreateMatch(string player1Name, int player1score1, int player1score2, int player1score3, string player2Name, int player2score1, int player2score2, int player2score3, Party winner) { //Create MATCH 1 //Create series var serie1Id = _system.CreateSerie(_system.GetAllParties().First(x => x.Name == player1Name), player1score1); var serie2Id = _system.CreateSerie(_system.GetAllParties().First(x => x.Name == player2Name), player2score1); var serie1 = _system.GetSerie(serie1Id); var serie2 = _system.GetSerie(serie2Id); var serie3Id = _system.CreateSerie(_system.GetAllParties().First(x => x.Name == player1Name), player1score2); var serie4Id = _system.CreateSerie(_system.GetAllParties().First(x => x.Name == player2Name), player2score2); var serie3 = _system.GetSerie(serie3Id); var serie4 = _system.GetSerie(serie4Id); var serie5Id = _system.CreateSerie(_system.GetAllParties().First(x => x.Name == player1Name), player1score3); var serie6Id = _system.CreateSerie(_system.GetAllParties().First(x => x.Name == player2Name), player2score3); var serie5 = _system.GetSerie(serie5Id); var serie6 = _system.GetSerie(serie6Id); //Create lane var laneId = _system.CreateLane(1); var lane = _system.GetLane(1); //Create rounds var round1Id = _system.CreateRound(serie1, serie2); var round2Id = _system.CreateRound(serie3, serie4); var round3Id = _system.CreateRound(serie5, serie6); var round1 = _system.GetRound(round1Id); var round2 = _system.GetRound(round2Id); var round3 = _system.GetRound(round3Id); var roundList = new List <Round>(); roundList.Add(round1); roundList.Add(round2); roundList.Add(round3); //Create match var matchId = _system.CreateMatch(roundList, lane, winner); return(_system.GetMatch(matchId)); }