/** * Changes the desired operationtype. ADDITION = 0; SUBTRACTION = 1; MULTIPLICATION = 2; DIVISION * = 3; * * @param operationType Integer; 0-3 for different operation types. */ public void changeOperationType(int operationType) { student.setOperationType(operationType); this.questionsController = new QuestionsController(10, student.getDifficulty(), student.getOperationType()); }
/** * ADDITION = 0; SUBTRACTION = 1; MULTIPLICATION = 2; DIVISION = 3; * * @param playerName The students username * @param operationType Desired operation type; addition, substraction, multiplication, division. * @param difficulty Desired difficulty at game start. Will dynamically change to accomodate the * students skill-level. */ public GameController(String playerName, int operationType, int difficulty) { student = new Student(playerName); student.setOperationType(operationType); this.questionsController = new QuestionsController(10, difficulty, operationType); restoreGame(); }