Welcome to the Game Library! This Java program is a collection of eight different games, each offering a unique and entertaining experience. Whether you're looking to challenge your mind or just have some fun, you'll find a game that suits your mood.
- Tic-Tac-Toe
- Ping Pong
- BattleShip
- 2048
- Snake
- Tetris
- Connect 4
- Space Invaders
- Java Development Kit (JDK) 8 or higher: Ensure you have JDK installed on your system.
- IDE (Integrated Development Environment): Recommended IDEs are IntelliJ IDEA, Eclipse, or NetBeans.
- Clone the repository:
git clone https://github.com/hsna674/FinalProject.git
- Navigate to the project directory:
cd FinalProject
- Open the project in your preferred IDE.
- Navigate to the
GameLibraryDriver.java
file located in thesrc
directory. - Run the
GameLibraryDriver.java
file.
If you prefer running the program from the command line:
- Navigate to the
src
directory:cd src
- Compile the Java files:
javac GameLibraryDriver.java
- Run the compiled program:
java GameLibraryDriver
Upon launching the Game Library, you will be presented with a menu to select one of the eight games. Use the corresponding number to choose a game and follow the on-screen instructions to play.
- Tic Tac Toe: Click in the place where you want to place your piece
- Ping Pong: Use the
W
andS
keys to move Player 1 and theUp
andDown
arrows to move Player 2 - BattleShip: Click cells to attempt to sink the 2 ships.
- 2048: Use the arrow keys to move the board around.
- Snake: Use the arrow keys to move the Snake around and eat the "Apples", which are red dots.
- Tetris: Use the
Left
andRight
arrow keys to move the pieces left and right. Use theUp
key to rotate the pieces. - Connect 4: Click on the button above the column where you want to drop your piece.
- Space invaders: Use the
Left
andRight
arrow keys to move the player left and right. Use theSpace bar
to shoot projectiles at the aliens.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Special thanks to the open-source community for providing the tools and libraries used in this project.
Enjoy the games!