當前位置: 首頁>>代碼示例>>Java>>正文


Java AbstractPlayer類代碼示例

本文整理匯總了Java中com.theaigames.game.player.AbstractPlayer的典型用法代碼示例。如果您正苦於以下問題:Java AbstractPlayer類的具體用法?Java AbstractPlayer怎麽用?Java AbstractPlayer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AbstractPlayer類屬於com.theaigames.game.player包,在下文中一共展示了AbstractPlayer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: sendSettings

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
@Override
public void sendSettings(AbstractPlayer player) {
	
	// create player names string
	String playerNames = "";
	for(Player p : this.players) {
		playerNames += p.getName() + ",";
	}
	playerNames = playerNames.substring(0, playerNames.length()-1);
	
	// send the mandatory settings
	player.sendSetting("timebank",(int) TIMEBANK_MAX);
	player.sendSetting("time_per_move",(int) TIME_PER_MOVE);
	player.sendSetting("player_names", playerNames);
	player.sendSetting("your_bot", player.getName());
	
	// send the game specific settings
	player.sendSetting("field_width", FIELD_WIDTH);
	player.sendSetting("field_height", FIELD_HEIGHT);
}
 
開發者ID:theaigames,項目名稱:blockbattle-engine,代碼行數:21,代碼來源:Blockbattle.java

示例2: sendSettings

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
@Override
public void sendSettings(AbstractPlayer player) {
    player.sendSetting("timebank", TIMEBANK_MAX);
    player.sendSetting("time_per_move", TIME_PER_MOVE);
    player.sendSetting("player_names", this.players.get(0).getName() + "," + this.players.get(1).getName());
    player.sendSetting("your_bot", player.getName());
    player.sendSetting("your_botid",mBotId);
    player.sendSetting("field_columns", FIELD_COLUMNS);
    player.sendSetting("field_rows", FIELD_ROWS);
    mBotId++;
}
 
開發者ID:theaigames,項目名稱:fourinarow-engine,代碼行數:12,代碼來源:FourInARow.java

示例3: AbstractMove

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
public AbstractMove(AbstractPlayer player) {
	this.player = player;
	this.illegalMove = "";
}
 
開發者ID:theaigames,項目名稱:ultimatetictactoe-engine,代碼行數:5,代碼來源:AbstractMove.java

示例4: setPlayer

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
/**
 * @param player : Sets the name of the Player that this Move belongs to
 */
public void setPlayer(AbstractPlayer player) {
	this.player = player;
}
 
開發者ID:theaigames,項目名稱:ultimatetictactoe-engine,代碼行數:7,代碼來源:AbstractMove.java

示例5: getPlayer

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
/**
 * @return : The player that this Move belongs to
 */
public AbstractPlayer getPlayer() {
	return this.player;
}
 
開發者ID:theaigames,項目名稱:ultimatetictactoe-engine,代碼行數:7,代碼來源:AbstractMove.java

示例6: Move

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
public Move(AbstractPlayer player) {
	super(player);
}
 
開發者ID:theaigames,項目名稱:ultimatetictactoe-engine,代碼行數:4,代碼來源:Move.java

示例7: AbstractMove

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
public AbstractMove(AbstractPlayer player) {
    this.player = player;
    this.illegalMove = "";
}
 
開發者ID:theaigames,項目名稱:fourinarow-engine,代碼行數:5,代碼來源:AbstractMove.java

示例8: setPlayer

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
/**
 * @param player : Sets the name of the Player that this Move belongs to
 */
public void setPlayer(AbstractPlayer player) {
    this.player = player;
}
 
開發者ID:theaigames,項目名稱:fourinarow-engine,代碼行數:7,代碼來源:AbstractMove.java

示例9: getPlayer

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
/**
 * @return : The player that this Move belongs to
 */
public AbstractPlayer getPlayer() {
    return this.player;
}
 
開發者ID:theaigames,項目名稱:fourinarow-engine,代碼行數:7,代碼來源:AbstractMove.java

示例10: setOwner

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
public void setOwner(AbstractPlayer owner) {
    mOwner = owner;
}
 
開發者ID:theaigames,項目名稱:fourinarow-engine,代碼行數:4,代碼來源:AbstractField.java

示例11: getOwner

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
public AbstractPlayer getOwner() {
    return mOwner;
}
 
開發者ID:theaigames,項目名稱:fourinarow-engine,代碼行數:4,代碼來源:AbstractField.java

示例12: MoveResult

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
public MoveResult(AbstractPlayer player, Field field, int playerId) {
    super(player);
    mBoard = field.toString();
    mPlayerId = playerId;
}
 
開發者ID:theaigames,項目名稱:fourinarow-engine,代碼行數:6,代碼來源:MoveResult.java

示例13: Move

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
public Move(AbstractPlayer player) {
    super(player);
}
 
開發者ID:theaigames,項目名稱:fourinarow-engine,代碼行數:4,代碼來源:Move.java

示例14: Move

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
public Move(AbstractPlayer player, MoveType type) {
	super(player);
	this.type = type;
}
 
開發者ID:theaigames,項目名稱:blockbattle-engine,代碼行數:5,代碼來源:Move.java

示例15: getWinner

import com.theaigames.game.player.AbstractPlayer; //導入依賴的package包/類
@Override
public AbstractPlayer getWinner() {
	return winner;
}
 
開發者ID:theaigames,項目名稱:blockbattle-engine,代碼行數:5,代碼來源:Processor.java


注:本文中的com.theaigames.game.player.AbstractPlayer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。