/bulls_cows

Bulls&Cows game

Primary LanguagePythonMIT LicenseMIT

Bulls&Cows game

GitHub Workflow Status GitHub Workflow Status Codacy Badge Codacy Badge

Game rules

Run game on localhost

git clone git@github.com: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

Yandex.Alice skill, that hosted at GoogleAppEngine Standard Environment

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.

Live version

The live version of this code is available as Yandex.Alice skill.