logiccontrol.java

来自「一个java写的大富翁游戏」· Java 代码 · 共 36 行

JAVA
36
字号
package rich;

/**
 * @author ZhiJian
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class LogicControl{
	MapControl a;
	RollDie dice;
	int address;
	Character[] game;
	int count=0;
	GUIControl gui;

	public LogicControl(Character[] game){
			dice = new RollDie();
			address =0;
			this.game = game;
			
			gui = new GUIControl(this);
			for(int i=0;i<game.length;i++){
				gui.setCharacterInMap(game[i]);	//set Character in Map
			}
			turning();	//starting the loop 
		}

	public void turning(){	// make a loop for player

		if(count==game.length){ count -= game.length;}
			gui.turnPlayer(game[count++]);
	} 
}		

⌨️ 快捷键说明

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