2006-03-15

Changing the game: I

Step 1: First I enumerated the various constants (enum), the upper and lower limits to the size of the board and some delimiters for drawing the board (border, rectangle size, and space between). The lowest limit I chose for the board size was 3 (for a 3-by-3 cell board) and the upper was 7. At this time the constants for the upper and lower limits for the colours the game uses can also be added.
I would recommend using the lower limit to initialize the board size's static variable.

Step 2: Add the appropriate menu items. I went for 'Preferences'->'Size' ->[ 3x3,4x4,5x5,6x6,7x7]. Then the event handlers and update handlers can be added to the Document class for these menu items. The update handlers will allow the program to checkmark the right menu item. (I will go into this later.) The menu items for the number of colours can also be dealt with at this point.

No comments: