From a3e49dcd28bf880c34df5ba5c6f9fee103275973 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sun, 22 Apr 2018 21:05:33 +0200 Subject: [PATCH] FIx code --- _posts/2018-04-22-bzhctf18.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_posts/2018-04-22-bzhctf18.md b/_posts/2018-04-22-bzhctf18.md index 7fe93ba..6afd1f5 100644 --- a/_posts/2018-04-22-bzhctf18.md +++ b/_posts/2018-04-22-bzhctf18.md @@ -310,13 +310,13 @@ def convert_path_to_relative_moves(p): dx = p[0][0] - p[1][0] dy = p[0][1] - p[1][1] if dx < 0: # right - return 'l'+recompute_path(p[1:]) + return 'l'+convert_path_to_relative_moves(p[1:]) elif dx > 0: # left - return 'j'+recompute_path(p[1:]) + return 'j'+convert_path_to_relative_moves(p[1:]) elif dy < 0: # bottom - return 'k'+recompute_path(p[1:]) + return 'k'+convert_path_to_relative_moves(p[1:]) elif dy > 0: # up - return 'i'+recompute_path(p[1:]) + return 'i'+convert_path_to_relative_moves(p[1:]) while True: # get input