Back to project page MentalMathX.
The source code is released under:
GNU General Public License
If you think the Android project MentalMathX listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.schlingel.bplaced.mentalmathx.game.logic; //from w w w.j a va 2 s . c om import net.schlingel.bplaced.mentalmathx.game.Difficulty; import net.schlingel.bplaced.mentalmathx.game.strategy.ExerciseStrategy; import net.schlingel.bplaced.mentalmathx.game.strategy.ExerciseStrategyFactory; /** * Created by zombie on 29.06.14. */ public class InfiniteGameLogic implements GameLogic { private ExerciseStrategy strategy; private boolean isGameOver; public InfiniteGameLogic(Difficulty difficulty) { this.strategy = ExerciseStrategyFactory.getInstance(difficulty); this.isGameOver = false; } @Override public void endRound() { } @Override public ExerciseStrategy exerciseFactory() { return strategy; } @Override public void onWrongGuess() { this.isGameOver = true; } @Override public boolean isGameOver() { return isGameOver; } }