git clone [email protected]:vb64/bulls_cows.git
python bulls_cows/source/default/bull_cows.py imcheater
my puzzle: 5091
enter 4 digits: 0519
cows: 4 bulls: 0
enter 4 digits: 5091
cows: 0 bulls: 4
Done!
Quest solved with 2 tries
You need Google account and registration at Google Cloud Platform. Create new python project and save your new GAE project ID. Download and install Cloud SDK, then:
gcloud init
cd bulls_cows
make setup PYTHON_BIN=path/to/python3
make tests
make deploy
After successful deployment visit the URL https://Your-GAE-project-ID.appspot.com You should see something like this:
Yandex Alice Bulls&Cows game lives here
Then, you need Yandex account and registration at Yandex.Dialogs. Create new Alice skill and set Webhook URL
field to
https://Your-GAE-project-ID.appspot.com/alice
Test your Alice skill at the 'Testing' tab.
For security purpose, you can uncomment next lines of code and set a correct ID for your Alice skill.
The live version of this code is available as Yandex.Alice skill.