diff --git a/src/main/java/controls/PhaseController.java b/src/main/java/controls/PhaseController.java index 5a30228..8a1cabb 100644 --- a/src/main/java/controls/PhaseController.java +++ b/src/main/java/controls/PhaseController.java @@ -9,10 +9,9 @@ int guess; boolean isDecidedAttacker; int attacker; - boolean isDecidedTarget; int target; Algo algo; - AbstractGameState abstractGameState; + public AbstractGameState abstractGameState; TurnPlayer turnPlayer; TurnBot turnBot; public PhaseController(Algo algo){ @@ -22,34 +21,15 @@ turnBot = new TurnBot(algo); abstractGameState = turnPlayer; currentPhase=Phase.Selection; - //iGameView.onFinishedEachAttack(abstractGameState); - // iGameView.onStartPlayerTurn(abstractGameState); } public void bindGameView(IGameView iGameView){ this.iGameView = iGameView; } - + public void startGame(){ + changePhase(Phase.StartPlayerTurn); + } public void setSelection(int attacker){ changePhase(Phase.Selection, attacker); -// switch (currentPhase){ -// case Selection: -// if(abstractGameState.isDeckLess()){ -// currentPhase = Phase.Target; -// }else{ -// this.attacker = attacker; -// isDecidedAttacker = true; -// currentPhase = Phase.Target; -// iGameView.onDecidedSelection(attacker); -// } -// break; -// case Target: -// this.attacker = attacker; -// isDecidedAttacker = true; -// currentPhase = Phase.Target; -// iGameView.onDecidedSelection(attacker); -// break; -// } - } public void setTarget(int target){ changePhase(Phase.Target, target); @@ -119,10 +99,6 @@ public void setDeclaration(int guess) { changePhase(Phase.Declaration, guess); } - - public void startBotTurn(){ - changePhase(Phase.StartBotTurn, 0); - } public void botAttack(int guess, int attacker, int target){ changePhase(Phase.BotAttack,guess,attacker,target);