### Setup PlayerCounter in Game Source: https://en.doc.boardgamearena.com/PlayerCounter_and_TableCounter Initializing the database state for the player counter during game setup. ```php $this->playerEnergy->initDb(array_keys($players)); ``` -------------------------------- ### Initialize and Use PlayerCounter Source: https://en.doc.boardgamearena.com/index.php?curid=3534&diff=29403&oldid=29322&title=PlayerCounter_and_TableCounter Demonstrates the lifecycle of a PlayerCounter from property declaration to client-side setup. ```php public PlayerCounter $playerEnergy; ``` ```php $this->playerEnergy = $this->counterFactory->createPlayerCounter('energy'); ``` ```php $this->playerEnergy->initDb(array_keys($players)); ``` ```php $this->playerEnergy->fillResult($result); ``` ```php $this->game->playerEnergy->inc($activePlayerId, 1); ``` ```javascript Object.values(gamedatas.players).forEach(player => { this.bga.playerPanels.getElement(player.id).insertAdjacentHTML('beforeend', `
${_("Energy")} `); const counter = new ebg.counter(); counter.create( `energy-player-counter-${player.id}`, { value: player.energy, playerCounter: 'energy', playerId: player.id } ); }); ``` -------------------------------- ### Base Map Layout Example Source: https://en.doc.boardgamearena.com/index.php?curid=350&diff=29396&oldid=29356&title=Gamehelpterramystica An example of a custom map file content representing the base game map. Ensure columns alternate between 13 and 12. ```plaintext U,S,G,B,Y,R,U,K,R,G,B,R,K Y,I,I,U,K,I,I,Y,K,I,I,Y I,I,K,I,S,I,G,I,G,I,S,I,I G,B,Y,I,I,R,B,I,R,I,R,U K,U,R,B,K,U,S,Y,I,I,G,K,B S,G,I,I,Y,G,I,I,I,U,S,U I,I,I,S,I,R,I,G,I,Y,K,B,Y Y,B,U,I,I,I,B,K,I,S,U,S R,K,S,B,R,G,Y,U,S,I,B,G,R ``` -------------------------------- ### Definition List Formatting Source: https://en.doc.boardgamearena.com/index.php?action=edit&title=Wiki_formatting Examples of definition list syntax using dynamic markers and bold text. ```text ;A term: A detail ;B term: B detail ;C term: C detail ``` ```text ;'''A term''': A detail ;'''B term''': B detail ;'''C term''': C detail ``` ```text '''A term''': A detail '''B term''': B detail '''C term''': C detail ``` -------------------------------- ### Heading and List Item Markup Examples Source: https://en.doc.boardgamearena.com/index.php?action=edit&title=Wiki_formatting Examples of wiki markup for h4 and h5 headings and associated list items. ```text * List item ==== Example h4 heading ==== * List item ``` ```text * List item ===== Example h5 heading ===== * List item ``` -------------------------------- ### Text Template Usage Source: https://en.doc.boardgamearena.com/index.php?action=edit&title=Wiki_formatting Example of using the Text template with custom color parameters. ```wikitext {{Text|Example|c=firebrick}} ``` -------------------------------- ### Instantiate Animation Manager in TypeScript Source: https://en.doc.boardgamearena.com/index.php?curid=878&diff=29394&oldid=28915&title=Using_Typescript_and_Scss Demonstrates how to instantiate the BgaAnimations.Manager with configuration options within your game's setup. ```typescript public animationManager: InstanceType; // in your setup: this.animationManager = new BgaAnimations.Manager({ ... }); ``` -------------------------------- ### Wiki Table Example Source: https://en.doc.boardgamearena.com/index.php?action=edit&title=Wiki_formatting A basic wiki table structure used for displaying ranked information. ```WikiText {| |+Caption !0-90 |⭐ |- !91-110 |⭐⭐ |- !111-125 |⭐⭐⭐ |} ``` ```WikiText {| |+Caption !0-90 |⭐ |- !91-110 |⭐⭐ |- !111-125 |⭐⭐⭐ |} ``` ```WikiText {| |+style="text-align:left;" Caption !style="margin:0;padding:5px;font-weight:400;" 0-90 |style="margin:0;padding:5px;font-weight:400;" ⭐ |- !style="margin:0;padding:5px;font-weight:400;" 91-110 |style="margin:0;padding:5px;font-weight:400;" ⭐⭐ |- !style="margin:0;padding:5px;font-weight:400;" 111-125 |style="margin:0;padding:5px;font-weight:400;" ⭐⭐⭐ |} ``` -------------------------------- ### Numbered List Formatting Source: https://en.doc.boardgamearena.com/index.php?action=edit&title=Wiki_formatting Examples of various numbered list formats including dynamic markers and HTML/CSS implementations. ```text # A # B # C ``` ```text # 1. A # 2. B # 3. C ``` ```text 1. A 2. B 3. C ``` ```html
  1. A
  2. B
  3. C
```