Welcome to "The Sims" project, a Java-based text simulation game inspired by the popular life simulation video game series "The Sims". In this project, you can create and control virtual characters, known as Sims, as they go about their daily lives in their virtual homes. The project focuses on implementing various design patterns to enhance code organization and maintainability.
This project was done while study in Mindswap Code Academy - Backend Bootcamp.
"The Sims" project is a Java-based text simulation game where you can create and manage virtual characters, or Sims, and their virtual homes. Your Sims have various needs and skills that you must attend to, and you can interact with furniture in different rooms and divisions of the house.
This project offers the following features:
-
Sim Management: Create and customize your Sims, defining their gender, name, and other attributes.
-
Home Ownership: Buy and own a house where your Sims can live and thrive.
-
Skills Improvement: Help your Sims improve their skills in areas like Programming, Fitness, Logic, Cooking, and Herbalism.
-
Needs Management: Monitor and fulfill your Sims' needs, including Bladder, Energy, Fun, Hunger and Hygiene.
-
Housekeeping: Call a housekeeper to clean your house as the cleanliness of your house decreases over time.
-
Interactions: Interact with furniture and objects within the house's divisions to meet your Sims' needs and improve their skills.
-
Terminal Interface: Use menus and commands in the terminal to navigate and interact with the game.
This project is a showcase of software design patterns, enhancing code structure and maintainability. The design patterns used include:
-
Builder: Used for Sim creation and menu definition.
-
Strategy: Implemented for menu type determination and stamina consumption management.
-
Command: Employed for menu actions and interactions with furniture.
-
Abstract Factory: Used for creating skills and commands based on the current menu.
-
Composite: Implemented for managing divisions and furniture within a house.
-
State: Utilized for managing cleanliness levels of the house and skill progression of Sims.
-
Singleton: Implemented for efficient file management, reducing file read times.
To play "The Sims" project, follow these steps:
-
Clone the repository to your local machine (See Installation).
-
Compile and run the game using your preferred Java development environment.
-
Follow the on-screen instructions and use terminal commands to create and control your Sims, manage their needs, and interact with their virtual homes.
To install and run the project, you'll need a Java development environment installed on your machine. Here's how to get started:
- Clone the repository:
git clone https://github.com/andrecastrosousa/the_sims
- Navigate to the project directory:
cd the_sims
- Compile and run the game using your Java development environment.
Once the game is running, you'll be presented with a terminal-based interface where you can create and control your Sims, interact with their homes, and manage their needs and skills. Follow the on-screen prompts and use commands to navigate and play the game.
You can save your game progress and load previous saved games. Simply follow the in-game instructions to save your progress and use the appropriate command to load a saved game when starting the game.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to reach out to the author with any questions or feedback related to the Java implementation of the project.
Enjoy playing "The Sims" Java project and have fun managing your virtual world!