Game Design & Architecture:

Phagocitosis




Data flow Structure:



Flag values and such:
  • isMoving: 
    • 0: not direction assigned
    • 1: direction assigned
  • direction: numpad alike
    • 0: let your imagination flow!
    • 4: left
    • 2: down
    • 6: right
    • 8: up
  • matrix cell values:
    • -1: default/error
    • 0: nothing
    • 1: wall
    • 2: start point
    • 3: finish point
    • 4: killing point
    • >4: future addons, important to leave the checking open for this



2b- Update method if all the Entities are treated the same way (every big-black-dot step is called for every single Entity):



2b.1- Look for the "isMoving" flag value on every Entity:



2b.2- Checks if there's a wall blocking in the dir "direction":
    NOTE: the killing and winning conditions will be treated in other method