Botpot
Visit our website
  • Fundamentals
    • Botpot overview
    • Get action
      • Get action: game state
      • Get action: API object
      • Get action: action object
    • Specialized game concepts
      • Get action: ref data
      • Game settings
    • Botpot architecture
  • Games
    • Creating your first bot
    • Understanding game logic
    • Explore game documentations
      • Tic-Tac-Toe
      • Quoridor
      • Connect Four
      • Battleship
      • Virus War
      • Dots and Boxes
      • Hex
      • Reversi
      • Gomoku
      • Mancala
      • Uno
      • Big 2
      • Snake & Tetris
      • Checker
      • Generals
      • Blokus
      • Wordle
      • Chinese Checker
Powered by GitBook
On this page

Was this helpful?

  1. Fundamentals
  2. Get action

Get action: API object

The API object for the get_action method includes:

api.data

This is data that users can use to store information between different get_action calls. This can be helpful for games where history matters. For example, in a previous state, the bot may have seen the opponent in location (3, 2) but is no longer visible in this current state, one could store this coordinate in api.data.previous = (3, 2)

api.log

Use this function to log strings for easier debugging. Example usage: api.log("Debugging")

Last updated 1 year ago

Was this helpful?