step.java
来自「一个黑白棋的源代码(尚未完成」· Java 代码 · 共 72 行
JAVA
72 行
/* * Step.java * * Created on 2007-9-29, 10:25:28 * * To change this template, choose Tools | Templates * and open the template in the editor. */package org.yangcq.logic.step;/** * * @author Administrator */public class Step{ private int x; //棋子坐标x private int y; //棋子坐标y Boolean black = null;//颜色 public Step(int x, int y, Boolean black) { this.x = x; this.y = y; this.black = black; } public void reverse() { if (this.black != null) { this.black = new Boolean(!black.booleanValue()); } } public int getX() { return x; } public int getY() { return y; } public void setX(int x) { this.x = x; } public void setY(int y) { this.y = y; } public Boolean getColor() { return this.black; } public void setColor(Boolean black) { this.black = black; } public Step clone() { return new Step(this.getX(),this.getY(),new Boolean(this.getColor().booleanValue())); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?