⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 joingame.java

📁 Java mulitplayer strategy game. Adaptation of KDE Galaxy Conquest. (rules are changed - but still th
💻 JAVA
字号:
package net.sf.jawp.gf.system.transaction;

import java.util.Date;


import net.sf.jawp.gf.api.domain.Player;
import net.sf.jawp.gf.api.domain.User;
import net.sf.jawp.gf.domain.GameWorldBase;
import net.sf.jawp.gf.domain.GameWorldRO;
import net.sf.jawp.gf.system.GameSystemCommand;
import net.sf.jawp.gf.system.RootSystem;
/**
 * 
 * @author jarek
 * @version $Revision: 1.4 $
 *
 * @param <GAME>
 * @param <GAMEVIEW>
 * @param <GAMESERVICE> type of gamespecific service
 */
public class JoinGame<GAME extends GameWorldBase<GAMEVIEW>, GAMEVIEW extends GameWorldRO, GAMESERVICE> 
	extends GameSystemCommand<Player, GAME, GAMEVIEW, GAMESERVICE>
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private final long userKey;
	
	private final long gameKey;
	
	
	public JoinGame(final User user, final long game)
	{
		super();
		// TODO Auto-generated constructor stub
		this.userKey = user.getKey();
		this.gameKey = game;
	}



	/**
	 * 
	 * @param system
	 * @param time
	 * @return
	 */
	public Player perform(final RootSystem<GAME, GAMEVIEW, GAMESERVICE> system, final Date time)
	{
		return system.joinGame( this.gameKey, this.userKey);
		
	}

}

⌨️ 快捷键说明

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