Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.46 KB

README.md

File metadata and controls

42 lines (27 loc) · 1.46 KB

Java 2D Game

This repository contains a simple 2D game implemented in Java. The game features a player controlled character navigating through enemies to reach the end.

record_2024-04-26_14-46-23.2D.game.mp4

Game Overview

The game consists of several classes:

  1. GameFrame: Initializes the game window and sets up the game board.
  2. Board: Represents the game board where all game elements are drawn and updated.
  3. Player: Defines the player character and its behavior.
  4. Enemy: Represents the enemies in the game and their behavior.
  5. Sprite: Abstract class for common properties and behaviors shared between player and enemies.

How to Play

  1. Controls:

    • Use the right arrow key to move the player character to the right.
    • Use the left arrow key to move the player character to the left.
  2. Objective:

    • Navigate the player character through the enemies to reach the end of the game board.
    • Avoid collisions with enemies to prevent game over.

Installation

To run the game locally, follow these steps:

  1. Clone this repository to your local machine.
  2. Ensure you have Java Development Kit (JDK) installed.
  3. Open the project in your preferred Java IDE.
  4. Run the GameFrame.java file.

Contributors

License

This project is licensed under the MIT License - see the LICENSE file for details.