exercism/cpp/ellens-alien-game/HINTS.md

576 B

Hints

1. Create the Alien Class

  • The constructor does not have a return type and has the same name as the class.
  • A common convention for classes is using names in PascalCase.

2. The hit Function

  • Remember the invariant: health points can't be negative.

3. The is_alive Function

  • life points at 0 is the only 'dead' condition.

4. The teleport Function

  • Member variables can be updated by any function of the class.

5. The collision_detection Function

  • All public member variables can be accessed from outside the class.