- Team Members
- Project Purpose
- Features
- Entities
- Installation Instructions
- Usage Guide
- License
- Feedback
- Contribution Guidelines
- Acknowledgements
- Nikita Banetski - Nikita-B05
- Hrithik Shah - hrithik-shah
- Abhi Prajapati - abhi-praj
- Marina Tanaka - marinatedshrimp
The Financial Literacy Game is an interactive and educational experience for players to learn about personal finance and understand its impact on their future. Players guide a character through life stages, making financial decisions that influence metrics such as net worth and happiness. These decisions reflect the age of the character and players can also make decisions outside the main storyline of the game by buying/selling homes and stocks. By simulating real-world financial challenges, the game aims to empower users with practical financial knowledge and decision-making skills.
1. User Authentication:
- Secure sign-up and login system with password validation and appropriate username input verification.
- Unique usernames for each account.
2. Character Customization:
- Select from six avatar options.
- If an avatar is not selected, do not let the user proceed.
- Create a personalized and appropriate character name, verified using the NameAPI. Also accounts for empty name input edge case.
- Updates home page character image and name.
3. Interactive Financial Decision-Making:
- Encounter realistic scenarios requiring financial decisions.
- Accounts for making mandatory decisions.
- Saves user's progress and lets them go back to the home page.
- Decisions impact net worth and happiness.
4. Settings Management:
- Change password feature.
- Dark/light mode toggle.
- Allows the user to log out.
5. Decision Logs:
- View logs of past decisions chronologically and their effects on net worth and happiness metrics.
- Logs are updated in real-time as decisions are made.
6. Winning and Losing Conditions:
- Win by navigating through all decisions without going bankrupt or having happiness hit 0.
- Lose if net worth or happiness drops below zero (they get one extra turn to bounce back though).
- Game resets after a win or loss so that the player can start again.
These are the entities that are stored for the user.
name
: Stringpassword
: StringisDarkMode
: booleancharacterName
: Stringage
: intavatar
: Avatarhappiness
: intsalary
: intassets
: Assetsliabilities
: Liabilitiesdecisions
: List<HashMap<String, Decision>>questionBank
: Map<Integer, Question>
These are the entities that are stored for the user's avatar/character.
id
: StringimagePath
: String
These are the entities that are stored for the user's character assets.
home
: doublestocks
: ArrayListcash
: doublecar
: double
These are the entities that are stored for the user's character liabilities.
loan
: doublecreditCard
: double
These are the entities that are stored for the user's character stocks.
stockCode
: Stringquantity
: intbuyPrice
: doublemultiplier
: double
These are the entities that are stored for the user's decisions.
age
: intdecisionText
: Stringresponse
: StringnetWorthChange
: doublehappinessChange
: intsalaryChange
: double
age
: intquestionText
: Stringdecisions
: List<Decision>selectedDecision
: Decision
To install and run the Financial Literacy Game, ensure that you are on Mac or Windows and follow these steps:
1. Install Maven:
Ensure that you have Maven installed on your system. You can download Maven from
here, or you can run the following command in your terminal:
mvn clean install
2. Clone the repository from GitHub on any operating system:
git clone [repository-link]
cd [repository-folder]
3. Check Configuration:
To ensure that the game runs, you need to check that your settings are configured correctly.
- Check that you have Java installed on your system.
- Ensure that you are using Java version 11 or higher.
- Use SDK: "corretto-22" (Amazon Corretto 22.0.2 - aarch64).This can be selected by going to "File" -> "Project Structure" -> "Project" and then seek for the "SDK" dropdown and select it. If you don't have it installed, you can select the download SDK option in SDK selector and get it from there.
4. Retrieve and add all API Keys:.
To make the program run, you need to add all the API keys. To do this, create a config.properties file in the
repository folder and add the following API keys from these websites...
-
Polygon API:
To add the Polygon API key (Stock API), navigate to https://polygon.io/ and simply select 'Create API Key' on their home page and sign up/log in, and retrieve your API key there and add it to your config.properties file.polygonApi.key=[YOUR_API_KEY]
-
Name API:
To add the Name API key, navigate to https://nameapi.org/ and simply select 'Get API Key' in the top right corner of the website and input your email to make an account and receive your custom API key.nameapi.key=[YOUR_API_KEY]
-
MongoDB API:
To add the MongoDB API key, navigate to https://www.mongodb.com/ and simply select 'Try Atlas for free' on their home page and sign up/log in. Now, in order to make a connection to the MongoDB database, you need to create a cluster and retrieve the connection string for it. If you do not have any clusters created, navigate to either the "Create" button to create a new cluster or check your "All Clusters" section in case you have an unused free cluster.Once you create a cluster, or if you already have one, click the "Connect" button.
Next, click the "Drivers" selection under "Connect to your application."
Next, ensure that you driver is Java 5.1 or later and then copy your connection string in the blue box, as shown in the image below. Make sure to change your dbpassword to the password for your database username.
Once all is done. Take this API key and place it in your config.properties file and add the two lines below it as well.
mongo.uri=[YOUR_API_KEY] mongo.database=mydatabase mongo.collection=users
Once all required software has been installed, run the game by opening the Main.java file in the following directory:
src/main/java/app/Main.java
It should start the game as shown below:
This project is licensed under the MIT License.
In short, this means that you are free to use the code in any way you'd like, subject to the fact that the Software is provided "as is", without warranty of any kind, express or implied (see MIT License for more details).
If you would like to provide feedback, please complete and submit our Google form.
We welcome contributions to the Financial Literacy Game! Whether you are fixing bugs, improving documentation, or proposing new features, we encourage collaboration to make this project better. Please follow these guidelines when contributing:
1. Report Issues:
- If you encounter a bug or have a feature request, open an issue in the GitHub Issues section. Please include a clear description, steps to reproduce (if applicable), and screenshots (if relevant).
2. Fork and Clone the Repository:
- Fork the repository to your GitHub account.
- Set the upstream remote to sync changes from the main repository.
3. Create a Branch:
- Use descriptive names for your branches:
4. Write Clean and Clear Code:
- When coding, please follow SOLID design principles and clean architecture.
- Ensure your code is well-documented and easy to understand.
6. Test Your Changes:
- Ensure your changes do not break existing functionality.
- Add appropriate unit tests to validate your contributions.
- Run existing tests to ensure nothing else is broken.
1. Create a Pull Request:
- Push changes to your forked repository and open a pull request to the main branch.
- Provide a clear description of changes and their purpose.
- Ensure your pull request:
- Passes all tests.
- Is free of merge conflicts.
- Is reviewed and approved by at least two maintainers.
2. Commit Message Format:
- Use descriptive commit messages such as: "Added a cancel button to the avatar selector page."
3. Review and Feedback:
- Reviewers may request changes or tests. Address these promptly.
4. Merge Protocols:
- Approved pull requests will be merged by a maintainer. Contributors should not self-merge.
Thank you for looking through our project! We hope you find it useful.