Skip to content

Instantly share code, notes, and snippets.

@miere
Last active August 28, 2019 04:13
Show Gist options
  • Save miere/badc5c9903753a84ba7cefddd8280e6b to your computer and use it in GitHub Desktop.
Save miere/badc5c9903753a84ba7cefddd8280e6b to your computer and use it in GitHub Desktop.

The Bomberman

Bomberman Picture

Deeply inspired by the original game from late 20th century, this game will be used as a coding exercise in which we expect to practice:

  • Data structures (lists, queues, matrices, etc.)
  • Algorithms
  • Unit testing

As optional goal we have:

  • Threads
  • Preemptive multi-tasking

The game

Note: this expect you to know the basics of the original Bomberman game. If you know nothing about it, please take some time here.

  • Bomberman is pyromanic guy who really enjoys to play with bombs. He puts bombs for fun but can hurt itself.
  • Our game only have one player: Bomberman. So our player should be able to survive (or try to).
  • Think on the Game as a board of 16x16 filled with short numbers, where:
    • -1 there's a block made by concrete
    • 0 there's a wood block
    • 1 there's nothing
    • 2 there's a bomb
    • 3 bomberman is there
  • Bombs:
    • Explodes in cross by up to 3 block from its epicentre.
    • Explodes after 5 rounds
    • Can't destroy concrete blocks
    • Can blast wood blocks
  • Bomberman can perform only one of the following actions per round:
    • Move up
    • Move down
    • Move left
    • Move right
    • Put bomb
  • Bomberman will perfom actions in response to the following commands in the keyboard:
    • W - Move up
    • S - Move down
    • A - Move left
    • D - Move right
    • 1 - Put bomb
  • Bomberman health is boolean, which means he'll be either dead or alive.
  • Bomberman will receive 10 points for every wood block destroyed.
  • Rounds are computed every second.
  • There are only 5 bombs available
  • Player have 1 minute to play

End of Game condition

  • Bomberman has died due to a bomb blast
  • Run out of time

Expectations

  • Every round should update the screen.
  • Player actions should be read from the keyboard by pressing one of valid letters followed by ENTER.
  • (as previously described) player can perform only one action per second
  • Player score and remaning available bombs should be visible in the screen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment