Esempio n. 1
0
 public static bool HasPlayerWon(GameField field, PlayerSide side)
 {
     var oppositeSide = side.ToOpposite();
     return !field.AreAnyPieces(oppositeSide)
         || !AnyTurnsPossible(field, oppositeSide);
 }
Esempio n. 2
0
        public int Compare(CachedField oldField, CachedField newField, PlayerSide side)
        {
            var oppositeSide = side.ToOpposite();

            return(oldField.PiecesCount(oppositeSide) - newField.PiecesCount(oppositeSide));
        }