
org.refcodes.checkerboard.impls.AbstractPlayerEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refcodes-checkerboard Show documentation
Show all versions of refcodes-checkerboard Show documentation
Artifact for providing some easy means to visualize (state of) board
games or (state of) cellular automatons.
package org.refcodes.checkerboard.impls;
import org.refcodes.checkerboard.Player;
import org.refcodes.checkerboard.PlayerAction;
import org.refcodes.checkerboard.PlayerEvent;
public abstract class AbstractPlayerEvent implements PlayerEvent {
// /////////////////////////////////////////////////////////////////////////
// STATICS:
// /////////////////////////////////////////////////////////////////////////
// /////////////////////////////////////////////////////////////////////////
// CONSTANTS:
// /////////////////////////////////////////////////////////////////////////
// /////////////////////////////////////////////////////////////////////////
// VARIABLES:
// /////////////////////////////////////////////////////////////////////////
private Player _source;
private PlayerAction _action;
// /////////////////////////////////////////////////////////////////////////
// CONSTRUCTORS:
// /////////////////////////////////////////////////////////////////////////
public AbstractPlayerEvent( PlayerAction aAction, Player aSource ) {
_action = aAction;
_source = aSource;
}
// /////////////////////////////////////////////////////////////////////////
// INJECTION:
// /////////////////////////////////////////////////////////////////////////
// /////////////////////////////////////////////////////////////////////////
// METHODS:
// /////////////////////////////////////////////////////////////////////////
@Override
public PlayerAction getAction() {
return _action;
}
@Override
public Player getSource() {
return _source;
}
@Override
public String toString() {
return "action := " + _action;
}
// /////////////////////////////////////////////////////////////////////////
// HOOKS:
// /////////////////////////////////////////////////////////////////////////
// /////////////////////////////////////////////////////////////////////////
// HELPER:
// /////////////////////////////////////////////////////////////////////////
// /////////////////////////////////////////////////////////////////////////
// INNER CLASSES:
// /////////////////////////////////////////////////////////////////////////
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy