Code initial
Pour l'exercice 1 (b):
Pour l'exercice 3 (b):
crane = Crane([
[X], # column 0
[], # column 1, empty
[O, X, O, X], # column 2
[M, M, M], # column 3
[] # column 4, empty
])
[X], # column 0
[], # column 1, empty
[O, X, O, X], # column 2
[M, M, M], # column 3
[] # column 4, empty
])
Pour l'exercice 3 (b):
crane = Crane([
[], # column 0
[X, M, O], # column 1
[O], # column 2
[], # column 3
[M, X] # column 4
])
program = Program(
P1=[GO_TO_P2, GO_TO_P2, GO_TO_P2, GO_TO_P2, GO_TO_P2, GO_TO_P2],
P2=[GO_TO_P3, GO_DOWN_AND_UP],
P3=[GO_RIGHT, GO_DOWN_AND_UP, IF_NO_BOX, GO_TO_P3, GO_LEFT]
)
[], # column 0
[X, M, O], # column 1
[O], # column 2
[], # column 3
[M, X] # column 4
])
program = Program(
P1=[GO_TO_P2, GO_TO_P2, GO_TO_P2, GO_TO_P2, GO_TO_P2, GO_TO_P2],
P2=[GO_TO_P3, GO_DOWN_AND_UP],
P3=[GO_RIGHT, GO_DOWN_AND_UP, IF_NO_BOX, GO_TO_P3, GO_LEFT]
)
Modifié le: jeudi 28 novembre 2019, 10:52