HandsOff/Models/Match.cs
/// <summary>
/// This method starts the simulation and contains the loop where it is executed from.
/// </summary>
This method starts the simulation and contains the loop where it is executed from.
This method starts the simulation and contains the loop where it is executed from .
public void StartSimulation()
        {
            BallPosition = 4;
            BallOwner = 1;
            TurnCounter = 1;
            while (TurnCounter < MaxTurns)
            {
                if (TurnCounter == 1750000)
                {
                    BallOwner = 2;
                }
                TakeTurn();
                TurnCounter++;
                if ((TurnCounter + 1) > MaxTurns)
                {
                    if (Team1Score == Team2Score)
                    {
                        penalty();
                    }
                    DataAccess.AddScores(Team1.TeamName, Team2.TeamName, Team1Score, Team2Score);
                }
            }
        }
public void StartSimulation ( ) { BallPosition = 4 ; BallOwner = 1 ; TurnCounter = 1 ; while ( TurnCounter < MaxTurns ) { if ( TurnCounter == 1750000 ) { BallOwner = 2 ; } TakeTurn ( ) ; TurnCounter ++ ; if ( ( TurnCounter + 1 ) > MaxTurns ) { if ( Team1Score == Team2Score ) { penalty ( ) ; } DataAccess . AddScores ( Team1 . TeamName , Team2 . TeamName , Team1Score , Team2Score ) ; } } }
This method starts the simulation and contains the loop where it is executed from.
This method starts the simulation and contains the loop where it is executed from .
// Start the match with Team 1 