[ ] copy the contents of this file into your own file in the /Bots/ folder
[ ] Change the template in the following ways:
[ ] The first step is to change the return of the function _bottype to be whatever your bot will be called.
[ ] Also change the name of the class to match your bot type and file name
[ ] The primary function here is the act() function. It will be called anytime your bot needs to act.
A return of some kind is required for this function
Return None here to fold.
Return an integer to bet that many chips.
All the information you need is in a JSON string passed in as _jsondata. This json data also reports the status of your opponents.
Feel free to look at some other bots to get an idea of different ways of doing this.
A very useful function you can use here is _valueof which is found in Bots/Bot_helpers, passing in an array of cards in the format ['Ts', 'Ah', '5c', '2d', 'Qs'] will return the value of that hand. (as the program determines it)
[ ] The third function to costomize for your bot is the _observeshowdown function. This will be called at the end of every round and will provide a JSON string of information about that round, who won, how much, what cards they showed etc. You do not have to use this function if you prefer not to. No return is necessary.
[ ] Once you are happy with your bot, go to the file Bots/Register
[ ] import your bot file
[ ] Add your bot class to the register array
[ ] If you want to make sure your bot is included in games (normally they are selected at random} then also include your bot class in the required array.
All done!
[ ] Run main.py
To observe the game in various ways:
[ ] Use Dealer/Config.ini to slow down the output if you would like to follow it.
[ ] Tweak the Global booleans in globals.py to enable various kinds of output.
[ ] Open the file https://github.com/john1571/RoboPoker/blob/6fa96f37f270262e2abc5e61be658d4d68df782e/Bots/Template_bot.py
[ ] copy the contents of this file into your own file in the /Bots/ folder
[ ] Change the template in the following ways:
[ ] The first step is to change the return of the function _bottype to be whatever your bot will be called.
[ ] Also change the name of the class to match your bot type and file name
[ ] The primary function here is the act() function. It will be called anytime your bot needs to act.
[ ] The third function to costomize for your bot is the _observeshowdown function. This will be called at the end of every round and will provide a JSON string of information about that round, who won, how much, what cards they showed etc. You do not have to use this function if you prefer not to. No return is necessary.
[ ] Once you are happy with your bot, go to the file Bots/Register
All done!
To observe the game in various ways: