示例#1
0
def drawCell(pos_x,pos_y):
    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