Created attachment 46 [details] The UserInputHandler class with error Summary: The bug is found after I add the third parameter in the checkIfValid() method in the UserInputHandler class Steps to Reproduce: 1. Run the program 2. Input command "1 3 W" Actual Results: The program prompt: Exception in thread "main" java.lang.Error: Unresolved compilation problem: Char cannot be resolved to a type at game.UserInputHandler.checkIfValid(UserInputHandler.java:50) at game.UserInputHandler.getUserInput(UserInputHandler.java:43) at game.GameController.startGame(GameController.java:31) at game.Main.main(Main.java:9) Expected Results: Swap fails! Please enter your move(eg: 1 3 W):
(In reply to jli262-c from comment #0) > Created attachment 46 [details] > The UserInputHandler class with error > > Summary: > The bug is found after I add the third parameter in the checkIfValid() > method in the UserInputHandler class > > Steps to Reproduce: > 1. Run the program > 2. Input command "1 3 W" > > Actual Results: > The program prompt: > Exception in thread "main" java.lang.Error: Unresolved compilation problem: > Char cannot be resolved to a type > > at game.UserInputHandler.checkIfValid(UserInputHandler.java:50) > at game.UserInputHandler.getUserInput(UserInputHandler.java:43) > at game.GameController.startGame(GameController.java:31) > at game.Main.main(Main.java:9) > > > Expected Results: > Swap fails! > Please enter your move(eg: 1 3 W): According to the error explanation in the eclipse prompt, I found that it was the case that the third parameter should be a String but not a Char to make it valid in the next process.