Pen Lab
Brick Lab
Storyboard:
We will make a program that draws varying colors depending on where on the page we are actually drawing.
We will make a program that will draw a brick wall with varying numbers of rows.
Logic:
We will use the forever loop, if statements, and pen color blocks.
We made some custom blocks that resulted in a Boolean variable, including one that decides if a number is even. We also made custom pen blocks that made bricks and rows of bricks
Steps:
Started with a forever loop, then started tracking the mouses position. Sprite always went to the mouse’s position and if statements for the mouse position would cause the sprite to change pen color.
We made the custom brick blocks first, then strung all of them together with a green flag block. At the end we made the sprite ask how many rows the user wanted.
Problems:
We had some issues with the speed of the tracking for the mouse. Snap just isn’t the fastest thing in the world.
The last half-brick was set up oddly, so we had to change the code a bit so that the end result would actually resemble a wall.
SNAP: