The Really Quick, Quick Start Page

Do you just want the main pointers to get going?

If you want the bare minimum instructions, or, if you're attending one of our events or following a video online and you just want the quick notes about what is important to start playing games, then here are the vital bits that you need to know about.

Getting Started

  • From the Editor screen select the Game Type that you want to play
  • Every game comes with working template code that will have been loaded into the Editor for you
  • You can hit the Run button straight away and the game will play

Editing the code

  • The calculateMove function in the template code is the equivalent of you main() function
  • It is called by our Game Manager every time you need to make a move
  • It receives a JSON object describing the current state of the game
  • You must return a JSON object that represents the move you want to make in the game
  • Click on the Book icon in the very right hand column of the Editor page for an explanation of the gameState and Move objects
    • an explanation of all the fields in the JSON gameState object and what each field is for
    • a description of the JSON you need to create to return a Move in each game.

Implementing the strategy

  • Between receiving the gameState at the start of calculateMove and returning the move you want to make in the game at the end of calculateMove is where you need to implement your strategy.

Special Notes

  • calculateMove will be called each time you can make another move in the game. You only ever calculate one move at a time and return this singular move to the Game Manager by returning it from the calculateMove() function.
  • Any regular variables in your code do not persist between calls to calculateMove(). This is why you receive the full and current state of the game in the gameSate JSON that is passed to calculateMove().
  • You can use the special variable persistent-data to remember information between calls to calculateMove(). The persistent-data variable and its use is explained further here
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License