Courses‎ > ‎APCS - Term 1‎ > ‎Konstantinovich‎ > ‎

2019-05-07 Day2 GroupLab

posted May 7, 2019, 6:21 AM by Konstantinovich Samuel   [ updated May 7, 2019, 8:01 AM ]
Read All directions. Failing to follow the instructions will result in not recieving credit, nor the option to have extra time to work on the assignment. 

FIRST
1 - Everyone open their ProcessingLab. When I come by I will see what you did.
2 - Resolve your merge conflicts as a group from yesterday's lab.
3 - Share your repo's address: https://forms.gle/v18yRjYibrFuBtBW7

SECOND:
This is a dual PAIR programming activity.
Only 2 people per group will be typing, one per side of the table.
Make regular commits, and always pull before committing so you can merge changes.

Add onto your lab from yesterday:
-Read all of the tasks.
-Break down the task so that each pair of programmers have clear goals.
-You should swap who is typing every 10 minutes or so. Start with the person on the LEFT as the person typing. I will enforce swaps based on left/right.

GIT README:
0. In your git readme indicate
-Which individuals are responsible for code written independantly (Yesterday)
-Which pair worked on what code today. (Update over time as you do things)
-Any help/outside sources

ROCK CHANGES
1. Make the rock use an image of a rock.
    -Loading an image file into a PImage takes time, you should only do this once per image. When many copies of the image are needed: load the image once, and pass the reference to it into the rock constructor.
2. Each Rock chooses between 2 different image files randomly upon construction.

LIVING ROCK CHANGES
3. Make the living rock draw eyes on top of that image.     
    -DO NOT write redundant code. Discuss with the group how to do this.

GENERAL CHANGES
4. Make an interface Collideable with a single method:
    boolean isTouching(Thing other)

How to check if a single thing is touching any of the collideables:
ball b = new Ball(100,100);
for( Collideable c : ListOfCollideables) {
   if ( c.isTouching(b){
        // do something to the ball
    }
}
5. Add all Rock + LivingRockto the list of collideables.

BALL CHANGES
OPTIONALLY: It makes sense to have instance variables for xspeed and yspeed.
6. Do not use random colors every frame. This is silly. Store a random color and use that all the time.
7. Put bounce code in your Ball so they stay on the screen by bouncing off the walls, try adding a little bit of randomness to the bounce.
8. As long as a ball is  colliding with any Rock it changes color to red / (or mostly red). It reverts back to normal color when it is no longer touching.
9. Make 2 subclasses of ball, each with a different style of movement/colliding.
    Suggestions:
    -make them bounce differently,
    -change to different colors when colliding (red vs blue)
    -change the visuals so they look a little different.

SETUP CHANGES
10. Modify the setup to change the ball creation. Create half as one of the subclasses, and the other half should be the other subclass.

 

Comments