Actions

Gameboard

From Future Skill

[DRAFT] The GameBoard library

A reusable and configurable system for game-like challenges.

[TODO]

  • Board quick setup
  • Creating and placing a gamepiece
  • Pathfinding
  • Custom board setup

GameBoard quick setup

Here's an example to quickly get up and running:

from gameboard import GameBoard
from gameboard_helpers import CommonSetups, Style

class Challenge:
  fn __init__(self, context):
    board = GameBoard()
    CommonSetups.square(board)
    Style.topdown(board, context.canvas)
    board.fill(10, 10)

The CommonSetups class configures the board to use a square tiled grid with four directions. The Styles class then configures how the board is displayed, with what tiles and how they are laid out.