This repository has been archived on 2021-02-18. You can view files and clone it, but cannot push or open issues or pull requests.
chess/src/main/java/dev/kske/chess/event/MoveEvent.java

40 lines
927 B
Java

package dev.kske.chess.event;
import dev.kske.chess.board.*;
import dev.kske.eventbus.IEvent;
/**
* Project: <strong>Chess</strong><br>
* File: <strong>MoveEvent.java</strong><br>
* Created: <strong>7 Aug 2019</strong><br>
*
* @since Chess v0.4-alpha
* @author Kai S. K. Engelbart
*/
public class MoveEvent implements IEvent {
private final Move move;
private final BoardState boardState;
/**
* Creates an instance of {@link MoveEvent}.
*
* @param move the move by which the event was triggered
* @param boardState the state of the board after the move
*/
public MoveEvent(Move move, BoardState boardState) {
this.move = move;
this.boardState = boardState;
}
/**
* @return the move
*/
public Move getMove() { return move; }
/**
* @return the state of the board after the move
*/
public BoardState getBoardState() { return boardState; }
}