Week 7 – Personal Discovery

So at this point I’ve decided to continue working on the chess program I’ve been writing in Python as my final project for Interactive Media.  I started the game last semester as a way to get more practice writing Python and work on classes, which was beyond the scope to that class.

I met with my Laurie, my instructor from last semester, to go over my code and give me suggestions on how I can streamline and make improvements.  Her first suggestion involves the way the classes are organized.  Currently I have a Player class, which contains the interactive aspects, a Board class, which contains information about where pieces are located, and a Piece class, with subclasses for the various pieces.  Laurie suggested that I add an over arching Game class which would control interaction between pieces, players and the board, as well as keeping track of turns.

So I started rearranging some of the classes and methods, and got hung up for about an hour fighting with the graphics library that doesn’t want to draw the board now.  Sigh… such is the wonder and glory of OOP.  I remember getting the TypeError: class requires exactly (number of) positional arguements with a self defined class, but I can’t remember how to fix it.

Post a Comment

Your email is never published nor shared. Required fields are marked *