This repository has been archived on 2019-12-09. You can view files and clone it, but cannot push or open issues or pull requests.
pacman/livrables/1/test_connexity.py

45 lines
1.1 KiB
Python
Executable File

#!/usr/bin/env python3
import pacmap
maps = [
[
[4, 1, 1, 1, 3, 1, 1, 4],
[1, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 1, 1, 0, 1, 0, 1],
[3, 0, 1, 0, 0, 1, 0, 3],
[1, 0, 0, 0, 1, 0, 0, 1],
[1, 1, 1, 0, 0, 0, 1, 1],
[4, 4, 1, 1, 3, 1, 1, 4],
],
[
[4, 1, 1, 1, 3, 1, 1, 4],
[1, 1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 1, 0, 1, 1, 1],
[4, 1, 1, 1, 3, 1, 1, 4],
],
[
[4, 1, 1, 1, 3, 1, 1, 4],
[1, 1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 1, 0, 1, 1, 1],
[1, 0, 0, 1, 0, 1, 1, 1],
[1, 0, 0, 1, 0, 1, 1, 1],
[1, 1, 1, 1, 0, 1, 1, 1],
[4, 1, 1, 1, 3, 1, 1, 4],
],
[
[4, 1, 1, 1, 3, 1, 1, 4],
[1, 1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 1, 0, 0, 0, 1],
[1, 1, 1, 1, 1, 1, 0, 1],
[3, 0, 0, 0, 0, 1, 0, 3],
[1, 1, 1, 1, 0, 1, 1, 1],
[4, 1, 1, 1, 3, 1, 1, 4],
]
]
for pac_map in maps:
is_connex = pacmap.connex(pac_map)
print(is_connex)