Assets/Scripts/Game.cs
/// <summary>
/// For a given seat, determine outcome of holding set of cards
/// </summary>
/// <returns>1 if given seat beats other seat, 0 if given seat loses to other seat, -1 if given seat busts</returns>
For a given seat, determine outcome of holding set of cards
For a given seat determine outcome of holding set of cards
private int GetOutcome(Seat seat, Seat otherSeat) {
		int seatHighestTotalScore = 0;
		bool seatBusts = GetHighestTotalScoreAndCheckBust(seat, out seatHighestTotalScore);
		int otherSeatHighestTotalScore = 0;
		bool otherSeatBusts = GetHighestTotalScoreAndCheckBust(otherSeat, out otherSeatHighestTotalScore);
		if (seatBusts) {
			return seatHighestTotalScore > otherSeatHighestTotalScore ? 1 : 0;
		}
		return -1;
	}
private int GetOutcome ( Seat seat , Seat otherSeat ) { int seatHighestTotalScore = 0 ; bool seatBusts = GetHighestTotalScoreAndCheckBust ( seat , out seatHighestTotalScore ) ; int otherSeatHighestTotalScore = 0 ; bool otherSeatBusts = GetHighestTotalScoreAndCheckBust ( otherSeat , out otherSeatHighestTotalScore ) ; if ( seatBusts ) { return seatHighestTotalScore > otherSeatHighestTotalScore ? 1 : 0 ; } return - 1 ; }
For a given seat, determine outcome of holding set of cards
For a given seat determine outcome of holding set of cards
1 if given seat beats other seat, 0 if given seat loses to other seat, -1 if given seat busts
1 if given seat beats other seat 0 if given seat loses to other seat - 1 if given seat busts
seat
Seat
otherSeat
Seat