verticalcells.java

来自「一款数独游戏的Java源代码」· Java 代码 · 共 34 行

JAVA
34
字号
package cells;import java.util.List;import entity.AbstractCells;import entity.Point;import entity.Value;public class VerticalCells extends AbstractCells {	public VerticalCells(Point begin, Point end,			List<Value> policyOringinalValue) {		super(begin, end, policyOringinalValue);		if (begin.getYIndex() != end.getYIndex()) {			throw new ArithmeticException("Wrong y index !begin:"					+ begin.getYIndex() + ",end:" + end.getYIndex());		}	}	protected boolean initCondition(Point point) {		boolean result = false;		int yindexBegin = this.getBegin().getYIndex();		int xindexBegin = this.getBegin().getXIndex();		int xindexEnd = this.getEnd().getXIndex();		if (point.getYIndex() == yindexBegin) {			if ((point.getXIndex() >= xindexBegin)					&& (point.getXIndex() <= xindexEnd)) {				result = true;			}		}		return result;	}}

⌨️ 快捷键说明

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