Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
End-Us3r authored Feb 13, 2023
1 parent 6c7dcc0 commit e453a0a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# reimagined-happiness

Text-based interactive fiction game
This code is an adventure game that allows the player to move between different locations and make choices that affect the outcome of the game. The game is started from the 'main' function, which outputs a welcome message and prompts the user to start the game. The player starts in the 'field' location, and can choose to move to the 'home' or 'forest' location. From 'home', the player can choose to move to the 'forest' location or retrieve a 'sword' item. From 'forest', the player can encounter a 'bear' event or move to the 'mountain' location. From 'mountain', the player can choose to move to the 'home' or 'cave' location. From 'cave', the game ends with a final message.

I started this project a couple years ago for a school assignment, I decided to return to this project because I've always wanted to see where I could go with this.
The code uses various functions to represent the different locations and events in the game, including 'field', 'home', 'forest', 'mountain', 'cave', and 'bearAttack'. The code also includes a boolean variable 'hasSword' that tracks whether the player has retrieved the sword item or not.

The code uses the Sleep() function from the windows.h library to pause the output for a specified amount of time, creating a more immersive experience for the player. The code also uses the cin function to get input from the player, and includes error messages and recursion to ensure that the player inputs valid commands.

0 comments on commit e453a0a

Please sign in to comment.