This repo is designed to give new students of the Java programming language practice using basic programming concepts, all while they develop the classicly fun game Space Invaders.
*I've verified that this code works on Windows machines. It should run on other operating system too, but they have not been verified.
If you want to dowload a working copy of this game you will need to have Java Development Kit (JDK) 7 or greater installed on your machine (see step 1 in the setup section below for instructions on how to dowload and install it). Once you have the JDK installed download a working version of this game here (Invaders.jar). When the download is complete double click on Invaders.jar (the downloaded file) to run the game.
Students who use this repo are expected to have previously learned about the following programming concepts:
- Data types. For example,
int
,double
, andString
- Conditional branching:
if
/if else
/else
- Looping:
while
andfor
- Arrays: Creating and indexing. For example,
int[] array = new int[2]; array[0] = 10; array[1] = 20;
- Functions: Students should have learned how to call and write their own functions with and without parameters and return values. For example:
public static int add(int a, int b) {
return a + b;
}
// Add 5 + 6
int sum = add(5, 6);
This repo will ask students to apply the concepts above to create a working version of this game.
(see Setup for more detailed instructions)
- JDK 7 or greater
- Git
- IntelliJ IDEA (or your favorite development environment)
- Install JDK 7 or greater
- Install Git (I like this package -> GitHub for Windows)
- Install IntelliJ IDEA - we use IntelliJ IDEA in my class. Feel free to use the environment that works best for you.
- Create GitHub accounts - each student should have their own GitHub account
- Fork this repo
- If students are in groups only one student from each group should create a fork
- After forking the repo add other members of your group as collaborators
- Clone THE FORKED repo (not the original repo) on your computer - Instructions for cloning in IntelliJ IDEA
Work on issues
Issues can be found here. They should be worked on in order starting at #1. Each issue states the problem, and describes detailed instructions for how to fix it. When code that fixes an issue is pushed to the forked repo students should move on to the next issue.
To better prepare students for issues I've tagged each with two labels:
- Type: bug | enhancement
- bug - an issue in the game that needs to be fixed for the bug to work properly
- enhancement - a bonus feature that will make the game even better
- Difficulty: easy | medium | hard | really hard
- easy - an easy issue to fix
- medium - a medium issue to fix
- ...and so on...