This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pygame | |
| from random import choice | |
| class Cell(pygame.sprite.Sprite): | |
| w, h = 16, 16 | |
| def __init__(self, x, y, maze): | |
| pygame.sprite.Sprite.__init__(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 10x10 | |
| ┏┳━━┓┏┳┓┏┓ | |
| ┗┛┏━┻┫┃┃┃┃ | |
| ┏┓┃┏┳╋┫┃┣┛ | |
| ┣╋┻┛┗┫┃┣╋┓ | |
| ┗┻━┳━╋┫┃┣┛ | |
| ┏━┓┃┏╋┛┣╋┓ | |
| ┗┓┃┃┣┛┏┛┣┛ | |
| ┏╋╋┛┗┳┻┓┗┓ | |
| ┣╋╋┓┏┫┏┛┏┫ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from difflib import SequenceMatcher | |
| from itertools import combinations | |
| from math import sqrt, ceil | |
| from random import choice | |
| inp = """MID | |
| RANA | |
| GRANT | |
| BOCCA | |
| CILIA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from heapq import heappush, heappop | |
| from numpy import array, copy | |
| S = 's' | |
| P = 'p' | |
| F = '*' | |
| O = 'O' | |
| C = ' ' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 100 x 101 | |
| ...................................................................................................X | |
| ..................................................................................................XX | |
| .................................................................................................XX. | |
| ................................................................................................XX.. | |
| ...............................................................................................XX... | |
| ..............................................................................................XX.... | |
| .............................................................................................XX..... | |
| ............................................................................................XX...... | |
| ...........................................................................................XX....... |