Making drawing board-oriented stuff a bit easier.
import pygame as pg
from pygame_board import Board, MyRect
# set size of board which is measured in cubes.
BOARD_HEIGHT = 5 # five cubes high
BOARD_WIDTH = 5 # five cubes wide
CUBE_WIDTH = 100
# init pygame:
pg.display.init()
screen = pg.display.set_mode([BOARD_WIDTH*CUBE_WIDTH, BOARD_HEIGHT*CUBE_WIDTH])
# Generate your board:
my_cube = MyRect(size=(CUBE_WIDTH, CUBE_WIDTH), colour='purple') # rect object for the cubes that make up the board.
my_board = Board(screen, position(0,0), size=(BOARD_WIDTH, BOARD_HEIGHT),
cube=my_cube,
line=True,
border=False)
# game loop:
while True:
# event handlings and timings, etc
...
# display and render:
my_board.draw()
pg.display.flip()