teaching machines

lavaniaj – HW2

March 20, 2015 by . Filed under cs455, postmortems, spring 2015.

I started with creating the magnet struct. The sudo code was easy to follow. After this I focused on getting two rectangles to display and making them different colors. The biggest hurdle with the assignment was figuring out how to color 2 separate rectangles. Once I figured that out all the other things fell into place. The last part I had a bit of trouble with was getting the second magnet to interact correctly when clicked but a simple conditional solved this.

 

lavaniaj - Attracting

lavaniaj  - repel

lavaniaj - together