-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcell.py
More file actions
36 lines (29 loc) · 992 Bytes
/
Copy pathcell.py
File metadata and controls
36 lines (29 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import pygame
import pygame.draw
pygame.init()
x = 0
y = 0
WIDTH = 500
HEIGHT = 500
dif = WIDTH / 9
WINDOW = pygame.display.set_mode((WIDTH, HEIGHT))
class Cell:
def __init__(self, value, row, col, screen):
self.value = value
self.row = row
self.col = col
self.screen = screen
def get_cell_value(self):
return self.value
def set_cell_value(self, value):
self.value = value
def set_sketched_value(self, value):
self.note = value
font = pygame.font.Font(None, 400)
def draw(self):
for i in range(2):
pygame.draw.line(WINDOW, (255, 0, 0), (x * dif - 3, (y + i) * dif), (x * dif + dif + 3, (y + i) * dif), 7)
pygame.draw.line(WINDOW, (255, 0, 0), ((x + i) * dif, y * dif), ((x + i) * dif, y * dif + dif), 7)
# pygame.font.SysFont("comicsans", 40)
# text1 = font1.render(str(val), 1, (0, 0, 0))
# screen.blit(text1, (x * dif + 15, y * dif + 15))