Skip to content

Instantly share code, notes, and snippets.

@labohkip81
Created January 11, 2022 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save labohkip81/8d7327175c016eeea3e4555a56dc0b0a to your computer and use it in GitHub Desktop.
Save labohkip81/8d7327175c016eeea3e4555a56dc0b0a to your computer and use it in GitHub Desktop.

Draft King

checker game created using cocos creator 2.4.5. Game server is implemented using nakama. And bots are written in js and host in node

FileStructure

. ├── client #cocos creator (TS)
├── DraftkingAI # bot code (JS)
├── Server # server (goLang)
├── test
├── tools
└── README.md

To run server:

install docker

cd server 
buildandrun.sh

To run client : change SERVER_REMOTE in livecasinoapp.ts to localhost we need cocos creator v 2.4.5

DranftKingAI : Contians the bot code. To start the project run File change the SERVER_IP to local host in config.js file

  cd DraftkingAI
  npm i
  sh botcreation.sh
  sh draftkingai.sh

Note: Make sure to create users before running bot files to avoid login issue. Users can be created using nakama console or curl command

  curl "127.0.0.1:7350/v2/account/authenticate/email?create=true"   --user "defaultkey:"  --data '{"email": "+254123457008@chezaent.co.ke", "password": "12345678","create": true}'

bot emails are present inside the Config.js file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment