A simple text-based two-player water gun game implemented in Java.
In this game, two players take turns choosing actions: filling their water guns or shooting each other. The game continues until one of the players runs out of water.
- Two-player game with basic actions: Fill water gun and Shoot.
- Random water shot amounts between 0 and 20.
-
Clone or download the project to your local machine.
-
Compile and run the game using a Java development environment or command line.
-
Follow the on-screen instructions to play the game.
-
Players can choose to "Fill water gun" (action 1) to restore their water or "Shoot" (action 2) to shoot the other player with a random water amount.
Welcome to the Water Gun Game!
Enter Player 1's name: Alice
Enter Player 2's name: Bob
Alice's water: 100
Bob's water: 100
Alice, choose an action (1: Fill water gun, 2: Shoot): 2
Alice shot Bob with 9 water!
Alice's water: 100
Bob's water: 91
Bob, choose an action (1: Fill water gun, 2: Shoot): 1
Bob filled their water gun.
Alice's water: 100
Bob's water: 100
Alice, choose an action (1: Fill water gun, 2: Shoot): 2
Alice shot Bob with 15 water!
...
Bob is out of water. Alice wins!