| Summary: | Failed initialization of ghost algorithms | ||
|---|---|---|---|
| Product: | Group14-Pacman | Reporter: | Aleksa <ajelaca2-c> |
| Component: | Game | Assignee: | Omar MOUSTAFA <omoustafa2-c> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | tianxyang3-c |
| Priority: | High | ||
| Version: | 0.0.1 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
|
Description
Aleksa
2021-11-24 15:38:22 HKT
I realized that when I deleted FrightenedWandering from the easyGhostAlgorithm.txt, the scanner.next() was called from boolean initModes(String) in Mode.java, although there is nothing more to read. Thus, a solution is to change the code in boolean initModes(String) like this:
if(scanner.hasNext()) {
for (int j = 0; j < numGhosts; j++) {
tempMode.addAlgorithm(scanner.nextLine());
}
}
|