//public static void OpeningKickoff(GameInit game, Team HomeTeam, Team AwayTeam) //{ // string kicker; // string return_man; // string kicking_team; // string receiving_team; // if (HomeTeam.FirstHalfPossession != true) // { // kicker = HomeTeam.Kicker; // kicking_team = HomeTeam.Id; // } // else // { // kicker = AwayTeam.Kicker; // kicking_team = AwayTeam.Id; // } // if (HomeTeam.FirstHalfPossession == true) // { // return_man = HomeTeam.Kick_returner; // receiving_team = HomeTeam.Id; // } // else // { // return_man = AwayTeam.Kick_returner; // receiving_team = AwayTeam.Id; // } // var kickoff = new Kickoff(kicker, return_man, kicking_team, receiving_team); //} public static void OpeningKickoffTest(GameInit game, Team HomeTeam, Team AwayTeam) { // temporary to test OpeningKickoff in Test.OpeningKickoff(game, HomeTeam, AwayTeam); HomeTeam.Kicker = HomeTeam.Roster.Single(x => x.Position == "PK").Starter; AwayTeam.Kicker = AwayTeam.Roster.Single(x => x.Position == "PK").Starter; HomeTeam.Kick_returner = HomeTeam.Roster.Single(x => x.Position == "KR").Starter; AwayTeam.Kick_returner = AwayTeam.Roster.Single(x => x.Position == "KR").Starter; OpeningKickoff.openingkickoff(game, HomeTeam, AwayTeam); }
public static void CoinFlip(GameInit game, Team HomeTeam, Team AwayTeam) { game.CoinFlip(HomeTeam, AwayTeam); Console.WriteLine("HomeTeam gets the opening kickoff: {0}. ", HomeTeam.FirstHalfPossession); game.CoinFlip(HomeTeam, AwayTeam); Console.WriteLine("HomeTeam gets the opening kickoff: {0}. ", HomeTeam.FirstHalfPossession); game.CoinFlip(HomeTeam, AwayTeam); Console.WriteLine("HomeTeam gets the opening kickoff: {0}. ", HomeTeam.FirstHalfPossession); game.CoinFlip(HomeTeam, AwayTeam); Console.WriteLine("HomeTeam gets the opening kickoff: {0}. ", HomeTeam.FirstHalfPossession); game.CoinFlip(HomeTeam, AwayTeam); Console.WriteLine("HomeTeam gets the opening kickoff: {0}. ", HomeTeam.FirstHalfPossession); }
public static void Initialization(GameInit game, Team HomeTeam, Team AwayTeam) { Console.WriteLine("{0} have {1} timeouts remaining and {2} points with {3}:{4} minutes remaining in the {5} quarter", HomeTeam.Id, HomeTeam.NumberOfTimeOuts, HomeTeam.Points, (game.GameClock / 60), (game.GameClock % 60), game.Quarter); game.GameClock -= 22; HomeTeam.NumberOfTimeOuts -= 1; HomeTeam.Points = 7; game.Quarter += 1; Console.WriteLine("{0} have {1} timeouts remaining and {2} points with {3}:{4} minutes remaining in the {5} quarter", HomeTeam.Id, HomeTeam.NumberOfTimeOuts, HomeTeam.Points, (game.GameClock / 60), (game.GameClock % 60), game.Quarter); game.GameClock += 22; HomeTeam.NumberOfTimeOuts += 1; HomeTeam.Points = 0; game.Quarter -= 1; }
public static void openingkickoff(GameInit game, Team HomeTeam, Team AwayTeam) { string kicker; string return_man; string kicking_team; string receiving_team; if (game.Quarter == 1) { if (HomeTeam.FirstHalfPossession != true) { kicker = HomeTeam.Kicker; } else { kicker = AwayTeam.Kicker; } if (HomeTeam.FirstHalfPossession != true) { kicking_team = HomeTeam.Id; } else { kicking_team = AwayTeam.Id; } if (HomeTeam.FirstHalfPossession == true) { return_man = HomeTeam.Kick_returner; } else { return_man = AwayTeam.Kick_returner; } if (HomeTeam.FirstHalfPossession == true) { receiving_team = HomeTeam.Id; } else { receiving_team = AwayTeam.Id; } var kickoff = new Kickoff(kicker, return_man, kicking_team, receiving_team); } else if (game.Quarter == 3) { if (HomeTeam.SecondHalfPossession != true) { kicker = HomeTeam.Kicker; } else { kicker = AwayTeam.Kicker; } if (HomeTeam.SecondHalfPossession != true) { kicking_team = HomeTeam.Id; } else { kicking_team = AwayTeam.Id; } if (HomeTeam.SecondHalfPossession == true) { return_man = HomeTeam.Kick_returner; } else { return_man = AwayTeam.Kick_returner; } if (HomeTeam.SecondHalfPossession == true) { receiving_team = HomeTeam.Id; } else { receiving_team = AwayTeam.Id; } var kickoff = new Kickoff(kicker, return_man, kicking_team, receiving_team); } }