예제 #1
0
    blockSize = Board.get_BlockSize(10)
    for x in range(width//blockSize):
        for y in range(height//blockSize):
            rect = pygame.Rect(x*blockSize, y*blockSize,
                               blockSize, blockSize)
            if x==pos_x-1 and y==pos_y-1:
                pygame.draw.rect(screen, kolor.convert('red'), rect, 0)
            if x*blockSize >=width or y*blockSize >=height:
                break


board=create_board(10,10)
board=create_cell(3,4)
Board=Board(width,height)
screen.fill(kolor.convert('white'))
Board.drawGrid(10)

counter=0
while run:
    for event in pygame.event.get():

        if event.type == pygame.QUIT:
            run =False
    drawCell(5,5)
    sleep(2)
    drawCell(1,1)

    text("Klaudiusz Hynek",32,kolor.full_random_color())
    pygame.display.update()
pygame.quit()