40 lines
927 B
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; }
|
|
}
|