📄 humanplayer.java
字号:
/* * HumanPlayer.java * * Created on 2007-9-28, 16:01:01 * * To change this template, choose Tools | Templates * and open the template in the editor. */package org.yangcq.logic.player;import org.yangcq.logic.chessboard.IChessboard;import org.yangcq.logic.search.ISearcher;import org.yangcq.logic.step.Step;/** * * @author Administrator */public class HumanPlayer extends BasePlayer{ private boolean chessmanBlack; public boolean chess(IChessboard board, int x, int y) { if (board.getBoard()[x][y] == null) { board.getBoard()[x][y] = new Step(x, y, new Boolean(this.isChessmanBlack())); return true; } return false; } public boolean surrender(IPlayer player) { return true; //for test! } public boolean threaten(IPlayer player) { return true; //for test! } public boolean repent(IPlayer player) { return false; //for test! } public boolean isHumanPlayer() { return true; } public boolean isChessmanBlack() { return this.chessmanBlack; //for test! } public void setChessmanColor(boolean black) { this.chessmanBlack = black; } public void chess(IChessboard board) { throw new UnsupportedOperationException("Not supported yet."); } public void setAISearch(ISearcher searcher) { throw new UnsupportedOperationException("Not supported yet."); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -