Wednesday, May 14, 2014

Tricky


The Mario assignment for JHarvard is trickier than the straight pyramid below. Clearly,
the top step has two tiles, so one will need to start the row count at two and end up
with n + 1 numbered rows.

But there is worse. The standard code in such matters ends up defining two independent
squares that slide over one another. The total space is not a square at all but a rectangle.
To justify left - as per the assignment - one needs to make the spaces loop loose a column.
Tricky!!



No comments: