Skip to content

srs1234peng/Tamagotchi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tamagotchi Program

Description

Tamagotchi is a simple java application which simulates the life of a virtual pet. It is a virtual pet that you can feed, play with, and put to sleep. It will also get sick and die if you don't take care of it.

Features

  • Feed: Keep your pet well fed to ensure that it doesn't die of starvation.
  • Play: Play with your pet to keep it happy.
  • Sleep: Put your pet to sleep to keep it well rested.
  • Clean: Clean your pet to keep it from disease.
  • Get sick: If you don't take care of your pet, it will get sick and die.
  • Age: Your pet will grow older as time passes.

How to get started

To run the Tamagotchi program, you will need to have Java installed on your computer. Make sure that you have the latest version of Java installed.

You can either run the Tamagotchi.jar file or compile the source code yourself.

Once you have the program running, you will be able to see the current need and the age of your pet. You can then choose to feed, play, sleep, or clean your pet.

If you don't take care of your pet, it will get sick and die.

Your pet will also grow older as time passes. But the time passes faster than real time. And to make this game more entertaining, you can choose to switch the pet age status to baby, adult, or senior. Remember that the need of pet of different age status will change to different speed.

How to Use the Program.

You can choose to interact with the pet by feeding, cleaning, putting the pet to sleep or playing with the pet. Simply hit the corresponding button to pick the action you want to take. Pay particular attention to the parts that are not part of the example runs that you provided.

Design/Model Changes.

Compared to the earlier design document, I have made the following changes: To make the program more user-friendly, I have added a GUI to the program. I have also added a new feature to the program, which is the age of the pet. The pet will behave differently at different ages.

Assumptions

  • The program will not exit until the pet dies. (Please don't be so cruel to leave your pet alone!)
  • The user will not choose to exit the program.
  • If the need value falls to 3, the program will pop up a warning message to remind the user to take care of the pet.
  • If the need value falls to 1, the pet will die.

Limitations

  • The program will not exit until the pet dies.
  • The program offers only 1-time play. It cannot record the data of the pet and allow the user to reenter after exiting the game, as the classical Tamagotchi allows to.

Contributing

If you'd like to contribute to the project, please follow these steps:

Fork the repository.

Create a new branch for your feature: git checkout -b feature-name.

Make changes and commit: git commit -m "Add new feature".

Push to the branch: git push origin feature-name.

Submit a pull request.

Acknowledgments

Inspired by the classic Tamagotchi virtual pet toys. Special thanks to Professor Lino for guidance.

About

Final Project for 5004 Object-Oriented Programming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages