CS4ProgrammingWeek13

From GIS CS4
Jump to: navigation, search

Continue Khan Academy programming using Java Script https://www.khanacademy.org/cs

Monday

  • Project: Rock-Paper-Scissors

Tools Classes

Object Oriented Programming

Tuesday

  • Pop-Quiz!


Thursday (Lab)

Refine Tool.getToolHit(zx, zy) method

Refine the Tool.getToolHit(zMouseX, zMouseY) method such that it detects a hit within the circle.

Hint:

  • Use Pythagorus theorum (hypotoneuse^2 = x^2 + y^2).
  • The radius of the Tool circle background is TOOL_WIDTH/2. This is the hypotoneuse of the triangle.
  • The length of the horizontal leg of the triangle x = (Tool.x - zMouseX).
  • The length of the vertical leg of the triangle y = (Tool.y - zMouseY).

Complete Rock-Paper-Scissors

Rock-Paper-Scissors 2

Rock-Paper-Scissors 3

Complete Rock-Paper-Scissors

Rock-Paper-Scissors 2

Rock-Paper-Scissors 3

Technology Friday