Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Turtle Runner - CPSC 233 (T02)
## 🚀 About the Project
This is a simple obstacle-dodging game designed for **CPSC 233: Intro to Computer Science Majors II** in **Derek's tutorial (T02)**. (Assignment 1) The goal is to help students practice **object-oriented programming** by implementing missing methods in a pre-built game framework.
## 📜 Important Notice
- This project is **ONLY** for students in **CPSC 233 (T02)**.
- **DO NOT redistribute** this code outside of the class.
- Sharing this code **violates academic integrity policies**.
---
## 🏃 How to Play
Control your turtle to avoid obstacles as long as possible!
### 🎮 Controls
- **Arrow keys**: Move the player left and right
- **Avoid obstacles**: If you collide with an obstacle, the game ends
---
## 🛠️ How to Run the Code
### 1️⃣ **Clone the Repository**
Run the following command in a local directory:
```
git clone https://csgit.ucalgary.ca/derek.atabayev/endless-runner-game.git
```
### 2️⃣ **Running the Game**
#### Using an IDE (IntelliJ, Eclipse, or VS Code)
1. **Open the project** in your Java IDE.
2. **Ensure `assets/` folder** (containing `player.png` and `obstacle.png`) is inside the project directory.
3. **Run `EndlessRunner.java`** from your IDE.
#### Using the Command Line
1. Open a terminal and navigate to the project folder.
2. Compile the game:
```
javac EndlessRunner.java
```
3. Run the game:
```
java EndlessRunner
```
---
## 📌 Notes for Students
- The **UI code is already implemented**.
- Your task is to **complete missing methods** in `Obstacle.java`, `Player.java`, and `GameLogic.java`.
- **Ask questions in tutorial** if you need help!
Happy coding! 🎉