Repaired code:
- doesn't crash:
  - ready to work on playing it in the console