I changed it to use a main class for the whole board.
The class contains a 2-dimensional array of booleans. This lets me access a specific cell from a coordinate like pygame’s coordinates, where x goes right and y goes down, as shown in the picture attached.
I also changed the draw function to be much more versatile. First, I am now using the rectangle function, which will let me color specific cells much easier. Also, I have some future customizability options with the colors of the borders, as well as either state of the cell.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.