Fixes unused variable errors in LGTM (#1746)

* Fixes unsed variable errors in LGTM

* Fixes integer check

* Fixes failing tests
This commit is contained in:
onlinejudge95
2020-02-11 13:59:09 +05:30
committed by GitHub
parent fde31c93a3
commit 7b7c1a0135
6 changed files with 25 additions and 39 deletions

View File

@ -52,7 +52,6 @@ def search(grid, init, goal, cost, heuristic):
while not found and not resign:
if len(cell) == 0:
resign = True
return "FAIL"
else:
cell.sort() # to choose the least costliest action so as to move closer to the goal
@ -61,7 +60,6 @@ def search(grid, init, goal, cost, heuristic):
x = next[2]
y = next[3]
g = next[1]
f = next[0]
if x == goal[0] and y == goal[1]:
found = True