remove useless comments
This commit is contained in:
parent
77353b77b3
commit
2b75ac84c0
1 changed files with 4 additions and 17 deletions
|
@ -66,43 +66,30 @@ class Grid:
|
||||||
v_next = square.next_vert()
|
v_next = square.next_vert()
|
||||||
h_prev = square.prev_horiz()
|
h_prev = square.prev_horiz()
|
||||||
h_next = square.next_horiz()
|
h_next = square.next_horiz()
|
||||||
# print("Taking care of {}".format(square))
|
|
||||||
if not square.switched and v_prev and v_prev.state != ' ':
|
if not square.switched and v_prev and v_prev.state != ' ':
|
||||||
# print("On vérifie le précédent vertical.")
|
|
||||||
v_p_prev = v_prev.prev_vert()
|
v_p_prev = v_prev.prev_vert()
|
||||||
if v_p_prev and v_p_prev.state == v_prev.state:
|
if v_p_prev and v_p_prev.state == v_prev.state:
|
||||||
square.state = v_prev.opposite_state()
|
square.state = v_prev.opposite_state()
|
||||||
# print("Square {} switched to {}".format(square,
|
|
||||||
# square.state))
|
|
||||||
elif v_next and v_next.state == v_prev.state:
|
elif v_next and v_next.state == v_prev.state:
|
||||||
square.state = v_prev.opposite_state()
|
square.state = v_prev.opposite_state()
|
||||||
# print("Square {} switched to {}".format(square,
|
|
||||||
# square.state))
|
|
||||||
if not square.switched and v_next and v_next.state != ' ':
|
if not square.switched and v_next and v_next.state != ' ':
|
||||||
# print("On vérifie le suivant vertical.")
|
|
||||||
v_n_next = v_next.next_vert()
|
v_n_next = v_next.next_vert()
|
||||||
if v_n_next and v_n_next.state == v_next.state:
|
if v_n_next and v_n_next.state == v_next.state:
|
||||||
square.state = v_next.opposite_state()
|
square.state = v_next.opposite_state()
|
||||||
# print("Square {} switched to {}".format(square,
|
|
||||||
# square.state))
|
|
||||||
if not square.switched and h_prev and h_prev.state != ' ':
|
if not square.switched and h_prev and h_prev.state != ' ':
|
||||||
# print("On vérifie le précédent horizontal.")
|
|
||||||
h_p_prev = h_prev.prev_horiz()
|
h_p_prev = h_prev.prev_horiz()
|
||||||
if h_p_prev and h_p_prev.state == h_prev.state:
|
if h_p_prev and h_p_prev.state == h_prev.state:
|
||||||
square.state = h_prev.opposite_state()
|
square.state = h_prev.opposite_state()
|
||||||
# print("Square {} switched to {}".format(square,
|
|
||||||
# square.state))
|
|
||||||
elif h_next and h_next.state == h_prev.state:
|
elif h_next and h_next.state == h_prev.state:
|
||||||
square.state = h_prev.opposite_state()
|
square.state = h_prev.opposite_state()
|
||||||
# print("Square {} switched to {}".format(square,
|
|
||||||
# square.state))
|
|
||||||
if not square.switched and h_next and h_next.state != ' ':
|
if not square.switched and h_next and h_next.state != ' ':
|
||||||
# print("On vérifie le suivant horizontal.")
|
|
||||||
h_n_next = h_next.next_horiz()
|
h_n_next = h_next.next_horiz()
|
||||||
if h_n_next and h_n_next.state == h_next.state:
|
if h_n_next and h_n_next.state == h_next.state:
|
||||||
square.state = h_next.opposite_state()
|
square.state = h_next.opposite_state()
|
||||||
# print("Square {} switched to {}".format(square,
|
|
||||||
# square.state))
|
|
||||||
|
|
||||||
|
|
||||||
class Square:
|
class Square:
|
||||||
|
|
Loading…
Reference in a new issue