mrhaseenullah commited on
Commit
af4f83b
·
verified ·
1 Parent(s): 3b6c3b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -201,12 +201,12 @@ def make_move(evt: gr.SelectData, game_mode, difficulty):
201
  game.switch_player()
202
 
203
  # AI move (if playing against AI)
204
- elif game_mode != "human_vs_human":
205
  # Switch player before AI move
206
  game.switch_player()
207
 
208
  # Minimax or Q-Learning AI move
209
- if game_mode == "minimax":
210
  ai_move = minimax_player.get_move(game)
211
  else: # q_learning
212
  ai_move = qlearning_player.choose_action(game)
 
201
  game.switch_player()
202
 
203
  # AI move (if playing against AI)
204
+ elif game_mode != "Human_vs_Human":
205
  # Switch player before AI move
206
  game.switch_player()
207
 
208
  # Minimax or Q-Learning AI move
209
+ if game_mode == "AI":
210
  ai_move = minimax_player.get_move(game)
211
  else: # q_learning
212
  ai_move = qlearning_player.choose_action(game)