Cqsi / lichs

♟ Play chess against real players in your terminal using Lichess
https://pypi.org/project/lichs/
MIT License
117 stars 19 forks source link

Game_state - KeyError: 'bdraw' #67

Closed 9acca9 closed 2 years ago

9acca9 commented 2 years ago

Hi. In this error im playing with White and I'm getting that "b" that generate this error. (the "b" the 0 position for black, but why can handle this¿) What can be wrong here¿ What can i do¿


File "/usr/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
    self.run()
File "/home/panchines/.local/lib/python3.10/site-packages/lichs/Game.py", line 27, in run
    self.handle_state_change(event)

File "/home/panchines/.local/lib/python3.10/site-packages/lichs/Game.py", line 35, in handle_state_change
    if game_state[self.color[0].lower() + "draw"] == True:
KeyError: 'bdraw'
9acca9 commented 2 years ago

If i delete this: if game_state[self.color[0].lower() + "draw"] == True: self.handle_draw_state(game_state)

The program works..... but if somebody try to offer draw, nothing happend.