Page 1 of 1

Example of putting things on the player board?

Posted: 24 December 2014, 20:22
by sparr
I want to put a count of the cards in each player's hand on their player board.

I've looked at http://en.doc.boardgamearena.com/Game_i ... .27s_panel but I'm still unclear on the best way to update the info.

Is there more reference or examples for updateCounters(counters) and how this.gamedatas.counters should be set/updated?

Re: Example of putting things on the player board?

Posted: 29 December 2014, 12:24
by tarini
Every player has a DOM node, retrievable with $('player_board_'+playerId), you can use for your purposes.

In my code, for example, I use this snippet to append a custom jstpl:

Code: Select all

var captainBoard = $('player_board_'+captainId);
dojo.place( this.format_block('jstpl_captain' ), captainBoard );