Plays immediately on their turn.
Uses the following precedence for actions:
Special cards of the same color
draw 2
skip
reverse
Any card of the same color
Any card of the same number (preferring the color that is has the most of)
A Draw 4, choosing the color it has the most of
A Wild, choosing the color it has the most of
Draw
Will always vote to reset the game (except in games with exactly 3 players).
Ideally, the bot code will reside in a separate file, and will be injected as a callback to the game code, which is executed on endTurn. Bot players should have a flag identifying them as such (to know if the callback should be executed or not). It could also identify the name of the bot (eg, 'SimpleBot') in the turn status information.
Player1 can add bots to the game by using a new command and specifying the type/name of the bot (eg /uno addbot simplebot).
We will need to do something with the API so it can interact with the game state. Initially, the full game state can be passed to the bot's callback and it can operate on that. However, in practice it might not be a good idea to let bots see everybody's hand information.
Plays immediately on their turn. Uses the following precedence for actions:
Will always vote to reset the game (except in games with exactly 3 players).
Ideally, the bot code will reside in a separate file, and will be injected as a callback to the game code, which is executed on endTurn. Bot players should have a flag identifying them as such (to know if the callback should be executed or not). It could also identify the name of the bot (eg, 'SimpleBot') in the turn status information. Player1 can add bots to the game by using a new command and specifying the type/name of the bot (eg
/uno addbot simplebot
).We will need to do something with the API so it can interact with the game state. Initially, the full game state can be passed to the bot's callback and it can operate on that. However, in practice it might not be a good idea to let bots see everybody's hand information.