This Project was developed by Abdelrahman Mohamed Hamad
A console-based simulation game where players can adopt and take care of a virtual pet, ensuring it stays happy and healthy.
The Pet Adoption Game is a C++ console application that allows users to adopt a pet and take care of it by feeding and playing with it. Players can check their pet's status to monitor its hunger and happiness levels. The game ends if the pet's needs are neglected for too long.
- Adopt a Pet: Choose a name and start caring for your virtual pet.
- Feed Pet: Increase your pet's hunger level to keep it satisfied.
- Play with Pet: Boost your pet's happiness by playing with it.
- Check Status: Monitor the pet's hunger and happiness levels to ensure it stays healthy.
- End Game: Safely exit the game and see your pet's final status.
- C++ Compiler (e.g., GCC, Clang, MSVC)
- CMake (Optional, for building the project)
-
Clone the repository:
git clone https://github.com/Abdelrahman822000/Pet-Adoption-Game.git cd Pet-Adoption-Game
-
Build the project:
g++ main.cpp Pet.cpp Operations.cpp -o Pet.exe
-
Run the Program:
./Pet.exe
-
Start the Game:
- After running the
Pet.exe
executable, follow the on-screen instructions to adopt a pet. - Choose actions from the menu to feed, play with, or check the status of your pet.
- Ensure that your pet's hunger and happiness levels above critical thresholds to keep it alive.
- After running the
-
Game Operations:
- Adopt Pet: Select this option to name and adopt a pet.
- Feed Pet: Choose this to feed the pet and increase its hunger level.
- Play with Pet: Use this option to play with the pet and increase its happiness level.
- Check Status: View the current status of your pet's hunger and happiness levels.
- End Game: End the game and see the final status of your pet.
Pet Adoption Game
1. Adopt Pet
2. Feed Pet
3. Play with Pet
4. Check Status
5. End Game
Choose an option: 2
You need to adopt a pet first.
1. Adopt Pet
2. Feed Pet
3. Play with Pet
4. Check Status
5. End Game
Choose an option: 1
Enter the name of your pet: Roy
Congratulations! You adopted Roy!
1. Adopt Pet
2. Feed Pet
3. Play with Pet
4. Check Status
5. End Game
Choose an option: 2
Roy has been fed.
1. Adopt Pet
2. Feed Pet
3. Play with Pet
4. Check Status
5. End Game
Choose an option: 3
Roy is playing!
1. Adopt Pet
2. Feed Pet
3. Play with Pet
4. Check Status
5. End Game
Choose an option: 4
Roy's hunger: 55
Roy's happiness: 55
1. Adopt Pet
2. Feed Pet
3. Play with Pet
4. Check Status
5. End Game
Choose an option: 5
Game Over.
Roy's hunger: 53
Roy's happiness: 53
Thank you for playing!
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions, feel free to contact me:
- Phone: +201028325749
- Email: a.mohamed822000@gmail.com
- LinkedIn: Abdelrahman Mohamed Hamad