-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |