linqs / pacman

Undergraduate AI assignments disguised as Pac-Man!
https://linqs.github.io/pacman/
Other
11 stars 44 forks source link

Refactor captureGraphicsDisplay and graphicsDisplay in UI. #28

Closed kcarella closed 5 years ago

kcarella commented 5 years ago

Changes: -Created 2 new modules: graphicsConstants ans topGraphics. -Moved global constants into graphicsConstants. -Moved common methods from class InfoPane to abstract base class absPane in topGraphics. -Moved common methods from class PacmanGraphics to abstract base class absPacmanGraphics in topGraphics. -Moved global method add to topGraphics. -Removed method lookAhead from class FirstPersonPacmanGraphics because it wasn't referenced anywhere.

Notes: -Class FirstPersonPacmanGraphics in graphicsDisplay and captureGraphicsDisplay are identical after removing method lookAhead. However, FirstPersonPacmanGraphics is tightly coupled with the PacmanGraphics class in their respective files. I couldn't figure out how to remove redundancy for this class. -Moved some imports to topGraphics and out of graphicsDisplay and captureGraphicsDisplay. -Changed the style of some lines to pass the pep8 style checker.

eriq-augustine commented 5 years ago

This PR has been replaced by the work done as for #4 . Good job on the work thus far.