diff --git a/src/path/capture-hint.png b/src/path/capture-hint.png new file mode 100644 index 0000000..6763c6e Binary files /dev/null and b/src/path/capture-hint.png differ diff --git a/src/path/hint.png b/src/path/hint.png new file mode 100644 index 0000000..0e3b6f7 Binary files /dev/null and b/src/path/hint.png differ diff --git a/src/path/path.py b/src/path/path.py new file mode 100644 index 0000000..0b73811 --- /dev/null +++ b/src/path/path.py @@ -0,0 +1,32 @@ +import pygame +import win32con + +rules = {} +for i in range(1, 8): + eaten = [i] + for j in range(1, i): + eaten.append(j) + rules[i] = eaten +rules[1].append(7) + + + +hint = pygame.image.load("hint.png") +capture_hint = pygame.image.load("capture_hint.png") +def tran(x,y): + pass +def ismove(old_x, old_y, x, y, id, MAP): + pass + +def path(id, x, y, status): + if status: + movement = [] + for i in range(9): + for j in range(7): + if ismove(x, y, i, j, id, MAP): + movement.append([i, j]) + for i, j in movement: + WIN.blit(hint, tran(i,j)) + WIN.blit(capture_hint,tran(x,y)) + else: + pass#重新绘制