HandsOff/Models/Match.cs
/// <summary>
/// This method is only called when the end score is equal. 
/// This prevents a stalemate and the score from being 0 - 0.
/// </summary>
This method is only called when the end score is equal.
This prevents a stalemate and the score from being 0 - 0.
This method is only called when the end score is equal . This prevents a stalemate and the score from being 0 - 0 .
private void penalty()
        {
            while (Team1Score == Team2Score)
            {
                if (AttemptAdvance(1, 1) == 1)
                {
                    if (BallOwner == 1)
                    {
                        Team1Score++;
                    }
                    else
                    {
                        Team2Score++;
                    }
                }
                if (BallOwner == 1)
                {
                    BallOwner = 2;
                }
                else if (BallOwner == 2)
                {
                    BallOwner = 1;
                }
            }
        }
private void penalty ( ) { while ( Team1Score == Team2Score ) { if ( AttemptAdvance ( 1 , 1 ) == 1 ) { if ( BallOwner == 1 ) { Team1Score ++ ; } else { Team2Score ++ ; } } if ( BallOwner == 1 ) { BallOwner = 2 ; } else if ( BallOwner == 2 ) { BallOwner = 1 ; } } }
This method is only called when the end score is equal.
This method is only called when the end score is equal .