# CS Discoveries 2018

## Unit 3 - Interactive Games and Animations

### Lesson 3: Drawing in Game Lab

• ``` fill(color) ```
• ``` ellipse(x, y, w, h) ```
• ``` rect(x, y, w, h) ```

### Lesson 4: Shapes and Randomization

• ``` background(color) ```
• ``` ellipse(x, y, w, h) ```
• ``` rect(x, y, w, h) ```
• ``` randomNumber() ```

### Lesson 5: Variables

• ``` Declare and assign a value to a variable ```
• ``` Declare a variable ```

### Lesson 6: Sprites

• ``` drawSprites(group) ```
• ``` var sprite = createSprite(x, y, width, height) ```
• ``` sprite.scale ```

### Lesson 7: The Draw Loop

• ``` function draw() { } ```
• ``` World.frameRate ```

### Lesson 11: Booleans and Conditionals

• ``` If statement ```
• ``` Equality operator ```
• ``` Inequality operator ```
• ``` Greater than operator ```
• ``` Greater than or equal operator ```
• ``` Less than operator ```
• ``` Less than or equal operator ```

### Lesson 12: Conditionals and User Input

• ``` keyDown(code) ```

### Lesson 13: Other Forms of Input

• ``` keyWentDown(code) ```
• ``` keyWentUp(code) ```
• ``` mouseDidMove() ```
• ``` mouseDown(button) ```
• ``` mouseWentDown(button) ```
• ``` mouseWentUp(button) ```
• ``` sprite.visible ```
• ``` If/else statement ```

### Lesson 15: Velocity

• ``` sprite.rotationSpeed ```
• ``` sprite.velocityX ```
• ``` sprite.velocityY ```

### Lesson 16: Collision Detection

• ``` sprite.isTouching(target) ```
• ``` sprite.debug ```

### Lesson 18: Collisions

• ``` sprite.bounce(target) ```
• ``` sprite.bounceOff(target) ```
• ``` sprite.collide(target) ```
• ``` sprite.displace(target) ```
• ``` setCollider(type, xOffset, yOffset, width/radius, height, rotationOffset) ```
• ``` sprite.bounciness ```

### Lesson 19: Functions

• ``` Define a function ```
• ``` Call a function ```