Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -187,7 +187,7 @@ async def handle_action(request: Request):
|
|
| 187 |
coins_to_steal = min(target_player["coins"], 2)
|
| 188 |
target_player["coins"] -= coins_to_steal
|
| 189 |
challenger_player["coins"] += coins_to_steal
|
| 190 |
-
game["permissions"][challenger_player]["steal"] = False
|
| 191 |
game["challenge"] = None
|
| 192 |
return {"success": True, "message": f"Steal accepted. {coins_to_steal} coins transferred from {target_player['name']} to {challenger_player['name']}."}
|
| 193 |
elif response == 'challenge':
|
|
@@ -195,7 +195,7 @@ async def handle_action(request: Request):
|
|
| 195 |
coins_to_steal = min(target_player["coins"], 2)
|
| 196 |
target_player["coins"] -= coins_to_steal
|
| 197 |
challenger_player["coins"] += coins_to_steal
|
| 198 |
-
game["permissions"][challenger_player]["steal"] = False
|
| 199 |
game["challenge"]["status"] = 'choose'
|
| 200 |
game["challenge"]["challenger"] = target_player['name']
|
| 201 |
game["challenge"]["target"] = challenger_player['name']
|
|
|
|
| 187 |
coins_to_steal = min(target_player["coins"], 2)
|
| 188 |
target_player["coins"] -= coins_to_steal
|
| 189 |
challenger_player["coins"] += coins_to_steal
|
| 190 |
+
game["permissions"][challenger_player["name"]]["steal"] = False
|
| 191 |
game["challenge"] = None
|
| 192 |
return {"success": True, "message": f"Steal accepted. {coins_to_steal} coins transferred from {target_player['name']} to {challenger_player['name']}."}
|
| 193 |
elif response == 'challenge':
|
|
|
|
| 195 |
coins_to_steal = min(target_player["coins"], 2)
|
| 196 |
target_player["coins"] -= coins_to_steal
|
| 197 |
challenger_player["coins"] += coins_to_steal
|
| 198 |
+
game["permissions"][challenger_player["name"]]["steal"] = False
|
| 199 |
game["challenge"]["status"] = 'choose'
|
| 200 |
game["challenge"]["challenger"] = target_player['name']
|
| 201 |
game["challenge"]["target"] = challenger_player['name']
|