Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }