Spitfire1970 commited on
Commit
5e75f12
·
1 Parent(s): aff6bdc
Files changed (1) hide show
  1. handler.py +3 -1
handler.py CHANGED
@@ -260,6 +260,8 @@ class EndpointHandler():
260
  try:
261
  board = game.board()
262
  moves = list(game.mainline_moves())
 
 
263
 
264
  print('here3')
265
  for move in moves:
@@ -288,7 +290,7 @@ class EndpointHandler():
288
  eval = response.json()["pvs"][0]["cp"]
289
  if (color == "white" and (best_eval - eval < 100)) or (color == "black" and (best_eval - eval < -100)):
290
  print('exiting ai_move endpoint nice found!')
291
- return {"reply": move}
292
 
293
  except Exception as e:
294
  print('error sending to lichess', e)
 
260
  try:
261
  board = game.board()
262
  moves = list(game.mainline_moves())
263
+ print('what i want', moves)
264
+ print('what i have', move_sans)
265
 
266
  print('here3')
267
  for move in moves:
 
290
  eval = response.json()["pvs"][0]["cp"]
291
  if (color == "white" and (best_eval - eval < 100)) or (color == "black" and (best_eval - eval < -100)):
292
  print('exiting ai_move endpoint nice found!')
293
+ return {"reply": move_sans[move]}
294
 
295
  except Exception as e:
296
  print('error sending to lichess', e)