player.java

来自「ParallelConnectFour是一个java小游戏」· Java 代码 · 共 31 行

JAVA
31
字号
package edu.rit.cs.mlr5773.connectfour;/** * Abstract Player class.  Each player must implement move(), which * should call game.move( move ), passing the desired move to be made. *  * @author Mark Roth */public abstract class Player {  /** The game object to perform moves on */  protected ConnectFourGame game;  /** The color for this player.  1 = Red, 2 = Black. */  protected int player;  /**   * Creates a new Player.  Each player knows, at minimum, the game being   * played, and its own color.   */  public Player( ConnectFourGame game, int player ) {    this.game = game;    this.player = player;  }  /**   * Process a request by the game to take the next turn.   */  public abstract void move();}

⌨️ 快捷键说明

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