private static PossibleCase GetPossibleCase(Point pts, ColorCrazeBoard.ColorCrazeBoard board, ColorCrazeDirection direction) { PossibleCase possibleCase = new PossibleCase { Direction = direction, owner = board[pts.X, pts.Y].Owner }; return(possibleCase); }
private Boolean HaveToSwitchByPointsGameRound(PossibleCase actual, PossibleCase possible) { Boolean val = false; if (idAndPts[actual.owner].round < idAndPts[possible.owner].round) { val = true; } else if (idAndPts[actual.owner].round == idAndPts[possible.owner].round) { val = idAndPts[actual.owner].game < idAndPts[possible.owner].game; } return(val); }
private Boolean HaveToSwitchByEndGame(PossibleCase actual, PossibleCase possible) { Boolean val = false; int diff = idAndPts[possible.owner].round - myScores.round; int diffBest = idAndPts[actual.owner].round - myScores.round; if (diffBest > 0 && diff > 0 && diff < diffBest) { val = true; } else if (diffBest < 0 && diff > 0) { val = true; } else if (diffBest < 0 && diff < 0 && diff > diffBest) { val = true; } return(val); }