[阅读原文]
Sometimes Kids Just Need More Help
Angie finished her homework which was drawing the game board. Everything is good so she was provided her first challenge: centre the board horizontally on the blue canvas. She knew how to move the grid left and right, but couldn’t find the right formula that worked. Her best try got left margin the hardcoded value 200 which looked pretty good. However she seemed unable to move on with a solution.
I made a screenshot and pasted onto TextEdit, trying to explain further. With the width of canvas 736 and the width of the grid 320 marked up in red, Angie calculated with pencil and paper and got a = 208.
“Where does your 208 come from, Angie?”, I asked. She typed the following.
(736 - 320) / 2
...
[阅读原文]