Don't over-engineer your app.
This Python REST API is a game called Mastermind. The goal is simple; try to guess the correct sequence using the colors: 'RED', 'ORANGE', 'YELLOW', 'GREEN', 'BLUE', 'PURPLE', 'WHITE', 'BLACK'.
You will need Python 2.7, Flask, Flask-RESTful
Everything here can be found in the documentation provided.
https://www.python.org/
http://flask.pocoo.org/
https://pypi.python.org/pypi/Flask-RESTful
Install Python 2.7, Flask, and Flask-Restful. Once installed use the command line to start.
python app.pyYour server should now be running at http://localhost:5000
The AI will generate a sequence that is written to a file called 'secretcode'. This file contains the answer.
The REST API has three endpoints.
http://localhost:5000/test Use this to test that your server is working correctly.
http://localhost:5000/start Use this to have the AI generate the answer.
http://localhost:5000/guess Use this to guess the correct sequence.