FIX test line 60, mouvement incomplet|TP_3.9

This commit is contained in:
Fred Z 2018-02-14 15:45:27 +01:00
parent f04d34c4d2
commit d7b749f0ac
1 changed files with 8 additions and 1 deletions

View File

@ -59,6 +59,8 @@ class Map:
0
>>> MiniMap.move_to("4")
0
>>> MiniMap.move_to("n")
0
>>> MiniMap.move_to("e1")
4
>>> MiniMap.map_print()
@ -144,7 +146,12 @@ class Map:
"""
# decompose le mouvement
direction = move[0]
goal = int(move[1:])
try:
goal = int(move[1:])
except ValueError as except_detail:
# print("ValueError: «{}»".format(except_detail))
return 0
steps = 0
# direction non conforme
if direction not in DIRECTIONS: