Tetwiis Update (part 2)

I’ve now finally sorted out my pointers/references and I’ve got to the point where I have the code which draws the tetrinos.  A screen shot (photo of the TV!) showing the test of this code is below.

Next thing to do is to code the rotate functions for each of the block types so that I can spin this around, and then start on the moving code!  The blocks are currently just rectangles (squares!) right now but the code is abstracted enough so that I can swap the rectangle drawing routine for an image drawing routine to pretty things up once it all works!

tetwiis wip

So far I have coded, ignoring the main class the following classes for the game:

  • Point (X,Y coords)
  • Color (u32 color)
  • Size (width/height)
  • Square (single square within a …)
  • Block (tetrino – all made up of 4 squares)
  • Main (currently tests the blocks/square code)

Updated post – I’ve now coded the rotate functions for all of the block types and they all rotate correctly.  The game field and movement code is next!

Leave a Reply

Your email address will not be published. Required fields are marked *