📄 latentactivityvaluer.java
字号:
/* * ActivityValuer.java * * Created on 2007-10-8, 17:41:41 * * To change this template, choose Tools | Templates * and open the template in the editor. */package org.yangcq.logic.valuer;import org.yangcq.logic.step.Step;/** * * @author Administrator */public class LatentActivityValuer implements IValuer{ public long getValue(Step[][] board, boolean side)//潜在行动力估值,简单速度快,适合 { long value = 0l; for (int i = 0; i < board.length; i++) { for (int j = 0; j < board.length; j++) { if (board[i][j] == null) { for (int x = i - 1; x < x + 2; x++) { for (int y = j - 1; y < j + 2; y++) { if (x >= 0 && y >= 0 && x < board.length && y < board.length && board[x][y] != null && board[x][y].getColor().booleanValue() == !side) { value++; } } } } } } return value; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -