farhanhubble commited on
Commit
16103f7
·
1 Parent(s): 02c40e6

Fix: Remove exit game scenario

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -207,7 +207,7 @@ foolsball.reset()
207
 
208
 
209
  def play(key):
210
- key_to_action = {"Up":'n', "Down":'s', "Left":'w', "Right":'e'}
211
  if key not in key_to_action:
212
  return f"<HTML> <body> Invalid key {key} </body> </HTML>"
213
 
@@ -223,8 +223,6 @@ def play(key):
223
  foolsball.reset()
224
  print()
225
  map = foolsball.render(False)
226
- elif act == 'x':
227
- break
228
 
229
  if foolsball.__is_terminal_state__(foolsball.state):
230
  body += "<p>Game over!!!</p>"
 
207
 
208
 
209
  def play(key):
210
+ key_to_action = {"Up":'n', "Down":'s', "Left":'w', "Right":'e', "Reset":'r'}
211
  if key not in key_to_action:
212
  return f"<HTML> <body> Invalid key {key} </body> </HTML>"
213
 
 
223
  foolsball.reset()
224
  print()
225
  map = foolsball.render(False)
 
 
226
 
227
  if foolsball.__is_terminal_state__(foolsball.state):
228
  body += "<p>Game over!!!</p>"