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

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