This repository contains a simple two-player tank game implemented in Java using the Swing library. Players control their tanks using keyboard input, attempting to shoot each other while avoiding obstacles on the map.
- Tank movement using keyboard input
- Shooting mechanics
- Obstacles on the map for added challenge
- Customizable player names and tank colors
- Clone the repository to your local machine.
- Open the project in your preferred Java IDE.
- Locate the
Main
class. - Run the
Main
class within your IDE. - Enter player names and customize tank colors in the start menu.
- Use keyboard controls to move and shoot.
- Avoid obstacles and try to shoot the opponent's tank.
- Download the
spusti.jar
file. - Double-click on the
spusti.jar
file to run the game. - Enter player names and customize tank colors in the start menu.
- Use keyboard controls to move and shoot.
- Avoid obstacles and try to shoot the opponent's tank.
Note: Ensure you have Java installed on your machine. If you encounter issues, make sure to check your Java installation or run the JAR file from the terminal/command prompt.
This program was created as a learning exercise and is not intended for production use. However, if you would like to contribute to the project, feel free to submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for more information.