summaryrefslogtreecommitdiffstats
path: root/board.py
blob: 6be64f549da0f03118890279409c42b9a309f1fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from setup import *


class Board:
    colour = {0: LIGHT_GREEN,
              1: DARK_GREEN}

    board = pygame.Surface(dimensions)
    board.fill(DARK_GREEN)

    for i in range(LENGTH):
        for j in range(HEIGHT):
            pygame.draw.rect(board, colour[(i + j) % 2],
                             pygame.Rect(i * side_length, j * side_length, side_length, side_length), border_radius=2)

    def __init__(self):
        pass

    def draw(self, surf):
        surf.blit(self.board, (0, 0))