All Downloads are FREE. Search and download functionalities are using the official Maven repository.

chesspresso.position.MoveablePosition Maven / Gradle / Ivy

/*
 * Chessplorer-Lib - an open source chess library written in Java
 * Copyright (C) 2016 Chessplorer.org
 * Copyright (C) 2012-2016 Gerhard Kalab
 * Copyright (C) 2002-2003 Bernhard Seybold
 *
 * This software is published under the terms of the LGPL Software License,
 * a copy of which has been included with this distribution in the LICENSE.txt
 * file.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 */
package chesspresso.position;

import chesspresso.move.*;

/**
 *
 * @author Bernhard Seybold
 * @author Andreas Rudolph
 */
public interface MoveablePosition extends MutablePosition
{
    public void doMove(short move) throws IllegalMoveException;
    public void doMove(Move move) throws IllegalMoveException;

    public short getLastShortMove() throws IllegalMoveException;
    public Move getLastMove() throws IllegalMoveException;

    public boolean canUndoMove();
    public boolean undoMove();

    public boolean canRedoMove();
    public boolean redoMove();

    public short getMove(int from, int to, int promoPiece);

    public short[] getAllMoves();
    public String getMovesAsString(short[] moves, boolean validateEachMove);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy