Road Signs, Medium
Each of these road signs is worth 14 points.
- Solution from Andrew
Notice that the rectangles are drawn from the centre and that the same sequence is used
You can use a combination of translate and rotate to put the rectangles in place.
Of course you can change the value of
countDown to 1 or 2 or 3.
- The blue rectangle is 130 by 230
- The white rectangles are 116 by 20
- The white rectangles are at an angle of 0.502 radians.
- The white rectangles are 50 apart vertically.
- Solution by Andrew
Notice that we re-use the code for the arrow and the T by creating a method.
Try to avoid repeating code - you can use variables or methods to repeat a shape.
No Traffic Lights
- By Andrew
Notice that we pass as parameters the things that are different about the three disks. The disks are identical apart from the color and the position and so we pass color and x,y as parameters.
No traffic lights.