state.java

来自「Reinforcement Learning」· Java 代码 · 共 38 行

JAVA
38
字号
/*
 * Created on Oct 23, 2004
 */


import java.awt.Point;

public class State extends Point
{
	
	public State(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	/* used for debugging only...
	 */
	void printState()
	{
	    System.out.print("State=<"+x+","+y+">");
	}
	
	/*copies the newState object in to this state
	 */
	void copy(State newState)
	{
		x = newState.x;
		y = newState.y;
	}
	
	public boolean equals(Object Obj)
	{
		State st = (State)Obj;
		return (x == st.x && y==st.y);
	}
	
}

⌨️ 快捷键说明

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