Spaces:
Paused
Paused
| from flask import Flask, jsonify, request | |
| from game_logic import handle_command | |
| app = Flask(__name__) | |
| def command(): | |
| data = request.json | |
| username = data['username'] | |
| command = data['command'] | |
| result = handle_command(username, command) | |
| return jsonify({'result': result}) | |
| if __name__ == '__main__': | |
| app.run(debug=True) | |