Inspiration

I wanted to better the world by making a game that raised awareness for pollution and showed ways to help prevent it.

What it does

In this game there are 6 rounds with different kinds of pollution "enemies" with different amounts of health. The user is prompted to use an attack to try and eliminated the pollution using real world ways they can limit pollution that do different amounts of damage.

How we built it

I worked alone on this project and I coded this project through BlueJ. I created two classes that weren't main to be a template for pollution enemies and the attacks the player could use. I used a Scanner object to take user inputs to execute the proper attacks on selected targets.

Challenges we ran into

I had trouble with creating the pollution class and properly adjusting the health to keep track of damage and finding out when it dies. Also, when I tried to use the Scanner to find a target selected from the player, it wouldn't read the line properly causing it to crash sometimes.

Accomplishments that we're proud of

I was able to fix the health problem for the pollution class by using proper getter and setter methods to adjust the instance variables from outside the class allowing me to use it in the main class. To fix the Scanner issue, I changed the way it read the line by changing the method used in the code.

What we learned

I learned more about how the Scanner object in Java works and I also learned how to create a fighting game with attacks and enemies.

What's next for Pollution Punch

I plan to continue to update the game to include more features and more rounds to continue the growth of the game.

Built With

Share this project:

Updates