|
/**
* IOutput.java
*
* @author Martin Klöckner, Daniel Höpfl
*/
package SpringerPack;
import java.awt.Point;
import java.awt.Color;
import java.awt.Image;
import java.awt.Canvas;
public abstract class IOutput extends Canvas
{
private boolean mAnimated = false;
/**
* @return returns whether this Boards provides Animation or not.
* This function is always left untouched.
*/
public boolean isAnimated() { return mAnimated; }
/**
* sets the Board in which all data is saved
*
* @param inBoard Board in which the data is stored
*/
public abstract void setBoard(Board inBoard);
/**
* sets the size of the board
*
* @param inSize size of the board
*/
public abstract void setBoardSize(int inSize);
/**
* goes on step deeper
*/
public abstract void deeper(int inSourceX, int inSourceY, int inDestX, int inDestY) throws InterruptedException;
/**
* goes on step higher
*/
public abstract void higher(int inSourceX, int inSourceY, int inDestX, int inDestY) throws InterruptedException;
/**
* calculates the Postion of the first Field
*
* @param inClicked Point of start (e.g 1,1)
*
* @return
*/
public abstract Point calcStartField(Point inClicked);
/**
* sets the start to the specified coords
*
* @param inX X-Coordinate
*
* @param inY Y-Coordinate
*/
public abstract void setStart(int inX, int inY);
/**
* sets an Image, to be able to draw off-screen
* reduces the flicker
*
* @param inImage Image to draw off-screen
*/
public abstract void setImage(Image inImage);
/**
* @return returns the color of the field, which is white on a normal chess-board
*/
public abstract Color getWhiteFieldColor();
/**
* @return returns the color of the field, which is black on a normal chess-board
*/
public abstract Color getBlackFieldColor();
}
|