Presenter: Alexa M. James
Group Members: Israa Touaiher
Faculty Sponsor: Ali Al-Faris
School: Worcester State University
Research Area: Computer Science
Session: Poster Session 2, 11:30 AM - 12:15 PM, 163, C6
ABSTRACT
In this game, players are attempting to keep their mutant pet alive by playing games, earning money, giving affection, buying clothes and food, and even treating their pet’s tumors. Players can also view their wallet, check high scores through the leaderboard, and view all of the items they have bought.
This project aimed to familiarize and adapt Java data structures like HashMaps, Stacks, and ArrayLists, as well as algorithms like searching and sorting, to create a digital pet with an easy and fun user interface. We also incorporated vibrant text boxes and ASCII art with JavaFX to make the UI more interactive and interesting.
To create this game, we had 5 classes, including the pet, shop, item, leaderboard, and game classes, as well as methods and constructors. These classes helped us stay organized and make the code more intuitive and easier to edit and maintain. For instance, our pet class has the feed and clothes methods, which allow players to buy food and clothes to add to their pet’s pantry and closet. The caress method allows players to show affection for their pet, which improves health and happiness. The check alive method checks that the health, happiness, and wallet stats are above 0. If any of these stats are 0, the pet will die, and the game will exit. The decay method lowers the health and happiness stats throughout the game. And finally, the showstats method displays the pet’s happiness, health, name, and wallet.