-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcorner_clauses.py
More file actions
32 lines (25 loc) · 1.14 KB
/
Copy pathcorner_clauses.py
File metadata and controls
32 lines (25 loc) · 1.14 KB
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
from itertools import product
def distinct_corner_clauses():
alphabet = [0, 1] # 0 >> Zelle hat keine Bombe | 1 => Zelle hat Bombe
corner_clauses = []
print("\nVariationen der Eckzellen mit 3 moeglichen Nachbarzellen wenn aktuelle Zelle = 0")
for x in product(alphabet, repeat=3):
if x.count(1) == 0:
print('zelle_x_y_0 -->', x)
corner_clauses.append(x)
print("\nVariationen der Eckzellen mit 3 moeglichen Nachbarzellen wenn aktuelle Zelle = 1")
for x in product(alphabet, repeat=3):
if x.count(1) == 1:
print('zelle_x_y_1 -->', x)
corner_clauses.append(x)
print("\nVariationen der Eckzellen mit 3 moeglichen Nachbarzellen wenn aktuelle Zelle = 2")
for x in product(alphabet, repeat=3):
if x.count(1) == 2:
print('zelle_x_y_2 -->', x)
corner_clauses.append(x)
print("\nVariationen der Eckzellen mit 3 moeglichen Nachbarzellen wenn aktuelle Zelle = 3")
for x in product(alphabet, repeat=3):
if x.count(1) == 3:
print('zelle_x_y_3 -->', x)
corner_clauses.append(x)
return corner_clauses