Text Game

Design a text game that uses the console to display the contents as well as to get user commands.

Have the game describe the scene that the character is in, list monsters present, display the command options, and act on the user's command; this should repeat until the end of the game is reached.

The following commands should be available: 'w' = move north, 'a' = move west, 's' = move south, 'd' = move east, 'f' = fight, 'r' = run, 'q' = quit game, 'i' = show info/stats, 'p' = drink healing potion, '?' = display these commands

Make it so the character can deal damage to the monster and take damage and defeat it or die trying, also allow the character to drink healing potions to restore health points.

Also be able to level up when a monster is defeated allowing your character to do more damage so you can defeat stronger monsters that will need to be defeated to reach the end.

Hint Store the map as a multidimensional array of Scene objects, where each object contains a description as well as Monster objects (if any) that are in the scene.

It could look something like this:

Welcome hero! Commands: 'w' = go north 'a' = go west 's' = go south 'd' = go east 'f' = fight 'r' = run back 'i' = show info/stats 'p' = drink healing potion '?' = display these commands 'q' = quit game You are in a thick forest, the smell of pine fills the air, and birds are chirping peacefully. To the south is a meadow, to the east is a lake. >

When a movement action (a/s/d/w/r) is typed, a new description appears, as well as mention of a monster in the scene if any:

You are at a lake. You feel a chill and notice an eerie silence. To the west is a forest, to the south is a castle There is a level 1 monster here. >

When 'f' is typed (as a command to fight) it subtracts a random amount of health from the monster depending on the range of damage your character can do

Your attack dealt 1 damage to the monster The monster dealt 2 damage. The enemy has 1 hp You have 2 hp >