http://generals.tantanguanguan.com/
Node v6.0+
$ git clone git@github.com:mrmarktyy/generalio-server.git
$ cd generalio-server
$ npm install
$ node index.js
$ git clone git@github.com:mrmarktyy/generalio-client.git
$ cd generalio-client
$ npm install
$ npm run start
Find the sample ai implementation here,
generalio-server/ai/bots/Sample.js
-
- create generalio-server/ai/bots/MyAIBot.js
-
-
in generalio-server/controllers/GameMatchingCentre.js#L67 change
const ai = new AIPlayer(new AISocket({type: 'Sample'}), this);
to
const ai = new AIPlayer(new AISocket({type: 'MyAIBot'}), this);
where
type
should match the file name of the bot file -
-
- restart the generalio server, then
MyAIBot
will be in use now.
- restart the generalio server, then