Bug 592 - PacMan moves even after he looses he lost a life
Summary: PacMan moves even after he looses he lost a life
Status: RESOLVED FIXED
Alias: None
Product: Group14-Pacman
Classification: Unclassified
Component: Game (show other bugs)
Version: 0.0.1
Hardware: PC Windows
: High major
Assignee: Alex
URL:
Depends on:
Blocks:
 
Reported: 2021-11-21 00:39 HKT by Aleksa
Modified: 2021-12-06 22:54 HKT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksa 2021-11-21 00:39:53 HKT
I run Main.java and input the sequence of commands left, left, left, left, up, up, after which the PacMan should loose his life and return to his starting position. Instead he keeps moving.
Comment 1 Aleksa 2021-11-21 00:45:37 HKT
The problem was in void handleMovements(int, int) in Game.java. There was no indicator to tell us whether PacMan lost his life or not after the collision with ghosts. Now this is fixed by converting method resolveCollison(Ghost, boolean) into boolean and using conditionals in void handleMovements(int, int)