Pac-Man


Story

This story uses the classic arcade game Pac-Man as a basis for teaching the boolean type / boolean logic concept.

The theme is a derivative of Weng, Tseng, and Lee's (2010)(1) discussion about strategies for effective learning for logic by using game states.

The story uses several game state checks to practice boolean expressions in the language constructs.

Tasks

Game states explored:

  • If Pac-Man can eat a ghost.
  • If Pac-Man scores a point.
  • If Pac-Man loses the game.
  • If Pac-Man wins the game.

Terminology

Terms used in the story:

  • Pac-Man: the main character of the game, whom the player controls.
  • Power pellet: an item which gives the ability to eat ghosts, it has a finite duration of action.
  • Dot: an item which gives points, and upon eating them all, wins the stage.
  • Ghost: the CPU opponent in the game, where if a ghost touches Pac-Man without a power-pellet active, causes Pac-Man to lose the stage.

Implementations

Reference

References

1. Jui-Feng Weng, Shian-Shyong Tseng, Tsung-Ju Lee, Teaching Boolean Logic through Game Rule Tuning, IEEE Trans. Learning Technol. 3 (2010) 319–328. https://doi.org/10.1109/TLT.2010.33.