chesscontext.java

来自「一个棋类游戏的源码,包含图形界面,可以人机对战.」· Java 代码 · 共 76 行

JAVA
76
字号
package com.ibm.crl.contest;

import java.awt.Point;
import java.io.IOException;

public interface ChessContext {
	/**
	 * @return total steps from beginning
	 */
	public int getTotalSteps();

	/**
	 * @param step
	 *            from 0 to getTotalSteps()-1 (inclusive)
	 * @return The selected position in the specified step.
	 */
	public Point getStep(int step);

	/**
	 * @return available positions for current step
	 */
	public Point[] getAvailablePositionsForCurrentStep();

	/**
	 * @return total time limit (0 means unlimited)
	 */
	public int getTotalTimeLimit();

	/**
	 * @return time limit for each step (0 means unlimited)
	 */
	public int getStepTimeLimit();

	/**
	 * @return memory limit for each step (0 means unlimited)
	 */
	public int getMemoryLimit();

	/**
	 * @return total left time
	 */
	public int getTotalLeftTime();

	/**
	 * @return left time for current step
	 */
	public int getLeftTime();

	/**
	 * @return memory left for current step
	 */
	public int getLeftMemory();

	/**
	 * @return current chessboard
	 */
	public byte[][] getChessboard();

	/**
	 * @return width of the chessboard
	 */
	public int getChessboardWidth();

	/**
	 * @return height of the chessboard
	 */
	public int getChessboardHeight();

	public byte[] loadResource(Class c, String name) throws IOException;

	/**
	 * @return true if color is black, false if color is white
	 */
	public boolean getMyColor();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?