corrected the mentioned issues

This commit is contained in:
gfuse
2024-01-16 12:44:36 +01:00
parent 05a6ca84f7
commit 7278e00ed1
3 changed files with 11 additions and 9 deletions
+7 -5
View File
@@ -5,12 +5,14 @@ def main():
prog='Knight',
description='',
epilog='')
parser.add_argument('-x', '--x_pose', help='Destination X between 0 and 8', type=int, required=True)
parser.add_argument('-y', '--y_pose', help='Destination Y between 0 and 8', type=int, required=True)
parser.add_argument('-n', '--image_name', help='Destination Y between 0 and 8', type=str, required=True)
parser.add_argument('-ix', '--x_init', help='Initial X between 0 and 7', type=int, required=True)
parser.add_argument('-iy', '--y_init', help='Initial Y between 0 and 7', type=int, required=True)
parser.add_argument('-fx', '--x_des', help='Destination X between 0 and 7', type=int, required=True)
parser.add_argument('-fy', '--y_des', help='Destination Y between 0 and 7', type=int, required=True)
parser.add_argument('-n', '--image_name', help='the name of the output file', type=str, required=True)
args = parser.parse_args()
player = Player()
player.find_paths(destination=(args.x_pose,args.y_pose))
player = Player(pose=(args.x_init, args.y_init))
player.find_paths(destination=(args.x_des,args.y_des))
player.plot_paths(name=args.image_name)
if __name__ == '__main__':