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

Happy Cubes

Ok. So it didn't take too long to make a Cube class, and I'm pretty happy with it. It includes a list of colors that the cubes' tops can be and a variable that indicates which of those colors is there. The Cubes look pretty good (more after the jump):


(Looking at this picture, I wonder whether the cubes are too tall - comments welcome.)

I've also put these into a two-dimensional list, of sorts: the variable listOfCubes is actually a list of rows, each of which is a list of Cubes on that row. This way, if I need to access a specific cube at a certain position on a certain row, I can do so easily. The next step is to get Qbert to appear and jump around on the cubes - that should be more of a challenge!

No comments:

Post a Comment