claban3/BrickBreaker — pull request #1 by kelaban (2014-06-03 02:31:37+00:00)
Title: Added tests and started implementing a Brick class

So this is how git works collaboratively. I can do some cool thinks like **fork** your repo. Once I do that I get my own copy of the project and can make any changes I want. Once I am done with those I can submit a **pull request** to you. At this point you can look at my changes and decide if you want them to be back in your project. If you don't trust me you can go into a new folder on your computer and on the command line type `$ git clone https://github.com/kelaban/BrickBreaker.git` to get my version. After that you can open it up in eclipse and check out my changes and make sure everything still works.

I added some little things here, but didn't touch your `Main.java` file at all, we can do that together, so it still behaves as normal. I just added some things that we can use later. What I added:
- `src/test` and `src/main`
- `test` is where tests go
- `main` is where the rest of your code goes
- `main.board` is a new package
- packages are not required but they help to keep things organized
- we will put all of the board components in this package
- `test.board` similar to `main.board` but this is where all the test will go for the classes we put in `main`. The structure of `test` and `main` should be kept the same.
- `Brick.java` is the class that will contain all of the logic for a brick element, right now it has two important methods
- `intersects` will check if it has been hit by a ball
- `doHit` will mark this brick as destroyed
- `BrickTest.java` all tests are the name of the class with "Test" after it
- this has one test method `intersect_test` which checks that a collision is detected at all 4 corners of the square
- This may sound stupid, but it's also very useful to check that it is **not** a collision when the ball isn't near it. I'll let you figure out that test for yourself

Once you are done with looking over my changes and are convinced that this is what you want in your project you can hit the button below that says "Merge Pull Request". That will take all the changes you see here and put it in your project. At that point go to the folder of your project in terminal and type `$ git pull origin master` and that will bring in the new changes from the merge.

Play around with all of this stuff and let me know later in the week if you want to work on it.