object "checkers" {
  bgfill = fillstyle {
    /* Gray box one pixel _outside_ the game:
     * this way when the game is played in a non-square
     * canvas there will be a thin border at the edge
     * of the game.
     */
    SetColor(0x808080);
    SetOffset(-1,-1,2,2);
    Frame(x,y,w,h);

    /* Prepare for the BGEVEN fill here.
     * This code is executed only once, while BGEVEN is executed
     * once every other game square, so this generates far fewer gropnodes.
     */
    SetOffset(0,0,0,0);
    SetColor(0x8080FF);
  };
  bgeven = fillstyle {
    Rect(x,y,w,h);
  };
}

object "checkers.player1" {
  bgcolor = 0xFFFF00;
  piece = fillstyle {
    /* Circle with black border one pixel inside the grid */
    SetOffset(1,1,-2,-2);
    SetColor(bgcolor);
    Fellipse(x,y,w,h);
    SetColor(0x000000);
    Ellipse(x,y,w,h);
  };
}

object "checkers.player2" {
  bgcolor = 0xFF00FF;
  parent = FindThemeObject("checkers.player1");
}

