def draw(): screen.fill((0, 0, 0)) for y in range(4): for x in range(4): piece_size = 100 piece_draw_size = piece_size - 1 screen.draw.filled_rect( Rect( x * piece_size, y * piece_size, piece_draw_size, piece_draw_size ), color=(100, 20, 150) ) screen.draw.text( str(y * 4 + x + 1), (x * piece_size, y * piece_size), fontsize=60 )