📄 match.java
字号:
package org.nebula.games.go;
import java.util.*;
public class Match{
public static final int NO_TIME_LIMIT = 0;
/**
* board size can be bigger than Go.MIN_BOARD_SIZE and smaller than Go.MAX_BOARD_SIZE
* default size is Go.DEFAULT_BOARD_SIZE
*/
public int boardSize;
/**
* time limit on second unit
*
* for example:
* 11100 = 3 * 3600 + 5 * 60
* then it represent 3 hour and 5 minute
*/
public int timeLen;
/**
* chessmen count put before game start
*/
public int preputCount;
/**
* 贴目:domain gived by black side to white side
*/
public double komi;
/**
* 读秒:limiting times on second unit
*/
public int yomi;
/**
* 读秒次数:limit times
*/
public int yomiTimes;
public String matchName;
public String blackName;
public String blackRank;
public String whiteName;
public String whiteRank;
public String place;
public String matchDate;
public String source;
public String result;
public String comment;
private Movement root; //下棋记录
private String fileName;
public Match(){
boardSize = GoBoardModel.DEFAULT_BOARD_SIZE;
timeLen = NO_TIME_LIMIT;
preputCount = 0;
komi = 5.5;
yomi = 0;
yomiTimes = 0;
matchName = "";
blackName = "";
blackRank = "";
whiteName = "";
whiteRank = "";
place = "";
matchDate = "";
source = "";
result = "";
comment = "";
fileName = "";
root = null;
}
public void setMovements(Movement root) {
this.root = root;
}
public int getMovementCount() {
return root.getChildCount();
}
public Movement getMovementAt(int index) {
return (Movement) root.getChildAt(index);
}
public Movement getRootMovement() {
return root;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -