Welcome to my Programming Blog...

I am currently working on a couple of projects: An original game called "Implosion" which I am porting from Flash to the iPad, and a remake of Q*bert in Python (pygame), as part of the class I am teaching. Please feel free to use the "Labels" (at right) to follow a specific project or theme. If you are one of my Python students, I recommend that you check out the Python thread.

Tuesday, April 20, 2010

Cube Thinking

So I drew a picture of some cubes, and I added some numbers to them in a somewhat systematic way.
(The first number is which row, and the second number is the location within the row. Since I'm a computer guy, everything starts at zero.)




And I notice a few things: (more after the jump)



  • Moving up and to the left means a change of (-1,-1).
  • Moving up and to the right means a change of (-1,0).
  • Moving down and to the left means a change of (+1,0).
  • Moving down and to the right means a change of (+1,+1).
and also:
  • If you are on a row number greater than the number of rows, you've fallen off the bottom of the pyramid.
  • If you are on a row position number less than 0, you've fallen off the left side of the pyramid.
  • If your row position number is greater than your row number, you've fallen off the right side of the pyramid.

Understanding these rules should make it much easier for me to navigate the pyramid!

No comments:

Post a Comment