Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -163,7 +163,7 @@ async def handle_action(request: Request):
|
|
| 163 |
player_found = True
|
| 164 |
# If gain permission is not available, then income has already been taken.
|
| 165 |
if not game["permissions"].get(player, {}).get("gain", True):
|
| 166 |
-
|
| 167 |
p["coins"] += 1
|
| 168 |
game["permissions"][player]["gain"] = False
|
| 169 |
return {"success": True, "message": f"Player {player} now has {p['coins']} coins."}
|
|
|
|
| 163 |
player_found = True
|
| 164 |
# If gain permission is not available, then income has already been taken.
|
| 165 |
if not game["permissions"].get(player, {}).get("gain", True):
|
| 166 |
+
return {"success": False, "message": "You can only earn money once per turn."}
|
| 167 |
p["coins"] += 1
|
| 168 |
game["permissions"][player]["gain"] = False
|
| 169 |
return {"success": True, "message": f"Player {player} now has {p['coins']} coins."}
|