📄 computerplayer.java
字号:
/** * Represents the basic computer player. * * @author Ian Braldey * @version 1.0 March 2008 */public class ComputerPlayer{ Board board; String playPiece; /** * Constructor for objects of class ComputerPlayer */ public ComputerPlayer(Board board, String playPiece) { this.board = board; this.playPiece = playPiece; } /** * The player's move. * Assumes there is still a space on the board. * * @return coord of cell used */ public Coord move() { Coord coord = board.getFirstEmptyCell(); board.setCell( coord, playPiece); return coord; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -