This project is a rewrite of one I posted here. I don't want to show all the code, but I put the zipped files for the project (including the nib file) on the .mac server. The buttons have an image assigned depending on which player chose that square. This is done with bindings, but the buttons are bound individually to variables in the DisplayController, so there is a variable for each button. I've been trying to figure out a way to do this more elegantly, but no luck yet. I used one-based indexing for the board, which accounts for stuff like L = range(1,10). Here is the ugly code for that class:
class DisplayController(NSObject): |