当前位置: 首页>>代码示例>>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;未经允许,请勿转载。