Exemple #1
0
 public static CompactAction FromJSON(JSONClass json)
 {
     return(new CompactAction(
                Coord.FromJSON(json["coord"]),
                Piece.FromJSON(json["bigPiece"]),
                PiecesSquare.FromJSON(json["removed"])
                ));
 }
Exemple #2
0
        private void Replace(Coord coord, out Piece bigPiece, out PiecesSquare removed)
        {
            removed  = board.PiecesSquare(coord);
            bigPiece = removed.p00.DoubleSize();

            foreach (var piece in removed)
            {
                board.Remove(piece);
            }

            board.Set(coord, bigPiece);
        }
Exemple #3
0
 public CompactAction(Coord coord, Piece bigPiece, PiecesSquare removed)
 {
     this.coord    = coord;
     this.bigPiece = bigPiece;
     this.removed  = removed;
 }