<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ms">
	<id>https://ms.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Een</id>
	<title>Board Game Arena - Sumbangan pengguna [ms]</title>
	<link rel="self" type="application/atom+xml" href="https://ms.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Een"/>
	<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/Khas:Sumbangan/Een"/>
	<updated>2026-09-20T15:57:21Z</updated>
	<subtitle>Sumbangan pengguna</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelplogger&amp;diff=1829</id>
		<title>Gamehelplogger</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelplogger&amp;diff=1829"/>
		<updated>2016-05-19T21:35:03Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;From the official rules:&lt;br /&gt;
[http://www.icehousegames.org/wiki/index.php?title=Logger http://www.icehousegames.org/wiki/index.php?title=Logger]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Background&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Four rival lumberjacks are competing to chop down the most trees for their business. However, standing in their way are tree-hugging hippies protesting the deforestation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Glossary&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following terms are used in Logger:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tree&#039;&#039;&#039; - Any seedling, sapling or mature tree on the board.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Seedling&#039;&#039;&#039; - A large pyramid&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sapling&#039;&#039;&#039; - A large pyramid with a medium pyramid stacked on it&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mature Tree&#039;&#039;&#039; - A stack of pyramids. From top to bottom: small, medium, large.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Protester&#039;&#039;&#039; - Denoted by a volcano cap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Logger&#039;&#039;&#039; - A piece representing the player. Denoted by a medium pyramid of a color not used for trees. Non-Icehouse pieces like meeples may be also used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Setup&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place a seedling on the center of the board. The remaining pyramid pieces from the Rainbow stash are kept aside in a common pool. Starting with the first player, each player places his logger on a corner of the board. Each player also starts with 1 protester in his or her supply (2 protesters for a 2-player game). Remember who went first as this will be important at the end game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Goal&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The winner is the player with the most points at the end of the game. Though scoring 10 points triggers the end game, having 10 points may not be enough for victory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Gameplay&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No Diagonals - Diagonals do not exist in Logger. Any rule pertaining to adjacency or movement is orthogonal only.&lt;br /&gt;
&lt;br /&gt;
Each player&#039;s turn consists of three parts: Movement, Growth and Action.&lt;br /&gt;
&lt;br /&gt;
Movement - Move your logger up to two spaces. Loggers may not occupy or walk through spaces occupied by trees or other loggers.&lt;br /&gt;
&lt;br /&gt;
Growth - All trees in the same row and column your logger occupies grow 1 stage. All seedlings become saplings and all saplings become mature trees. Mature trees produce 1 seedling in any space adjacent to them if able. Please note growth of all trees is considered simultaneous, so no tree should experience two stages of growth in one turn, nor should any seedlings newly spawned from a mature tree this turn. All trees in your logger&#039;s row and column must grow or create a new seedling if able.&lt;br /&gt;
&lt;br /&gt;
Action - There are three options in the Action phase: Plant, Protest and Chop. You must perform an action if able. This phase is skipped if your logger is unable to perform any action.&lt;br /&gt;
&lt;br /&gt;
Plant - Plant one seedling in any space adjacent to your logger.&lt;br /&gt;
&lt;br /&gt;
Protest - You may place one or more protesters from your supply onto mature trees. Protested trees may not be directly chopped down by any player.&lt;br /&gt;
&lt;br /&gt;
Chop - Chop down an unprotested mature tree adjacent to your logger by removing it from the board. Chopping will create a domino effect. Any mature tree behind the first chopped tree will also be considered chopped and so on regardless if they have protesters on them not. This process stops when either the edge of the board or a space occupied by anything other than a mature tree is reached. Score 1 point for each tree removed in this way. Add any protesters from felled trees to your supply.&lt;br /&gt;
&lt;br /&gt;
For example, a given row can have this formation: Player-Mature Tree-Mature Tree-Sapling-Mature Tree. When the player chops the first tree, the second one will be removed as well. However, the domino effect ends at the sapling because it is not fully mature. The sapling and the last mature tree remain on the board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;End Game&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Logger is a game of equal turns. When a player reaches 10 points, the end game condition is reached. All players who have not had a turn this round will get one final turn. (Example: Player 2 reaches 10 points. Players 3 and 4 will receive one additional turn, but Player 1 does not. However, if Player 4 reaches 10 points, the game ends immediately.)&lt;br /&gt;
&lt;br /&gt;
The player with the most points at the end of the game wins. In case of a tie, the player with more protesters in reserve wins.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelplogger&amp;diff=1828</id>
		<title>Gamehelplogger</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelplogger&amp;diff=1828"/>
		<updated>2016-05-19T21:34:41Z</updated>

		<summary type="html">&lt;p&gt;Een: Link to official rules&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;From the official rules:&lt;br /&gt;
[http://www.icehousegames.org/wiki/index.php?title=Logger|http://www.icehousegames.org/wiki/index.php?title=Logger]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Background&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Four rival lumberjacks are competing to chop down the most trees for their business. However, standing in their way are tree-hugging hippies protesting the deforestation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Glossary&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following terms are used in Logger:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tree&#039;&#039;&#039; - Any seedling, sapling or mature tree on the board.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Seedling&#039;&#039;&#039; - A large pyramid&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sapling&#039;&#039;&#039; - A large pyramid with a medium pyramid stacked on it&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mature Tree&#039;&#039;&#039; - A stack of pyramids. From top to bottom: small, medium, large.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Protester&#039;&#039;&#039; - Denoted by a volcano cap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Logger&#039;&#039;&#039; - A piece representing the player. Denoted by a medium pyramid of a color not used for trees. Non-Icehouse pieces like meeples may be also used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Setup&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place a seedling on the center of the board. The remaining pyramid pieces from the Rainbow stash are kept aside in a common pool. Starting with the first player, each player places his logger on a corner of the board. Each player also starts with 1 protester in his or her supply (2 protesters for a 2-player game). Remember who went first as this will be important at the end game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Goal&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The winner is the player with the most points at the end of the game. Though scoring 10 points triggers the end game, having 10 points may not be enough for victory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Gameplay&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No Diagonals - Diagonals do not exist in Logger. Any rule pertaining to adjacency or movement is orthogonal only.&lt;br /&gt;
&lt;br /&gt;
Each player&#039;s turn consists of three parts: Movement, Growth and Action.&lt;br /&gt;
&lt;br /&gt;
Movement - Move your logger up to two spaces. Loggers may not occupy or walk through spaces occupied by trees or other loggers.&lt;br /&gt;
&lt;br /&gt;
Growth - All trees in the same row and column your logger occupies grow 1 stage. All seedlings become saplings and all saplings become mature trees. Mature trees produce 1 seedling in any space adjacent to them if able. Please note growth of all trees is considered simultaneous, so no tree should experience two stages of growth in one turn, nor should any seedlings newly spawned from a mature tree this turn. All trees in your logger&#039;s row and column must grow or create a new seedling if able.&lt;br /&gt;
&lt;br /&gt;
Action - There are three options in the Action phase: Plant, Protest and Chop. You must perform an action if able. This phase is skipped if your logger is unable to perform any action.&lt;br /&gt;
&lt;br /&gt;
Plant - Plant one seedling in any space adjacent to your logger.&lt;br /&gt;
&lt;br /&gt;
Protest - You may place one or more protesters from your supply onto mature trees. Protested trees may not be directly chopped down by any player.&lt;br /&gt;
&lt;br /&gt;
Chop - Chop down an unprotested mature tree adjacent to your logger by removing it from the board. Chopping will create a domino effect. Any mature tree behind the first chopped tree will also be considered chopped and so on regardless if they have protesters on them not. This process stops when either the edge of the board or a space occupied by anything other than a mature tree is reached. Score 1 point for each tree removed in this way. Add any protesters from felled trees to your supply.&lt;br /&gt;
&lt;br /&gt;
For example, a given row can have this formation: Player-Mature Tree-Mature Tree-Sapling-Mature Tree. When the player chops the first tree, the second one will be removed as well. However, the domino effect ends at the sapling because it is not fully mature. The sapling and the last mature tree remain on the board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;End Game&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Logger is a game of equal turns. When a player reaches 10 points, the end game condition is reached. All players who have not had a turn this round will get one final turn. (Example: Player 2 reaches 10 points. Players 3 and 4 will receive one additional turn, but Player 1 does not. However, if Player 4 reaches 10 points, the game ends immediately.)&lt;br /&gt;
&lt;br /&gt;
The player with the most points at the end of the game wins. In case of a tie, the player with more protesters in reserve wins.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelplogger&amp;diff=1827</id>
		<title>Gamehelplogger</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelplogger&amp;diff=1827"/>
		<updated>2016-05-19T21:33:50Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;From the official rules:&lt;br /&gt;
[http://www.icehousegames.org/wiki/index.php?title=Logger]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Background&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Four rival lumberjacks are competing to chop down the most trees for their business. However, standing in their way are tree-hugging hippies protesting the deforestation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Glossary&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following terms are used in Logger:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tree&#039;&#039;&#039; - Any seedling, sapling or mature tree on the board.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Seedling&#039;&#039;&#039; - A large pyramid&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sapling&#039;&#039;&#039; - A large pyramid with a medium pyramid stacked on it&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mature Tree&#039;&#039;&#039; - A stack of pyramids. From top to bottom: small, medium, large.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Protester&#039;&#039;&#039; - Denoted by a volcano cap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Logger&#039;&#039;&#039; - A piece representing the player. Denoted by a medium pyramid of a color not used for trees. Non-Icehouse pieces like meeples may be also used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Setup&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place a seedling on the center of the board. The remaining pyramid pieces from the Rainbow stash are kept aside in a common pool. Starting with the first player, each player places his logger on a corner of the board. Each player also starts with 1 protester in his or her supply (2 protesters for a 2-player game). Remember who went first as this will be important at the end game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Goal&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The winner is the player with the most points at the end of the game. Though scoring 10 points triggers the end game, having 10 points may not be enough for victory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Gameplay&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No Diagonals - Diagonals do not exist in Logger. Any rule pertaining to adjacency or movement is orthogonal only.&lt;br /&gt;
&lt;br /&gt;
Each player&#039;s turn consists of three parts: Movement, Growth and Action.&lt;br /&gt;
&lt;br /&gt;
Movement - Move your logger up to two spaces. Loggers may not occupy or walk through spaces occupied by trees or other loggers.&lt;br /&gt;
&lt;br /&gt;
Growth - All trees in the same row and column your logger occupies grow 1 stage. All seedlings become saplings and all saplings become mature trees. Mature trees produce 1 seedling in any space adjacent to them if able. Please note growth of all trees is considered simultaneous, so no tree should experience two stages of growth in one turn, nor should any seedlings newly spawned from a mature tree this turn. All trees in your logger&#039;s row and column must grow or create a new seedling if able.&lt;br /&gt;
&lt;br /&gt;
Action - There are three options in the Action phase: Plant, Protest and Chop. You must perform an action if able. This phase is skipped if your logger is unable to perform any action.&lt;br /&gt;
&lt;br /&gt;
Plant - Plant one seedling in any space adjacent to your logger.&lt;br /&gt;
&lt;br /&gt;
Protest - You may place one or more protesters from your supply onto mature trees. Protested trees may not be directly chopped down by any player.&lt;br /&gt;
&lt;br /&gt;
Chop - Chop down an unprotested mature tree adjacent to your logger by removing it from the board. Chopping will create a domino effect. Any mature tree behind the first chopped tree will also be considered chopped and so on regardless if they have protesters on them not. This process stops when either the edge of the board or a space occupied by anything other than a mature tree is reached. Score 1 point for each tree removed in this way. Add any protesters from felled trees to your supply.&lt;br /&gt;
&lt;br /&gt;
For example, a given row can have this formation: Player-Mature Tree-Mature Tree-Sapling-Mature Tree. When the player chops the first tree, the second one will be removed as well. However, the domino effect ends at the sapling because it is not fully mature. The sapling and the last mature tree remain on the board.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;End Game&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Logger is a game of equal turns. When a player reaches 10 points, the end game condition is reached. All players who have not had a turn this round will get one final turn. (Example: Player 2 reaches 10 points. Players 3 and 4 will receive one additional turn, but Player 1 does not. However, if Player 4 reaches 10 points, the game ends immediately.)&lt;br /&gt;
&lt;br /&gt;
The player with the most points at the end of the game wins. In case of a tie, the player with more protesters in reserve wins.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1772</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1772"/>
		<updated>2016-02-14T17:46:00Z</updated>

		<summary type="html">&lt;p&gt;Een: /* About &amp;quot;First play&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* - &#039;&#039;&#039;Soft &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, each time you will get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* - &#039;&#039;&#039;Hard &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;br /&gt;
&lt;br /&gt;
Please also note how draws are handled:&lt;br /&gt;
* - if a month ends by lack of cards in hand and no player has managed to form a yaku, the dealer for the month (first player) gets 6 points (&#039;&#039;&#039;&amp;quot;dealer&#039;s privilege&amp;quot;&#039;&#039;&#039;);&lt;br /&gt;
* - if a month ends by lack of cards in hand and at least a player managed to form a yaku (and said &amp;quot;Koi!&amp;quot; to continue), it&#039;s a draw and nobody gets any points.&lt;br /&gt;
&lt;br /&gt;
== About &amp;quot;Viewing&amp;quot; yaku ==&lt;br /&gt;
&lt;br /&gt;
A few variants have been implementend for the &amp;quot;Viewing the Moon&amp;quot; and &amp;quot;Viewing the Cherry Blossoms&amp;quot; yaku:&lt;br /&gt;
* - &#039;&#039;&#039;Viewing yaku enabled&#039;&#039;&#039; : both yaku are available (this is the default)&lt;br /&gt;
* - &#039;&#039;&#039;Rain ruins the party&#039;&#039;&#039; : if a player captures at least one card of November (rain), the party is ruined, both yaku are unavailable for this player&lt;br /&gt;
* - &#039;&#039;&#039;Viewing yaku disabled&#039;&#039;&#039; : both yaku are unavailable.&lt;br /&gt;
&lt;br /&gt;
== About &amp;quot;First play&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Getting the first play (and thus being the first to choose from the field) is a nice advantage. Some variants have been made available upon request:&lt;br /&gt;
* - &#039;&#039;&#039;Winner starts the next month&#039;&#039;&#039; : the winner for the current month gets to play first the next month (this is the default)&lt;br /&gt;
* - &#039;&#039;&#039;Loser starts the next month&#039;&#039;&#039; : the player who lost this month gets to play first the next month&lt;br /&gt;
* - &#039;&#039;&#039;Alternate starting player&#039;&#039;&#039; : the player who didn&#039;t get to play first this month will play first the following month.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1771</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1771"/>
		<updated>2016-02-14T17:45:24Z</updated>

		<summary type="html">&lt;p&gt;Een: First to play variant&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* - &#039;&#039;&#039;Soft &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, each time you will get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* - &#039;&#039;&#039;Hard &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;br /&gt;
&lt;br /&gt;
Please also note how draws are handled:&lt;br /&gt;
* - if a month ends by lack of cards in hand and no player has managed to form a yaku, the dealer for the month (first player) gets 6 points (&#039;&#039;&#039;&amp;quot;dealer&#039;s privilege&amp;quot;&#039;&#039;&#039;);&lt;br /&gt;
* - if a month ends by lack of cards in hand and at least a player managed to form a yaku (and said &amp;quot;Koi!&amp;quot; to continue), it&#039;s a draw and nobody gets any points.&lt;br /&gt;
&lt;br /&gt;
== About &amp;quot;Viewing&amp;quot; yaku ==&lt;br /&gt;
&lt;br /&gt;
A few variants have been implementend for the &amp;quot;Viewing the Moon&amp;quot; and &amp;quot;Viewing the Cherry Blossoms&amp;quot; yaku:&lt;br /&gt;
* - &#039;&#039;&#039;Viewing yaku enabled&#039;&#039;&#039; : both yaku are available (this is the default)&lt;br /&gt;
* - &#039;&#039;&#039;Rain ruins the party&#039;&#039;&#039; : if a player captures at least one card of November (rain), the party is ruined, both yaku are unavailable for this player&lt;br /&gt;
* - &#039;&#039;&#039;Viewing yaku disabled&#039;&#039;&#039; : both yaku are unavailable.&lt;br /&gt;
&lt;br /&gt;
== About &amp;quot;First play&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Getting the first play (and thus being the first to choose from the field) is a nice advantage. Some variants have been added upon request:&lt;br /&gt;
* - &#039;&#039;&#039;Winner starts the next month&#039;&#039;&#039; : the winner for the current month gets to play first the next month (this is the default)&lt;br /&gt;
* - &#039;&#039;&#039;Loser starts the next month&#039;&#039;&#039; : the player who lost this month gets to play first the next month&lt;br /&gt;
* - &#039;&#039;&#039;Alternate starting player&#039;&#039;&#039; : the player who didn&#039;t get to play first this month will play first the following month.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1770</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1770"/>
		<updated>2016-02-14T17:23:39Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* - &#039;&#039;&#039;Soft &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, each time you will get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* - &#039;&#039;&#039;Hard &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;br /&gt;
&lt;br /&gt;
Please also note how draws are handled:&lt;br /&gt;
* - if a month ends by lack of cards in hand and no player has managed to form a yaku, the dealer for the month (first player) gets 6 points (&#039;&#039;&#039;&amp;quot;dealer&#039;s privilege&amp;quot;&#039;&#039;&#039;);&lt;br /&gt;
* - if a month ends by lack of cards in hand and at least a player managed to form a yaku (and said &amp;quot;Koi!&amp;quot; to continue), it&#039;s a draw and nobody gets any points.&lt;br /&gt;
&lt;br /&gt;
== About &amp;quot;Viewing&amp;quot; yaku ==&lt;br /&gt;
&lt;br /&gt;
A few variants have been implementend for the &amp;quot;Viewing the Moon&amp;quot; and &amp;quot;Viewing the Cherry Blossoms&amp;quot; yaku:&lt;br /&gt;
* - &#039;&#039;&#039;Viewing yaku enabled&#039;&#039;&#039; : both yaku are available&lt;br /&gt;
* - &#039;&#039;&#039;Rain ruins the party&#039;&#039;&#039; : if a player captures at least one card of November (rain), the party is ruined, both yaku are unavailable for this player&lt;br /&gt;
* - &#039;&#039;&#039;Viewing yaku disabled&#039;&#039;&#039; : both yaku are unavailable.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1769</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1769"/>
		<updated>2016-02-04T22:15:19Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* - &#039;&#039;&#039;Soft &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, each time you will get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* - &#039;&#039;&#039;Hard &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;br /&gt;
&lt;br /&gt;
Please also note how draws are handled:&lt;br /&gt;
* - if a month ends by lack of cards in hand and no player has managed to form a yaku, the dealer for the month (first player) gets 6 points (&#039;&#039;&#039;&amp;quot;dealer&#039;s privilege&amp;quot;&#039;&#039;&#039;);&lt;br /&gt;
* - if a month ends by lack of cards in hand and at least a player managed to form a yaku (and said &amp;quot;Koi!&amp;quot; to continue), it&#039;s a draw and nobody gets any points.&lt;br /&gt;
&lt;br /&gt;
== About &amp;quot;Viewing&amp;quot; yaku ==&lt;br /&gt;
&lt;br /&gt;
A few variants have been implementend for the &amp;quot;Viewing the Moon&amp;quot; and &amp;quot;Viewing the Cherry Blossoms&amp;quot; yaku:&lt;br /&gt;
* - &#039;&#039;&#039;Standard&#039;&#039;&#039; : both yaku are available&lt;br /&gt;
* - &#039;&#039;&#039;Rain ruins the party&#039;&#039;&#039; : if a player captures at least one card of November (rain), the party is ruined, both yaku are unavailable for this player&lt;br /&gt;
* - &#039;&#039;&#039;No viewing yaku&#039;&#039;&#039; : both yaku are unavailable.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1768</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1768"/>
		<updated>2016-02-04T22:13:38Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* - &#039;&#039;&#039;Soft &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, each time you will get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* - &#039;&#039;&#039;Hard &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;br /&gt;
&lt;br /&gt;
Please also note that:&lt;br /&gt;
* - if a month ends by lack of cards in hand and no player has managed to form a yaku, the dealer for the month (first player) gets 6 points (&amp;quot;dealer&#039;s privilege&amp;quot;);&lt;br /&gt;
* - if a month ends by lack of cards in hand and at least a player managed to form a yaku (and said &amp;quot;Koi!&amp;quot; to continue), it&#039;s a draw and nobody gets any points.&lt;br /&gt;
&lt;br /&gt;
== About &amp;quot;Viewing&amp;quot; yaku ==&lt;br /&gt;
&lt;br /&gt;
A few variants have been implementend for the &amp;quot;Viewing the Moon&amp;quot; and &amp;quot;Viewing the Cherry Blossoms&amp;quot; yaku:&lt;br /&gt;
* - &#039;&#039;&#039;Standard&#039;&#039;&#039; : both yaku are available&lt;br /&gt;
* - &#039;&#039;&#039;Rain ruins the party&#039;&#039;&#039; : if a player captures at least one card of November (rain), the party is ruined, both yaku are unavailable for this player&lt;br /&gt;
* - &#039;&#039;&#039;No viewing yaku&#039;&#039;&#039; : both yaku are unavailable.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Main_game_logic:_yourgamename.game.php&amp;diff=1765</id>
		<title>Main game logic: yourgamename.game.php</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Main_game_logic:_yourgamename.game.php&amp;diff=1765"/>
		<updated>2016-02-04T10:06:15Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Notify players */ tip on player name highlighting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This file is the main file for your game logic. Here you initialize the game, persist data, implement the rules and notify changes to the client interface.&lt;br /&gt;
&lt;br /&gt;
== File Structure ==&lt;br /&gt;
&lt;br /&gt;
The details on how the file is structured is described directly with comments on the code skeleton provided to you.&lt;br /&gt;
 &lt;br /&gt;
Basically, here&#039;s this structure:&lt;br /&gt;
* EmptyGame (constructor): where you define global variables.&lt;br /&gt;
* setupNewGame: initial setup of the game.&lt;br /&gt;
* getAllDatas: where you retrieve all game data during a complete reload of the game.&lt;br /&gt;
* getGameProgression: where you compute the game progression indicator.&lt;br /&gt;
* Utility functions: your utility functions.&lt;br /&gt;
* Player actions: the entry points for players actions. &lt;br /&gt;
* Game state arguments: methods to return additional data on specific game states ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#args more info here]).&lt;br /&gt;
* Game state actions: the logic to run when entering a new game state ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#action more info here]).&lt;br /&gt;
* zombieTurn: what to do it&#039;s the turn of a zombie player.&lt;br /&gt;
&lt;br /&gt;
== Accessing player informations ==&lt;br /&gt;
&lt;br /&gt;
; getPlayersNumber()&lt;br /&gt;
: Returns the number of players playing at the table&lt;br /&gt;
: Note: doesn&#039;t work in setupNewGame so use count($players) instead&lt;br /&gt;
&lt;br /&gt;
; getActivePlayerId()&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot;, whatever what is the current state type.&lt;br /&gt;
: Note: it does NOT mean that this player is active right now, because state type could be &amp;quot;game&amp;quot; or &amp;quot;multiplayer&amp;quot;&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
&lt;br /&gt;
; getActivePlayerName()&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot; name&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
&lt;br /&gt;
; loadPlayersBasicInfos()&lt;br /&gt;
: Get an associative array with generic data about players (ie: not game specific data).&lt;br /&gt;
: The key of the associative array is the player id.&lt;br /&gt;
: The content of each value is:&lt;br /&gt;
: * player_name&lt;br /&gt;
: * player_color (ex: ff0000)&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerId()&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot;. The current player is the one from which the action originated (the one who send the request).&lt;br /&gt;
: &#039;&#039;&#039;Be careful&#039;&#039;&#039;: It is not always the active player.&lt;br /&gt;
: In general, you shouldn&#039;t use this method, unless you are in &amp;quot;multiplayer&amp;quot; state.&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerName()&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; name&lt;br /&gt;
: Be careful using this method (see above).&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerColor()&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; color&lt;br /&gt;
: Be careful using this method (see above).&lt;br /&gt;
&lt;br /&gt;
; isCurrentPlayerZombie()&lt;br /&gt;
: Check the &amp;quot;current_player&amp;quot; zombie status. If true, player leave the game.&lt;br /&gt;
&lt;br /&gt;
== Accessing database ==&lt;br /&gt;
&lt;br /&gt;
The main game logic should be the only point from where you should access to the game database. You access your database using SQL queries with the methods below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BGA is using [http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-transactions.html database transactions]. It means that your database changes WON&#039;T BE APPLIED to the database until your request ends normally. Using transaction is in fact very useful for you: at any time, if your game logic detects that something is wrong (ex: unallowed move), you just have to throw an exception and all the changes already performed on the game situation will be removed.&lt;br /&gt;
&lt;br /&gt;
; DbQuery( $sql )&lt;br /&gt;
: This is the generic method to access the database.&lt;br /&gt;
: It can execute any type of SELECT/UPDATE/DELETE/REPLACE query on the database.&lt;br /&gt;
: You should use it for UPDATE/DELETE/REPLACE query. For SELECT queries, the specialized methods below are much better.&lt;br /&gt;
&lt;br /&gt;
; getUniqueValueFromDB( $sql )&lt;br /&gt;
: Returns a unique value from DB or null if no value is found.&lt;br /&gt;
: $sql must be a SELECT query.&lt;br /&gt;
: Raise an exception if more than 1 row is returned.&lt;br /&gt;
&lt;br /&gt;
; getCollectionFromDB( $sql, $bSingleValue=false )&lt;br /&gt;
: Returns an associative array of rows for a sql SELECT query.&lt;br /&gt;
: The key of the resulting associative array is the first field specified in the SELECT query.&lt;br /&gt;
: The value of the resulting associative array if an associative array with all the field specified in the SELECT query and associated values.&lt;br /&gt;
: First column must be a primary or alternate key.&lt;br /&gt;
: The resulting collection can be empty.&lt;br /&gt;
: If you specified $bSingleValue=true and if your SQL query request 2 fields A and B, the method returns an associative array &amp;quot;A=&amp;gt;B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self::getCollectionFromDB( &amp;quot;SELECT player_id id, player_name name, player_score score FROM player&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
array(&lt;br /&gt;
 1234 =&amp;gt; array( &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ),&lt;br /&gt;
 1235 =&amp;gt; array( &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 )&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self::getCollectionFromDB( &amp;quot;SELECT player_id id, player_name name FROM player&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
array(&lt;br /&gt;
 1234 =&amp;gt; &#039;myuser0&#039;,&lt;br /&gt;
 1235 =&amp;gt; &#039;myuser1&#039;&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyCollectionFromDB( $sql )&lt;br /&gt;
: Idem than previous one, but raise an exception if the collection is empty&lt;br /&gt;
&lt;br /&gt;
; function getObjectFromDB( $sql )&lt;br /&gt;
: Returns one row for the sql SELECT query as an associative array or null if there is no result&lt;br /&gt;
: Raise an exception if the query return more than one row&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self::getObjectFromDB( &amp;quot;SELECT player_id id, player_name name, player_score score FROM player WHERE player_id=&#039;$player_id&#039;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
array(&lt;br /&gt;
  &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 &lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyObjectFromDB( $sql )&lt;br /&gt;
: Idem than previous one, but raise an exception if no row is found&lt;br /&gt;
&lt;br /&gt;
; getObjectListFromDB( $sql, $bUniqueValue=false )&lt;br /&gt;
: Return an array of rows for a sql SELECT query.&lt;br /&gt;
: the result if the same than &amp;quot;getCollectionFromDB&amp;quot; except that the result is a simple array (and not an associative array).&lt;br /&gt;
: The result can be empty.&lt;br /&gt;
: If you specified $bUniqueValue=true and if your SQL query request 1 field, the method returns directly an array of values.&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self::getObjectListFromDB( &amp;quot;SELECT player_id id, player_name name, player_score score FROM player&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
array(&lt;br /&gt;
 array( &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ),&lt;br /&gt;
 array( &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 )&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self::getObjectListFromDB( &amp;quot;SELECT player_name name FROM player&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
array(&lt;br /&gt;
 &#039;myuser0&#039;,&lt;br /&gt;
 &#039;myuser1&#039;&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getDoubleKeyCollectionFromDB( $sql, $bSingleValue=false )&lt;br /&gt;
: Return an associative array of associative array, from a SQL SELECT query.&lt;br /&gt;
: First array level correspond to first column specified in SQL query.&lt;br /&gt;
: Second array level correspond to second column specified in SQL query.&lt;br /&gt;
: If bSingleValue = true, keep only third column on result&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; DbGetLastId()&lt;br /&gt;
: Return the PRIMARY key of the last inserted row (see PHP mysql_insert_id function).&lt;br /&gt;
&lt;br /&gt;
; DbAffectedRow()&lt;br /&gt;
: Return the number of row affected by the last operation&lt;br /&gt;
&lt;br /&gt;
; escapeStringForDB( $string )&lt;br /&gt;
: You must use this function on every string type data in your database that contains unsafe data.&lt;br /&gt;
: (unsafe = can be modified by a player).&lt;br /&gt;
: This method makes sure that no SQL injection will be done through the string used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self::getObjectFromDB( &amp;quot;SELECT player_name name, player_color color FROM player WHERE player_id=&#039;1234&#039;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
array(&lt;br /&gt;
 &#039;id&#039; =&amp;gt; 1234,&lt;br /&gt;
 &#039;name&#039; =&amp;gt; &#039;myuser1&#039;,&lt;br /&gt;
 &#039;color&#039; =&amp;gt; &#039;ff0000&#039;&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: see Editing [[Game database model: dbmodel.sql]] to know how to define your database model.&lt;br /&gt;
&lt;br /&gt;
== Use globals ==&lt;br /&gt;
&lt;br /&gt;
Sometimes, you have to keep a single integer value that is global to your game, and you don&#039;t want to create a DB table specifically for it.&lt;br /&gt;
&lt;br /&gt;
Using a BGA framework &amp;quot;global&amp;quot;, you can do such a thing. Your value will be stored in the &amp;quot;global&amp;quot; table in database, and you can access it with simple methods.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;initGameStateLabels&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method is located at the beginning of your game logic. This is the place you defines the globals used in your game logic, by assigning them IDs.&lt;br /&gt;
&lt;br /&gt;
You can define up to 79 globals, with IDs from 10 to 89. You must NOT use globals outside this range as globals are used by other components of the framework.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        self::initGameStateLabels( array( &lt;br /&gt;
                &amp;quot;my_first_global_variable&amp;quot; =&amp;gt; 10,&lt;br /&gt;
                &amp;quot;my_second_global_variable&amp;quot; =&amp;gt; 11&lt;br /&gt;
        ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateInitialValue( $value_label, $value_value )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Init your global value. Must be called before any use of your global, so you should call this method from your &amp;quot;setupNewGame&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getGameStateValue( $value_label )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Retrieve the current value of a global.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateValue( $value_label, $value_value )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Set the current value of a global.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;incGameStateValue( $value_label, $increment )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increment the current value of a global. If increment is negative, decrement the value of the global.&lt;br /&gt;
&lt;br /&gt;
Return the final value of the global.&lt;br /&gt;
&lt;br /&gt;
== Game states and active players ==&lt;br /&gt;
&lt;br /&gt;
; checkAction( $actionName, $bThrowException=true )&lt;br /&gt;
: Check if action is valid regarding current game state (exception if fails)&lt;br /&gt;
: The action is valid if it is listed as a &amp;quot;possibleactions&amp;quot; in the current game state (see game state description).&lt;br /&gt;
: This method MUST be called in the first place in ALL your PHP methods that handle players action, in order to make sure a player can&#039;t do an action when the rules disallow it at this moment of the game.&lt;br /&gt;
: if &amp;quot;bThrowException&amp;quot; is set to &amp;quot;false&amp;quot;, the function return false in case of failure instead of throwing and exception. This is useful when several actions are possible in order to test each of them without throwing exceptions.&lt;br /&gt;
&lt;br /&gt;
; activeNextPlayer()&lt;br /&gt;
: Make the next player active in the natural player order.&lt;br /&gt;
: Note: you CANT use this method in a &amp;quot;activeplayer&amp;quot; or &amp;quot;multipleactiveplayer&amp;quot; state. You must use a &amp;quot;game&amp;quot; type game state for this.&lt;br /&gt;
&lt;br /&gt;
; activePrevPlayer()&lt;br /&gt;
: Make the previous player active (in the natural player order).&lt;br /&gt;
: Note: you CANT use this method in a &amp;quot;activeplayer&amp;quot; or &amp;quot;multipleactiveplayer&amp;quot; state. You must use a &amp;quot;game&amp;quot; type game state for this.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;changeActivePlayer( $player_id )&lt;br /&gt;
: You can call this method to make any player active.&lt;br /&gt;
: Note: you CANT use this method in a &amp;quot;activeplayer&amp;quot; or &amp;quot;multipleactiveplayer&amp;quot; state. You must use a &amp;quot;game&amp;quot; type game state for this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getActivePlayerList()&lt;br /&gt;
: With this method you can retrieve the list of the active player at any time.&lt;br /&gt;
: During a &amp;quot;game&amp;quot; type gamestate, it will return a void array.&lt;br /&gt;
: During a &amp;quot;activeplayer&amp;quot; type gamestate, it will return an array with one value (the active player id).&lt;br /&gt;
: during a &amp;quot;multipleactiveplayer&amp;quot; type gamestate, it will return an array of the active players id.&lt;br /&gt;
: Note: you should only use this method is the latter case.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive()&lt;br /&gt;
: With this method, all playing players are made active.&lt;br /&gt;
: Usually, you use this method at the beginning (ex: &amp;quot;st&amp;quot; action method) of a multiplayer game state when all players have to do some action.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive( $players, $next_state )&lt;br /&gt;
: Make a specific list of players active during a multiactive gamestate.&lt;br /&gt;
: Bare in mind it doesn&#039;t deactivate other previously active players.&lt;br /&gt;
: &amp;quot;players&amp;quot; is the array of player id that should be made active.&lt;br /&gt;
: In case &amp;quot;players&amp;quot; is empty, the method trigger the &amp;quot;next_state&amp;quot; transition to go to the next game state.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $player_id, $next_state )&lt;br /&gt;
: During a multiactive game state, make the specified player inactive.&lt;br /&gt;
: Usually, you call this method during a multiactive game state after a player did his action.&lt;br /&gt;
: If this player was the last active player, the method trigger the &amp;quot;next_state&amp;quot; transition to go to the next game state.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction( $action )&lt;br /&gt;
: (rarely used)&lt;br /&gt;
: This works exactly like &amp;quot;checkAction&amp;quot;, except that it do NOT check if current player is active.&lt;br /&gt;
: This is used specifically in certain game states when you want to authorize some additional actions for players that are not active at the moment.&lt;br /&gt;
: Example: in Libertalia game, you want to authorize players to change their mind about card played. They are of course not active at the time they change their mind, so you cannot use &amp;quot;checkAction&amp;quot; and use &amp;quot;checkPossibleAction&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
== Players turn order ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getNextPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return an associative array which associate each player with the next player around the table.&lt;br /&gt;
&lt;br /&gt;
In addition, key 0 is associated to the first player to play.&lt;br /&gt;
&lt;br /&gt;
Example: if three player with ID 1, 2 and 3 are around the table, in this order, the method returns:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   array( &lt;br /&gt;
    1 =&amp;gt; 2, &lt;br /&gt;
    2 =&amp;gt; 3, &lt;br /&gt;
    3 =&amp;gt; 1, &lt;br /&gt;
    0 =&amp;gt; 1 &lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPrevPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, but the associative array associate the previous player around the table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerAfter( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing after given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerBefore( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing before given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
== Notify players ==&lt;br /&gt;
&lt;br /&gt;
To understand notifications, please read [http://www.slideshare.net/boardgamearena/the-bga-framework-at-a-glance The BGA Framework at a glance] first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Notifications are sent at the very end of the request, when it ends normally. It means that if you throw an exception for any reason (ex: move not allowed), no notifications will be sent to players.&lt;br /&gt;
Notifications sent between the game start (setupNewGame) and the end of the &amp;quot;action&amp;quot; method of the first active state will never reach their destination.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;notifyAllPlayers( $notification_type, $notification_log, $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Send a notification to all players of the game.&lt;br /&gt;
&lt;br /&gt;
* notification_type:&lt;br /&gt;
A string that defines the type of your notification.&lt;br /&gt;
&lt;br /&gt;
Your game interface Javascript logic will use this to know what is the type of the received notification (and to trigger the corresponding method).&lt;br /&gt;
&lt;br /&gt;
* notification_log:&lt;br /&gt;
A string that defines what is to be displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
You can use an empty string here (&amp;quot;&amp;quot;). In this case, nothing is displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
If you define a real string here, you should use &amp;quot;clienttranslate&amp;quot; method to make sure it can be translate.&lt;br /&gt;
&lt;br /&gt;
You can use arguments in your notification_log strings, that refers to values defines in the &amp;quot;notification_args&amp;quot; argument (see below). NB: Make sure you only use single quotes (&#039;), otherwise PHP will try to interpolate the variable and will ignore the values in the args array.&lt;br /&gt;
&lt;br /&gt;
Note: you CAN use some HTML inside your notification log, and it is working. However:&lt;br /&gt;
_ pay attention to keep the log clear.&lt;br /&gt;
_ try to not include some HTML tags inside the &amp;quot;clienttranslate&amp;quot; method, otherwise it will make the translators work more difficult. You can use a notification argument instead, and provide your HTML through this argument.&lt;br /&gt;
&lt;br /&gt;
* notification_args:&lt;br /&gt;
The arguments of your notifications, as an associative array.&lt;br /&gt;
&lt;br /&gt;
This array will be transmitted to the game interface logic, in order the game interface can be updated.&lt;br /&gt;
&lt;br /&gt;
Complete notifyAllPlayers example (from &amp;quot;Reversi&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self::notifyAllPlayers( &amp;quot;playDisc&amp;quot;, clienttranslate( &#039;${player_name} plays a disc and turns over ${returned_nbr} disc(s)&#039; ), array(&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; self::getActivePlayerName(),&lt;br /&gt;
        &#039;returned_nbr&#039; =&amp;gt; count( $turnedOverDiscs ),&lt;br /&gt;
        &#039;x&#039; =&amp;gt; $x,&lt;br /&gt;
        &#039;y&#039; =&amp;gt; $y&lt;br /&gt;
     ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see in the example above the use of the &amp;quot;clienttranslate&amp;quot; method, and the use of 2 arguments &amp;quot;player_name&amp;quot; and &amp;quot;returned_nbr&amp;quot; in the notification log.&lt;br /&gt;
&lt;br /&gt;
Important: NO private data must be sent with this method, as a cheater could see it even it is not used explicitly by the game interface logic. If you want to send private information to a player, please use notifyPlayer below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;notifyPlayer( $player_id, $notification_type, $notification_log, $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, except that the notification is sent to one player only.&lt;br /&gt;
&lt;br /&gt;
This method must be used each time some private information must be transmitted to a player.&lt;br /&gt;
&lt;br /&gt;
Important: the variable for player name must be ${player_name} in order to be highlighted with the player color in the game log&lt;br /&gt;
&lt;br /&gt;
== Game statistics ==&lt;br /&gt;
&lt;br /&gt;
There are 2 types of statistics:&lt;br /&gt;
* a &amp;quot;player&amp;quot; statistic is a statistic associated to a player&lt;br /&gt;
* a &amp;quot;table&amp;quot; statistics is a statistic not associated to a player (global statistic for this game).&lt;br /&gt;
&lt;br /&gt;
See [[Game statistics: stats.inc.php]] to see how you defines statistics for your game.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;initStat( $table_or_player, $name, $value, $player_id=null )&#039;&#039;&#039;&lt;br /&gt;
Create a statistic entry for the specified statistics with a default value.&lt;br /&gt;
This method must be called for each statistics of your game, in your setupNewGame method.&lt;br /&gt;
&lt;br /&gt;
&#039;table_or_player&#039; must be set to &amp;quot;table&amp;quot; if this is a table statistics, or &amp;quot;player&amp;quot; if this is a player statistics.&lt;br /&gt;
&lt;br /&gt;
&#039;name&#039; is the name of your statistics, as it has been defined in your stats.inc.php file.&lt;br /&gt;
&lt;br /&gt;
&#039;value&#039; is the initial value of the statistics. If this is a player statistics and if the player is not specified by &amp;quot;player_id&amp;quot; argument, the value is set for ALL players.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;function setStat( $value, $name, $player_id = null )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Set a statistic value.&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;player_id&amp;quot; is not specified, setStat consider it is a TABLE statistic.&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;player_id&amp;quot; is specified, setStat consider it is a PLAYER statistic.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;incStat( $delta, $name, $player_id = null )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increment (or decrement) specified statistic value. Same behavior as above.&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
See [[Translations]]&lt;br /&gt;
&lt;br /&gt;
== Manage player scores and Tie breaker ==&lt;br /&gt;
&lt;br /&gt;
At the end of the game, players automatically get a rank depending on their score: the player with the biggest score is #1, the player with the second biggest score is #2, and so on...&lt;br /&gt;
&lt;br /&gt;
During the game, you update player&#039;s score directly by updating &amp;quot;player_score&amp;quot; field of &amp;quot;player&amp;quot; table in database.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  // +2 points to active player&lt;br /&gt;
  self::DbQuery( &amp;quot;UPDATE player SET player_score=player_score+2 WHERE player_id=&#039;&amp;quot;.self::getActivePlayerId().&amp;quot;&#039;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
  // Set score of active player to 5&lt;br /&gt;
  self::DbQuery( &amp;quot;UPDATE player SET player_score=5 WHERE player_id=&#039;&amp;quot;.self::getActivePlayerId().&amp;quot;&#039;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: don&#039;t forget to notify the client side in order the score control can be updated accordingly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tie breaker&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tie breaker is used when two players get the same score at the end of a game.&lt;br /&gt;
&lt;br /&gt;
Tie breaker is using &amp;quot;player_score_aux&amp;quot; field of &amp;quot;player&amp;quot; table. It is updated exactly like the &amp;quot;player_score&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
Tie breaker score is displayed only for players who are tied at the end of the game. Most of the time, it is not supposed to be displayed explicitly during the game.&lt;br /&gt;
&lt;br /&gt;
When you are using &amp;quot;player_score_aux&amp;quot; functionality, you must describe the formula to use in your gameinfos.inc.php file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         &#039;tie_breaker_description&#039; =&amp;gt; totranslate(&amp;quot;Describe here your tie breaker formula&amp;quot;),&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This description will be used as a tooltip to explain to players how this auxiliary score has been calculated.&lt;br /&gt;
&lt;br /&gt;
== Reflexion time ==&lt;br /&gt;
&lt;br /&gt;
; function giveExtraTime( $player_id, $specific_time=null )&lt;br /&gt;
: Give standard extra time to this player.&lt;br /&gt;
: Standard extra time depends on the speed of the game (small with &amp;quot;slow&amp;quot; game option, bigger with other options).&lt;br /&gt;
: You can also specify an exact time to add, in seconds, with the &amp;quot;specified_time&amp;quot; argument (rarely used).&lt;br /&gt;
&lt;br /&gt;
== Managing errors and exceptions ==&lt;br /&gt;
&lt;br /&gt;
Note: when you throw an exception, all database changes and all notifications are cancelled immediately. This way, the game situation that were existing before the request is completely restored.&lt;br /&gt;
&lt;br /&gt;
; throw new BgaUserException ( $error_message)&lt;br /&gt;
: Base class to notify a user error&lt;br /&gt;
: You must throw this exception when a player want to do something that he is not allowed to do.&lt;br /&gt;
: The error message will be shown to the player as a &amp;quot;red message&amp;quot;, so it must be translated.&lt;br /&gt;
: Throwing such an exception is NOT considered as a bug, so it is not traced in BGA error logs.&lt;br /&gt;
&lt;br /&gt;
Example from Gomoku:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     throw new BgaUserException( self::_(&amp;quot;There is already a stone on this intersection, you can&#039;t play there&amp;quot;) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; throw new BgaVisibleSystemException ( $error_message)&lt;br /&gt;
: You must throw this exception when you detect something that is not supposed to happened into your code.&lt;br /&gt;
: The error message is shown to the user as an &amp;quot;Unexpected error&amp;quot;, in order he can report it in the forum.&lt;br /&gt;
: The error message is logged in BGA error logs. If it happens regularly, we will report it to you.&lt;br /&gt;
&lt;br /&gt;
; throw new BgaSystemException ( $error_message)&lt;br /&gt;
: Base class to notify a system exception. The message will be hidden from the user, but show in the logs. Use this if the message contains technical information.&lt;br /&gt;
: You shouldn&#039;t use this type of exception except if you think the information shown could be critical. Indeed: a generic error message will be shown to the user, so it&#039;s going to be difficult for you to see what happened.&lt;br /&gt;
&lt;br /&gt;
== Zombie mode ==&lt;br /&gt;
&lt;br /&gt;
When a player leaves a game for any reason (expelled, quit), he becomes a &amp;quot;zombie player&amp;quot;. In this case, the results of the game won&#039;t count for statistics, but this is cool if the other players can finish the game anyway. That&#039;s why zombie mode exists: allow the other player to finish the game, even if the situation is not ideal.&lt;br /&gt;
&lt;br /&gt;
While developing your zombie mode, keep in mind that:&lt;br /&gt;
* Do not refer to the rules, because this situation is not planned by the rules.&lt;br /&gt;
* Try to figure that you are playing with your friends and one of them has to leave: how can we finish the game without killing the spirit of the game?&lt;br /&gt;
* The idea is NOT to develop an artificial intelligence for the game.&lt;br /&gt;
&lt;br /&gt;
Most of the time, the best thing to do when it is zombie player turn is to jump immediately to a state where he is not active anymore. For example, if he is in a game state where he has a choice between playing A and playing B, the best thing to do is NOT to choose A or B, but to pass. So, even if there&#039;s no &amp;quot;pass&amp;quot; action in the rules, add a &amp;quot;zombiepass&amp;quot; transitition in your game state and use it.&lt;br /&gt;
&lt;br /&gt;
Each time a zombie player must play, your &amp;quot;zombieTurn&amp;quot; method is called.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* $state: the name of the current game state.&lt;br /&gt;
* $active_player: the id of the active player.&lt;br /&gt;
&lt;br /&gt;
Most of the time, your zombieTurn method looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function zombieTurn( $state, $active_player )&lt;br /&gt;
    {&lt;br /&gt;
    	$statename = $state[&#039;name&#039;];&lt;br /&gt;
&lt;br /&gt;
        if( $statename == &#039;myFirstGameState&#039;&lt;br /&gt;
             ||  $statename == &#039;my2ndGameState&#039;&lt;br /&gt;
             ||  $statename == &#039;my3rdGameState&#039;&lt;br /&gt;
               ....&lt;br /&gt;
           )&lt;br /&gt;
        {&lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextState( &amp;quot;zombiePass&amp;quot; );&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            throw new BgaVisibleSystemException( &amp;quot;Zombie mode not supported at this game state: &amp;quot;.$statename );&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that in the example above, all corresponding game state should implement &amp;quot;zombiePass&amp;quot; as a transition.&lt;br /&gt;
&lt;br /&gt;
== Player elimination ==&lt;br /&gt;
&lt;br /&gt;
In some games, this is useful to eliminate a player from the game in order he/she can start another game without waiting for the current game end.&lt;br /&gt;
&lt;br /&gt;
This case should be rare. Please don&#039;t use player elimination feature if some player just has to wait the last 10% of the game for game end. This feature should be used only in games where players are eliminated all along the game (typical examples: &amp;quot;Perudo&amp;quot; or &amp;quot;The Werewolves of Miller&#039;s Hollow&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
* Player to eliminate should NOT be active anymore (preferably use the feature in a &amp;quot;game&amp;quot; type game state).&lt;br /&gt;
* In your PHP code:&lt;br /&gt;
  self::eliminatePlayer( &amp;lt;player_to_eliminate_id&amp;gt; );&lt;br /&gt;
* the player is informed in a dialog box that he no longer have to played and can start another game if he/she wants too (whith buttons &amp;quot;stay at this table&amp;quot; &amp;quot;quit table and back to main site&amp;quot;). In any case, the player is free to tart&amp;amp;join another table from now.&lt;br /&gt;
* When your game is over, all players who have been eliminated before receive a &amp;quot;notification&amp;quot; (the small &amp;quot;!&amp;quot; icon on the top right of the BGA interface) that indicate them that &amp;quot;the game has ended&amp;quot; and invite them to review the game results.&lt;br /&gt;
&lt;br /&gt;
== Player color preferences ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BGA players (Club members) may now choose their preferred color for playing. For example, if they are used to play green for every board game, they can select &amp;quot;green&amp;quot; in their BGA preferences page.&lt;br /&gt;
&lt;br /&gt;
Making your game compatible with colors preferences is very easy and requires only 1 line of PHP and 1 configuration change :&lt;br /&gt;
&lt;br /&gt;
On your gameinfos.inc.php file, add the following lines :&lt;br /&gt;
&lt;br /&gt;
  // Favorite colors support : if set to &amp;quot;true&amp;quot;, support attribution of favorite colors based on player&#039;s preferences (see reattributeColorsBasedOnPreferences PHP method)&lt;br /&gt;
  &#039;favorite_colors_support&#039; =&amp;gt; true,&lt;br /&gt;
&lt;br /&gt;
Then, on your main &amp;lt;your_game&amp;gt;.game.php file, find the &amp;quot;reloadPlayersBasicInfos&amp;quot; call in your &amp;quot;setupNewGame&amp;quot; method and replace :&lt;br /&gt;
&lt;br /&gt;
        $sql .= implode( $values, &#039;,&#039; );&lt;br /&gt;
        self::DbQuery( $sql );&lt;br /&gt;
        self::reloadPlayersBasicInfos();&lt;br /&gt;
&lt;br /&gt;
By :&lt;br /&gt;
&lt;br /&gt;
        $sql .= implode( $values, &#039;,&#039; );&lt;br /&gt;
        self::DbQuery( $sql );&lt;br /&gt;
        self::reattributeColorsBasedOnPreferences( $players, array(  /* LIST HERE THE AVAILABLE COLORS OF YOUR GAME INSTEAD OF THESE ONES */&amp;quot;ff0000&amp;quot;, &amp;quot;008000&amp;quot;, &amp;quot;0000ff&amp;quot;, &amp;quot;ffa500&amp;quot;, &amp;quot;773300&amp;quot; ) );&lt;br /&gt;
        self::reloadPlayersBasicInfos();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;reattributeColorsBasedOnPreferences&amp;quot; method reattributes all colors, taking into account players color preferences and available colors.&lt;br /&gt;
&lt;br /&gt;
Note that you must update the colors to indicate the colors available for your game.&lt;br /&gt;
&lt;br /&gt;
2 important remarks :&lt;br /&gt;
* for some games (ex : Chess), the color has an influence on a mechanism of the game, most of the time by giving a special advantage to a player (ex : Starting the game). Color preference mechanism must NOT be used in such a case.&lt;br /&gt;
* your logic should NEVER consider that the first player has the color X, that the second player has the color Y, and so on. If this is the case, your game will NOT be compatible with reattributeColorsBasedOnPreferences as this method attribute colors to players based on their preferences and not based as their order at the table.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1764</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1764"/>
		<updated>2016-02-04T08:58:19Z</updated>

		<summary type="html">&lt;p&gt;Een: Added variants&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* - &#039;&#039;&#039;Soft &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, each time you will get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* - &#039;&#039;&#039;Hard &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;br /&gt;
&lt;br /&gt;
== A few variants ==&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;Viewing the Moon&amp;quot; and &amp;quot;Viewing the Cherry Blossoms&amp;quot; :&lt;br /&gt;
* - &#039;&#039;&#039;Standard&#039;&#039;&#039; : both yaku are available&lt;br /&gt;
* - &#039;&#039;&#039;Rain ruins the party&#039;&#039;&#039; : if a player captures at least one card of November (rain), the party is ruined, both yaku are unavailable for this player&lt;br /&gt;
* - &#039;&#039;&#039;No viewing yaku&#039;&#039;&#039; : both yaku are unavailable.&lt;br /&gt;
&lt;br /&gt;
For managing draws at the end of the month :&lt;br /&gt;
* - &#039;&#039;&#039;No points awarded&#039;&#039;&#039; : no player gets any points in case of a draw&lt;br /&gt;
* - &#039;&#039;&#039;Dealer`s privilege&#039;&#039;&#039; : the dealer (first player) gets 6 points in case of a draw.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1761</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1761"/>
		<updated>2016-02-01T17:23:27Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* - &#039;&#039;&#039;Soft &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, each time you will get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* - &#039;&#039;&#039;Hard &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1760</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1760"/>
		<updated>2016-02-01T17:21:10Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* &#039;&#039;&#039;Soft &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, each time you will get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* &#039;&#039;&#039;Hard &amp;quot;Koi!&amp;quot;&#039;&#039;&#039; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1759</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1759"/>
		<updated>2016-02-01T17:15:54Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* Soft &amp;quot;Koi!&amp;quot; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, each time you will get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* Hard &amp;quot;Koi!&amp;quot; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1758</id>
		<title>Gamehelpkoikoi</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpkoikoi&amp;diff=1758"/>
		<updated>2016-02-01T14:44:58Z</updated>

		<summary type="html">&lt;p&gt;Een: Created page with &amp;quot;== About yaku (card combinations) ==  You can use the &amp;#039;&amp;#039;&amp;#039;in game help icon&amp;#039;&amp;#039;&amp;#039; to display a popup listing all the possible yaku and how many points they are worth.   All the ya...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About yaku (card combinations) ==&lt;br /&gt;
&lt;br /&gt;
You can use the &#039;&#039;&#039;in game help icon&#039;&#039;&#039; to display a popup listing all the possible yaku and how many points they are worth. &lt;br /&gt;
&lt;br /&gt;
All the yaku are &#039;&#039;&#039;combinative&#039;&#039;&#039;, except the &amp;quot;Bright&amp;quot; cards yaku, which are exclusive (you will always score the biggest available).&lt;br /&gt;
&lt;br /&gt;
== About multipliers ==&lt;br /&gt;
&lt;br /&gt;
As is often the case with traditional games, there is a lot of variants for playing Koi-koi, especially in regards to scoring.&lt;br /&gt;
&lt;br /&gt;
For Board Game Arena, two variants are provided through the options when creating the game:&lt;br /&gt;
* Soft &amp;quot;Koi!&amp;quot; is a variant adapted from [http://www.sloperama.com/hanafuda/rules.html the Sloperama site rules] which is all about saying &amp;quot;Koi!&amp;quot;. Of course you run the risk of your opponent making a yaku and scoring for the month (round) before you can score yourself, but in exchange for that risk, you get &#039;&#039;&#039;a multiplier&#039;&#039;&#039; so that if you manage to increase your score with another yaku, you will score a lot more. Also, a starting multiplier will be set for the month if some &amp;quot;Bright cards&amp;quot; have been drawn for the field when dealing for the month. So this is an aggressive variant with a lot of points available if you push your luck.&lt;br /&gt;
* Hard &amp;quot;Koi:&amp;quot; is a variant adapted from [https://web.archive.org/web/20120421175954/http://hanafubuki.org/koikoi.html the Hanafubuki site rules] which is less incitative to call &amp;quot;Koi!&amp;quot; since you won&#039;t get a multiplier just for saying &amp;quot;Koi!&amp;quot;. Instead, &#039;&#039;&#039;your opponent&#039;&#039;&#039; will! If you say &amp;quot;Koi!&amp;quot; at least once, then if your opponent manages to score his score will be doubled. Still, at some point you&#039;ll risk it, because if you manage to improve your yaku to score 7 points or more, then &#039;&#039;&#039;your score&#039;&#039;&#039; will be doubled.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Your_game_mobile_version&amp;diff=1719</id>
		<title>Your game mobile version</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Your_game_mobile_version&amp;diff=1719"/>
		<updated>2015-12-27T12:05:13Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Board Game Arena is now adaptated for Mobiles and Tablets too.&lt;br /&gt;
&lt;br /&gt;
It is very easy to have a mobile version of the game you developed with BGA Studio. In fact, your game is probably already 100% playable on mobile.&lt;br /&gt;
&lt;br /&gt;
However, to provide your players the best experience, you should follow the 2 advices below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Declare your interface minimum width ==&lt;br /&gt;
&lt;br /&gt;
By default, your game can run in an window up to 740 pixels width. Considering the informations of the right column (player&#039;s panel), it fits on a 1024px wide screen.&lt;br /&gt;
&lt;br /&gt;
However, you can choose to declare that your game is able to run with a smaller width. This way, the game will appear much better on mobile and tablets.&lt;br /&gt;
&lt;br /&gt;
For example, Reversi board is only 540px wide. If we stay with the default width (740px), the game interface displayed on mobile will be too large and some space will be lost on the left and on the right. Consequently the Reversi board is going to appear very small on the mobile screen, and players will have to &amp;quot;pinch &amp;amp; zoom&amp;quot; to display it correctly.&lt;br /&gt;
&lt;br /&gt;
To avoid that, we can specify that the game can be played with an interface with a minimum width of 540 pixels, by adding the following to gameinfos.inc.php :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // Game interface width range (pixels)&lt;br /&gt;
  // Note: game interface = space on the left side, without the column on the right&lt;br /&gt;
  &#039;game_interface_width&#039; =&amp;gt; array(&lt;br /&gt;
  &lt;br /&gt;
    // Minimum width&lt;br /&gt;
    //  default: 760&lt;br /&gt;
    //  maximum possible value: 760 (ie: your game interface should fit with a 760px width (correspond to a 1024px screen)&lt;br /&gt;
    //  minimum possible value: 320 (the lowest value you specify, the better the display is on mobile)&lt;br /&gt;
    &#039;min&#039; =&amp;gt; 540,&lt;br /&gt;
  &lt;br /&gt;
    // Maximum width&lt;br /&gt;
    //  default: null (ie: no limit, the game interface is as big as the player&#039;s screen allows it).&lt;br /&gt;
    //  maximum possible value: unlimited&lt;br /&gt;
    //  minimum possible value: 760&lt;br /&gt;
    &#039;max&#039; =&amp;gt; null&lt;br /&gt;
  ),&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And that&#039;s it! Now, BGA can choose the better display for your game interface, whatever the device.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you declare that your interface can run with a 540 pixels width, it must effectively run on an interface with 540 pixels width.&lt;br /&gt;
&lt;br /&gt;
Note that this doesn&#039;t mean that your interface must ALWAYS be 540 pixels width: you just have to make your interface fluid and/or to use CSS media query to fit in any width.&lt;br /&gt;
&lt;br /&gt;
Examples :&lt;br /&gt;
&lt;br /&gt;
* On Can&#039;t Stop, when the screen is too wide, we move the dices on another position (below the main board) to fit in the width :&lt;br /&gt;
&lt;br /&gt;
  @media only screen and (max-width: 990px) {&lt;br /&gt;
  &lt;br /&gt;
    #dicechoices {&lt;br /&gt;
        left: 180px;&lt;br /&gt;
        top: 530px;&lt;br /&gt;
    }&lt;br /&gt;
    #cantstop_wrap {&lt;br /&gt;
        height: 900px;&lt;br /&gt;
        width: 550px;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* On Seasons, we have some panels on the right of the board. On small screens, we display these panels below the board:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  @media only screen and (max-width: 970px) {&lt;br /&gt;
  &lt;br /&gt;
    #board {&lt;br /&gt;
        float: none;&lt;br /&gt;
        margin: auto;&lt;br /&gt;
    }&lt;br /&gt;
    .seasons_rightpanel {&lt;br /&gt;
        margin-left: 0px;&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tip: on mobile, BGA displays player panels at the top of the page (instead of displaying them on the right). When doing this, BGA applies the CSS class &amp;quot;mobile_version&amp;quot; to the root HTML element. If you want you can use this CSS &amp;quot;mobile_version&amp;quot; class to optimize some of your game adaptations to this change.&lt;br /&gt;
&lt;br /&gt;
== Touchscreen compatibility ==&lt;br /&gt;
&lt;br /&gt;
Most of your games should work with touchscreen devices without needing any changes.&lt;br /&gt;
&lt;br /&gt;
Note: when your game is running on a touchscreen device, the global CSS class &amp;quot;touch-device&amp;quot; is added to the root HTML element (and &amp;quot;notouch-device&amp;quot; is added for the opposite).&lt;br /&gt;
&lt;br /&gt;
What may not work :&lt;br /&gt;
* &amp;quot;:hover&amp;quot; CSS switch. Because there is no mouse, &amp;quot;:hover&amp;quot; won&#039;t be triggered. This is not an issue unless it is needed to play the game. In addition, some touch devices consider that a short touch must trigger a &amp;quot;:hover&amp;quot; (and should apply corresponding CSS), which can block an interaction in your game. We advise you to explicitely disable &amp;quot;:hover&amp;quot; effects when your game is running on a touchscreen device.&lt;br /&gt;
* Mouseover events : like the previous one : if you associated Javascript events to &amp;quot;onmouseover&amp;quot; event, it won&#039;t work on tablets.&lt;br /&gt;
* Drag&#039;n&#039;drop : it won&#039;t work. To make it work, you should listen to &amp;quot;ontouchstart&amp;quot;, &amp;quot;ontouchmove&amp;quot; and &amp;quot;ontouchend&amp;quot; event and trigger the same logic you already have for &amp;quot;onmousedown&amp;quot;, &amp;quot;onmousemove&amp;quot; and &amp;quot;onmouseup&amp;quot;. You should also make sure to stop the Javascript &amp;quot;ontouchmove&amp;quot; event (ex: dojo.stopEvent( evt ) ) during the drag n drop, otherwise the interface is going to scroll while drag&#039;n&#039;dropping.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Your_game_mobile_version&amp;diff=1718</id>
		<title>Your game mobile version</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Your_game_mobile_version&amp;diff=1718"/>
		<updated>2015-12-27T11:30:35Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Board Game Arena is now adaptated for Mobiles and Tablets too.&lt;br /&gt;
&lt;br /&gt;
It is very easy to have a mobile version of the game you developed with BGA Studio. In fact, your game is probably already 100% playable on mobile.&lt;br /&gt;
&lt;br /&gt;
However, to provide your players the best experience, you should follow the 2 advices below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Declare your interface minimum width ==&lt;br /&gt;
&lt;br /&gt;
By default, your game can run in an window up to 740 pixels width. Considering the informations of the right column (player&#039;s panel), it fits on a 1024px wide screen.&lt;br /&gt;
&lt;br /&gt;
However, you can choose to declare that your game is able to run with a smaller width. This way, the game will appear much better on mobile and tablets.&lt;br /&gt;
&lt;br /&gt;
For example, Reversi board is only 540px wide. If we stay with the default width (740px), the game interface displayed on mobile will be too large and some space will be lost on the left and on the right. Consequently the Reversi board is going to appear very small on the mobile screen, and players will have to &amp;quot;pinch &amp;amp; zoom&amp;quot; to display it correctly.&lt;br /&gt;
&lt;br /&gt;
To avoid that, we can specify that the game can be played with an interface with a minimum width of 540 pixels, by adding the following to gameinfos.inc.php :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // Game interface width range (pixels)&lt;br /&gt;
  // Note: game interface = space on the left side, without the column on the right&lt;br /&gt;
  &#039;game_interface_width&#039; =&amp;gt; array(&lt;br /&gt;
  &lt;br /&gt;
    // Minimum width&lt;br /&gt;
    //  default: 760&lt;br /&gt;
    //  maximum possible value: 760 (ie: your game interface should fit with a 760px width (correspond to a 1024px screen)&lt;br /&gt;
    //  minimum possible value: 320 (the lowest value you specify, the better the display is on mobile)&lt;br /&gt;
    &#039;min&#039; =&amp;gt; 540,&lt;br /&gt;
  &lt;br /&gt;
    // Maximum width&lt;br /&gt;
    //  default: null (ie: no limit, the game interface is as big as the player&#039;s screen allows it).&lt;br /&gt;
    //  maximum possible value: unlimited&lt;br /&gt;
    //  minimum possible value: 760&lt;br /&gt;
    &#039;max&#039; =&amp;gt; null&lt;br /&gt;
  ),&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And that&#039;s it! Now, BGA can choose the better display for your game interface, whatever the device.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you declare that your interface can run with a 540 pixels width, it must effectively run on an interface with 540 pixels width.&lt;br /&gt;
&lt;br /&gt;
Note that it doesn&#039;t mean that your interface must ALWAYS be 540 pixels width : you just have to make your interface fluid and/or to use CSS media query to fit in any width.&lt;br /&gt;
&lt;br /&gt;
Examples :&lt;br /&gt;
&lt;br /&gt;
* On Can&#039;t Stop, when the screen is too wide, we move the dices on another position (below the main board) to fit in the width :&lt;br /&gt;
&lt;br /&gt;
  @media only screen and (max-width: 990px) {&lt;br /&gt;
  &lt;br /&gt;
    #dicechoices {&lt;br /&gt;
        left: 180px;&lt;br /&gt;
        top: 530px;&lt;br /&gt;
    }&lt;br /&gt;
    #cantstop_wrap {&lt;br /&gt;
        height: 900px;&lt;br /&gt;
        width: 550px;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* On Seasons, we have some panels on the right of the boards. On small screen, we display these panels below :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  @media only screen and (max-width: 970px) {&lt;br /&gt;
  &lt;br /&gt;
    #board {&lt;br /&gt;
        float: none;&lt;br /&gt;
        margin: auto;&lt;br /&gt;
    }&lt;br /&gt;
    .seasons_rightpanel {&lt;br /&gt;
        margin-left: 0px;&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tips : on mobile, BGA displays players&#039; panels at the top of the page (instead of displaying them on the right). When doing this, BGA applies the CSS class &amp;quot;mobile_version&amp;quot; to the root HTML element. If you want you can use this CSS &amp;quot;mobile_version&amp;quot; class to synchronize some of your game adaptations to this change.&lt;br /&gt;
&lt;br /&gt;
== Touchscreen compatibility ==&lt;br /&gt;
&lt;br /&gt;
Most of your game should work with touchscreen device.&lt;br /&gt;
&lt;br /&gt;
Note : When your game is running on a touchscreen device, the global CSS class &amp;quot;touch-device&amp;quot; is added to the root HTML element (and &amp;quot;notouch-device&amp;quot; is added in the contrary).&lt;br /&gt;
&lt;br /&gt;
What may not work :&lt;br /&gt;
* &amp;quot;:hover&amp;quot; CSS switch. Because there is no mouse, &amp;quot;:hover&amp;quot; won&#039;t be triggered. This is not an issue unless it is needed to play the game. In addition, some touch device considers that a short touch must trigger a &amp;quot;:hover&amp;quot; (and should apply corresponding CSS), which can block an interaction in your game. We advise you to explicitely disable &amp;quot;:hover&amp;quot; effects when your game is running on a touchscreen device.&lt;br /&gt;
* Mouseover events : like the previous one : if you associated Javascript events to &amp;quot;onmouseover&amp;quot; event, it won&#039;t work on tablets.&lt;br /&gt;
* Drag&#039;n&#039;drop : it won&#039;t work. To make it work, you should listen to &amp;quot;ontouchstart&amp;quot;, &amp;quot;ontouchmove&amp;quot; and &amp;quot;ontouchend&amp;quot; event and trigger the same logic you already have for &amp;quot;onmousedown&amp;quot;, &amp;quot;onmousemove&amp;quot; and &amp;quot;onmouseup&amp;quot;. You should also make sure to stop the Javascript &amp;quot;ontouchmove&amp;quot; event (ex: dojo.stopEvent( evt ) ) during the drag n drop, otherwise the interface is going to scroll while drag&#039;n&#039;droping.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Game_database_model:_dbmodel.sql&amp;diff=1581</id>
		<title>Game database model: dbmodel.sql</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Game_database_model:_dbmodel.sql&amp;diff=1581"/>
		<updated>2015-07-26T09:19:51Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this file you specify the database schema of your game.&lt;br /&gt;
&lt;br /&gt;
This file contains SQL queries that will be executed during the creation of your game table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; you can&#039;t change the database schema during the game.&lt;br /&gt;
&lt;br /&gt;
== Create your schema ==&lt;br /&gt;
&lt;br /&gt;
To build this file, we recommend you to build the tables you need with the PhpMyAdmin tool (see BGA user guide), and then to export them and to copy/paste the content inside this file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; you must not use for a column the same name as for the table, as the framework replay function relies on regexp substitution to save/restore a previous state in a clone table with another name.&lt;br /&gt;
&lt;br /&gt;
== Default tables ==&lt;br /&gt;
&lt;br /&gt;
Important: by default, BGA creates 4 tables for your game: global, stats, gamelog, and player.&lt;br /&gt;
&lt;br /&gt;
You must not modify the schema of global, stats and gamelog tables (and you must not access them directly with SQL queries in your PHP code).&lt;br /&gt;
&lt;br /&gt;
You may add columns to &amp;quot;player&amp;quot; table. This is very practical to add simple values associated with players.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALTER TABLE `player` ADD `player_reserve_size` SMALLINT UNSIGNED NOT NULL DEFAULT &#039;7&#039;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For your information, the useful columns of default &amp;quot;player&amp;quot; table are:&lt;br /&gt;
* player_no: the index of player in natural playing order.&lt;br /&gt;
* player_id&lt;br /&gt;
* player_name: (note: you should better access this date with getActivePlayerName() or loadPlayersBasicInfos() methods)&lt;br /&gt;
* player_score: the current score of the player (displayed in the player panel). You must update this field to update player&#039;s scores.&lt;br /&gt;
* player_score_aux: the secondary score, used as a tie breaker. You must update this field according to tie breaking rules of the game (see also: [[Main_game_logic:_yourgamename.game.php#Manage_player_scores_and_Tie_breaker|Manage_player_scores_and_Tie_breaker]])&lt;br /&gt;
&lt;br /&gt;
== CREATE TABLES ==&lt;br /&gt;
you can create tables, using engine InnoDB&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `hands` &lt;br /&gt;
(&lt;br /&gt;
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, &lt;br /&gt;
`player_id` TINYINT(1) NOT NULL,&lt;br /&gt;
`1` BOOL NOT NULL DEFAULT 1,	&lt;br /&gt;
`2` BOOL NOT NULL DEFAULT 1,	&lt;br /&gt;
`3` BOOL NOT NULL DEFAULT 1,	&lt;br /&gt;
`4` BOOL NOT NULL DEFAULT 1,	&lt;br /&gt;
`5` BOOL NOT NULL DEFAULT 1,		&lt;br /&gt;
`6` BOOL NOT NULL DEFAULT 1,	&lt;br /&gt;
`7` BOOL NOT NULL DEFAULT 1,	&lt;br /&gt;
PRIMARY KEY (`id`)&lt;br /&gt;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: if you put comments, you cannot do it in same line than code,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
`3` BOOL NOT NULL DEFAULT 1, --  activated or not&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 will comment also starting from `3` BOOL,  and code will not be taken into account.&lt;br /&gt;
&lt;br /&gt;
== Link ==&lt;br /&gt;
You can add your Db inits in function SetupNewGame() from file &#039;gamename.game.php&#039;&lt;br /&gt;
  &lt;br /&gt;
== Errors Log ==&lt;br /&gt;
To trace Database creation check the logs that you can access in /admin/studio.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Css_Customization&amp;diff=1570</id>
		<title>Css Customization</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Css_Customization&amp;diff=1570"/>
		<updated>2015-07-07T20:12:59Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Sharing customization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This feature allows you to customize Board Game Arena with some CSS.&lt;br /&gt;
&lt;br /&gt;
= Why this feature? =&lt;br /&gt;
&lt;br /&gt;
At first, because this is cool :)&lt;br /&gt;
&lt;br /&gt;
Then, a lot of players told us that BGA should look better, and we constantly tried to make it look much better. But as it is a community-based website, we found out that we should allow YOU to participate. So this is why you can customize BGA appearance and share your customization with others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= How does it work? =&lt;br /&gt;
&lt;br /&gt;
From your account preferences, &amp;quot;advanced&amp;quot; tab, you can write some CSS. As soon as you click on &amp;quot;save&amp;quot;, it is integrated to BGA CSS for your account.&lt;br /&gt;
&lt;br /&gt;
You should use your browser developer tools (F12 on Chrome and Firefox) to get the ids/classes of the element that you want to change, and try to change them with these tools first. Finally, you can copy/paste your updates on the CSS customization form.&lt;br /&gt;
&lt;br /&gt;
= What is CSS ? =&lt;br /&gt;
&lt;br /&gt;
Well... if you don&#039;t know what CSS is, sorry but you shouldn&#039;t try to customize BGA appearance with this tool.&lt;br /&gt;
&lt;br /&gt;
= Reset CSS =&lt;br /&gt;
&lt;br /&gt;
Just above the CSS customization form, there is a link to reset all your changes and get back to the normal BGA. Please &#039;&#039;&#039;bookmark this link&#039;&#039;&#039; before doing any change to your CSS code. If you break the website by any manner, you&#039;ll be able to restore the original BGA instantly.&lt;br /&gt;
&lt;br /&gt;
= Modify images =&lt;br /&gt;
&lt;br /&gt;
Most of the images on BGA are loaded through &amp;quot;background-image&amp;quot; CSS command. This way, you can update it and load any image. You can host image on any server, or on a website like [http://imgur.com/ imgur].&lt;br /&gt;
&lt;br /&gt;
= Sharing customization =&lt;br /&gt;
&lt;br /&gt;
Using the link above the CSS customization form, you can share your customization with anyone.&lt;br /&gt;
&lt;br /&gt;
Please DO NOT send a link that breaks the website. If we detect some attempt to fool users, we will immediately take action against you.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
== The CSS code I wrote is not taken into account ==&lt;br /&gt;
&lt;br /&gt;
At first, check the sourcecode of the BGA page. If your CSS code does not appear there, then the most probable reason is that you did a syntax error in your CSS code, so we didn&#039;t take a part of your code into account.&lt;br /&gt;
&lt;br /&gt;
If it appears, then it should be an error in one of your declaration (ex: wrong #id).&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Css_Customization&amp;diff=1569</id>
		<title>Css Customization</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Css_Customization&amp;diff=1569"/>
		<updated>2015-07-07T20:11:42Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Modify images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This feature allows you to customize Board Game Arena with some CSS.&lt;br /&gt;
&lt;br /&gt;
= Why this feature? =&lt;br /&gt;
&lt;br /&gt;
At first, because this is cool :)&lt;br /&gt;
&lt;br /&gt;
Then, a lot of players told us that BGA should look better, and we constantly tried to make it look much better. But as it is a community-based website, we found out that we should allow YOU to participate. So this is why you can customize BGA appearance and share your customization with others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= How does it work? =&lt;br /&gt;
&lt;br /&gt;
From your account preferences, &amp;quot;advanced&amp;quot; tab, you can write some CSS. As soon as you click on &amp;quot;save&amp;quot;, it is integrated to BGA CSS for your account.&lt;br /&gt;
&lt;br /&gt;
You should use your browser developer tools (F12 on Chrome and Firefox) to get the ids/classes of the element that you want to change, and try to change them with these tools first. Finally, you can copy/paste your updates on the CSS customization form.&lt;br /&gt;
&lt;br /&gt;
= What is CSS ? =&lt;br /&gt;
&lt;br /&gt;
Well... if you don&#039;t know what CSS is, sorry but you shouldn&#039;t try to customize BGA appearance with this tool.&lt;br /&gt;
&lt;br /&gt;
= Reset CSS =&lt;br /&gt;
&lt;br /&gt;
Just above the CSS customization form, there is a link to reset all your changes and get back to the normal BGA. Please &#039;&#039;&#039;bookmark this link&#039;&#039;&#039; before doing any change to your CSS code. If you break the website by any manner, you&#039;ll be able to restore the original BGA instantly.&lt;br /&gt;
&lt;br /&gt;
= Modify images =&lt;br /&gt;
&lt;br /&gt;
Most of the images on BGA are loaded through &amp;quot;background-image&amp;quot; CSS command. This way, you can update it and load any image. You can host image on any server, or on a website like [http://imgur.com/ imgur].&lt;br /&gt;
&lt;br /&gt;
= Sharing customization =&lt;br /&gt;
&lt;br /&gt;
Using the link above the CSS customization form, you can share your customization with anyone.&lt;br /&gt;
&lt;br /&gt;
Please DO NOT send a link that break the website. If we detect some attempt to fool users, we will immediately take action against you.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
== The CSS code I wrote is not taken into account ==&lt;br /&gt;
&lt;br /&gt;
At first, check the sourcecode of the BGA page. If your CSS code does not appear there, then the most probable reason is that you did a syntax error in your CSS code, so we didn&#039;t take a part of your code into account.&lt;br /&gt;
&lt;br /&gt;
If it appears, then it should be an error in one of your declaration (ex: wrong #id).&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Css_Customization&amp;diff=1568</id>
		<title>Css Customization</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Css_Customization&amp;diff=1568"/>
		<updated>2015-07-07T20:10:38Z</updated>

		<summary type="html">&lt;p&gt;Een: /* How it works? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This feature allows you to customize Board Game Arena with some CSS.&lt;br /&gt;
&lt;br /&gt;
= Why this feature? =&lt;br /&gt;
&lt;br /&gt;
At first, because this is cool :)&lt;br /&gt;
&lt;br /&gt;
Then, a lot of players told us that BGA should look better, and we constantly tried to make it look much better. But as it is a community-based website, we found out that we should allow YOU to participate. So this is why you can customize BGA appearance and share your customization with others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= How does it work? =&lt;br /&gt;
&lt;br /&gt;
From your account preferences, &amp;quot;advanced&amp;quot; tab, you can write some CSS. As soon as you click on &amp;quot;save&amp;quot;, it is integrated to BGA CSS for your account.&lt;br /&gt;
&lt;br /&gt;
You should use your browser developer tools (F12 on Chrome and Firefox) to get the ids/classes of the element that you want to change, and try to change them with these tools first. Finally, you can copy/paste your updates on the CSS customization form.&lt;br /&gt;
&lt;br /&gt;
= What is CSS ? =&lt;br /&gt;
&lt;br /&gt;
Well... if you don&#039;t know what CSS is, sorry but you shouldn&#039;t try to customize BGA appearance with this tool.&lt;br /&gt;
&lt;br /&gt;
= Reset CSS =&lt;br /&gt;
&lt;br /&gt;
Just above the CSS customization form, there is a link to reset all your changes and get back to the normal BGA. Please &#039;&#039;&#039;bookmark this link&#039;&#039;&#039; before doing any change to your CSS code. If you break the website by any manner, you&#039;ll be able to restore the original BGA instantly.&lt;br /&gt;
&lt;br /&gt;
= Modify images =&lt;br /&gt;
&lt;br /&gt;
Most of images on BGA are loaded through &amp;quot;background-image&amp;quot; CSS command. This way, you can update it and load any image. You can host image on any server, or on a website like [http://imgur.com/ imgur].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sharing customization =&lt;br /&gt;
&lt;br /&gt;
Using the link above the CSS customization form, you can share your customization with anyone.&lt;br /&gt;
&lt;br /&gt;
Please DO NOT send a link that break the website. If we detect some attempt to fool users, we will immediately take action against you.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
== The CSS code I wrote is not taken into account ==&lt;br /&gt;
&lt;br /&gt;
At first, check the sourcecode of the BGA page. If your CSS code does not appear there, then the most probable reason is that you did a syntax error in your CSS code, so we didn&#039;t take a part of your code into account.&lt;br /&gt;
&lt;br /&gt;
If it appears, then it should be an error in one of your declaration (ex: wrong #id).&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1517</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1517"/>
		<updated>2015-04-28T20:46:56Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Issues with BGA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Help]]&lt;br /&gt;
&lt;br /&gt;
== General questions ==&lt;br /&gt;
&lt;br /&gt;
===What is Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena (BGA) is an online board game platform. With BGA, you can play online and in real time against players from the whole world. A selection of various board games and card games is available. In order to play, the only thing you need is your browser!&lt;br /&gt;
&lt;br /&gt;
===What do you mean by &amp;quot;real time play&amp;quot;?===&lt;br /&gt;
&lt;br /&gt;
On Board Game Arena your opponents are connected to the game platform during the entire game. They can see your moves and react to them immediately - as is the case in the real world.&lt;br /&gt;
&lt;br /&gt;
===What is &amp;quot;turn based play&amp;quot;?===&lt;br /&gt;
&lt;br /&gt;
This is often referred to as &amp;quot;asynchronous play&amp;quot; on other sites, and is used here to differentiate from &amp;quot;real time play&amp;quot;.  Instead of all players being around the table at the same time, players leave and come back.  After your opponent takes a move you are notified that it is your turn (via email or on your next visit to the site).  You then go to your game, take your turn, and the process repeats for the next player.&lt;br /&gt;
&lt;br /&gt;
For details please read [[Turn based FAQ]].&lt;br /&gt;
&lt;br /&gt;
===What do I need to play?===&lt;br /&gt;
&lt;br /&gt;
Your browser ... and that&#039;s it!&lt;br /&gt;
&lt;br /&gt;
Board Game Arena does not require anything else on your computer. Thus, you can play from any computer, anywhere, anytime!&lt;br /&gt;
&lt;br /&gt;
In order to make this possible we are using the latest technologies available for the web. This is the reason you should play with the most up to date web browsers to enjoy an optimal BGA experience (read more about our [[Browser_support|browser policy]]).&lt;br /&gt;
&lt;br /&gt;
===How much does it cost to play on BGA?===&lt;br /&gt;
&lt;br /&gt;
Playing on BGA is free.&lt;br /&gt;
&lt;br /&gt;
You can also choose to help us by making a donation and becoming a [http://en.boardgamearena.com/#!club Board Game Arena club] member.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What are the games available on BGA?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena offers a various selection of board and card games, but  specializes in modern (&amp;quot;European style&amp;quot;) adult games.&lt;br /&gt;
&lt;br /&gt;
[http://en.boardgamearena.com/#!gamelist See available games].&lt;br /&gt;
&lt;br /&gt;
== Meeting players and starting games ==&lt;br /&gt;
&lt;br /&gt;
===I launched a new table but nobody is joining?===&lt;br /&gt;
&lt;br /&gt;
For the most popular games you can find players at any time of the day. For other games we advise you to come back at peak hour (around 22:00 CEST) if you can&#039;t find opponents at the moment.&lt;br /&gt;
&lt;br /&gt;
Tip: check the number of online/available players for a game before launching the table.&lt;br /&gt;
&lt;br /&gt;
Tip: if nobody is available for a realtime game, you can turn your table into a turn-based table, so another player can join even hours/days after you created it.&lt;br /&gt;
&lt;br /&gt;
===I joined a game. When does the game start?===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For realtime games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
Each table has an administrator, which is the table creator. It is the responsibility of the table administrator to start the game when he is satisfied with the number of players having joined the table.&lt;br /&gt;
&lt;br /&gt;
If you are the table administrator and can&#039;t launch the game, most of the time it&#039;s because there is not yet enough players joined the table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For turnbased games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
The game starts as soon as the maximum number of players has been reached. The table administrator can also starts the game manually if the minimum number of required players has been reached.&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the small color circle next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/online_.png : this player is active. He completed an action very recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/inactive_.png : this player is inactive. He is connected to the website but did not perform any action recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/offline_.png : this player is offline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What does the &#039;% hits&#039; statistic mean?===&lt;br /&gt;
% hits = number of victory points / number of games played&lt;br /&gt;
&lt;br /&gt;
Where number of victory points is the following:&lt;br /&gt;
* When you win a 2 players game: 1 point.&lt;br /&gt;
* When you win a 3 players game: 1.5 points.&lt;br /&gt;
* When you win a 4 players game: 2 points.&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
This way, &amp;quot;50%&amp;quot; means that you win 50% of 2 players game, or 33% of 3 players game, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== During the game ==&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the icons next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player.gif : this player must make a move now.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_clockalert.gif : this player must make a move now, and he has spent his reflexion time. Can someone wake him up? ;)&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_nonack.gif : this player must make a move now, but is probably not aware of the fact. If the situation does not evolve, it might be that this player has some connection issue.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/common/zombie.png : this player is a &amp;quot;zombie&amp;quot; (he left the game or has been fired from the game). The game goes on without this player.&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;normal&amp;quot; avatar of a player is displayed, it means that this player is waiting for his turn to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A player has to make a move but he/she doesn&#039;t. What can I do?===&lt;br /&gt;
&lt;br /&gt;
* First, please remember that this player has the right to think as long as he needs to about the next move...  well as long as he still has some time left on the game clock, that is.&lt;br /&gt;
* Then you can ask this player to confirm that he is still thinking about how to play.&lt;br /&gt;
* If this player seems to be away, we advise you to wait a few  minutes: this player may be experiencing some network problems or have left his computer temporarily.&lt;br /&gt;
* If the player is not coming back, you can skip his turn as soon as his clock is negative. He will get a &amp;quot;leave&amp;quot; penalty and you will will &amp;quot;by forfeit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For more details, please read [[Game clock]].&lt;br /&gt;
&lt;br /&gt;
===What is the current progression of the game I&#039;m playing?===&lt;br /&gt;
&lt;br /&gt;
A percentage of progression is displayed on the top of the web page.&lt;br /&gt;
There is also a progress bar at the bottom of the web page shows you the current progression of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is forbidden on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Leaving a game in progress on purpose.&lt;br /&gt;
* Taking an unnecessary and unreasonable amount of time at the end of game in an obvious losing situation.&lt;br /&gt;
* Kingmaking: enabling another player to win on purpose while there is a better move to make for yourself.&lt;br /&gt;
* Running out of time on the game clock.&lt;br /&gt;
* Giving some piece of information about the current game situation that corrupts the normal game flow.&lt;br /&gt;
* Communicating with another player about the game privately (ex: with MSN).&lt;br /&gt;
* Provocation / triumphalism / defeatism ... anything which is not fair play.&lt;br /&gt;
* Having a shocking avatar (no advertisement, no politics, ...)&lt;br /&gt;
&lt;br /&gt;
Going against these rules will affect your reputation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is absolutely forbidden in Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Creating multiple accounts and playing against oneself.&lt;br /&gt;
* Insulting other players in any manner.&lt;br /&gt;
&lt;br /&gt;
Going against these rules can lead to the removal of your account and/or to the blacklisting of your IP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What if some player does something wrong?===&lt;br /&gt;
&lt;br /&gt;
The Board Game Arena platform has been designed to encourage players to maintain good behavior. The reputation system allows you to distinguish between good and bad players. Then, it is up to you to decide whether to start a game with them or not.&lt;br /&gt;
&lt;br /&gt;
If you think a player has behaved badly during a game, you can give him a &amp;quot;red thumb&amp;quot; at the end of the game.&lt;br /&gt;
&lt;br /&gt;
If you think a player has committed a serious wrongdoing during a game (ex: insult), please report this player to us, using the &amp;quot;report this player&amp;quot; link from his profile or game result page, so that we can take appropriate measures.&lt;br /&gt;
&lt;br /&gt;
== Tournaments ==&lt;br /&gt;
&lt;br /&gt;
Tournaments is a BETA feature of BGA (for a long time).&lt;br /&gt;
&lt;br /&gt;
Tournament management is very complex. We&#039;d like to open tournament creation to everyone at some time in the future but it need a lot of work and until then we always had something more urgent to do.&lt;br /&gt;
&lt;br /&gt;
When tournaments will be improved, this FAQ section will be improved too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About board games we proposed on BGA ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is the legal status of this website?===&lt;br /&gt;
&lt;br /&gt;
All the games currently available on this site have been licensed or otherwise authorized by copyright holders. Please be aware that games available on BGA can be removed at the copyright holders demand (for example: if they publish their own adaptation of the game).&lt;br /&gt;
&lt;br /&gt;
Board Game Arena would like to thank all game publishers and game designers who allow us to have their games here, thus making it possible for this website to exist.&lt;br /&gt;
&lt;br /&gt;
=== How do we select games that are on BGA? Why the game XXX is not on BGA? ===&lt;br /&gt;
&lt;br /&gt;
To have a game published on BGA we need 2 things:&lt;br /&gt;
* The authorization of the rights owner (most of the time: original publisher of the game).&lt;br /&gt;
* A software developer who develops the adaptation (ie: has some time available to develop it).&lt;br /&gt;
&lt;br /&gt;
We (= BGA team) are trying a lot of board games ourselves. Sometimes we are lucky enough to play prototypes too. And of course we receive a lot of game suggestions through the BGA forum, the BoardGameGeek &amp;quot;most wanted games&amp;quot; list, or by any other means. Based on this we are asking game publishers for authorizations, and sometimes we also receive requests directly from game publishers - there is no rule.&lt;br /&gt;
&lt;br /&gt;
As it is today, BGA has a very good reputation and very productive relationships with almost all major board game publishers, but this is not enough: each situation is specific, and there can be various reasons why a game publisher can refuse to see a game adaptation on BGA (for example: board games with a third party licence, like &amp;quot;Star Wars&amp;quot;, is practically impossible to negotiate).&lt;br /&gt;
&lt;br /&gt;
On the other hand, we got some authorizations for some very good games but no developers volunteering to develop them, or sometimes some of them don&#039;t manage to finish the job. Developers of adaptations are volunteers, and we don&#039;t blame them for this.&lt;br /&gt;
&lt;br /&gt;
Finally, some games are authorized and being developed, but the time frame is not good. For example, it happened that we had too many games to release and we decided to delay some of them. It also frequently happens that we must synchronize the release of a game with a publisher event, so the game adaptation can stay &amp;quot;on hold&amp;quot; for some months.&lt;br /&gt;
&lt;br /&gt;
So if you are asking yourself: why game XXX is not on BGA, it could be for various reasons:&lt;br /&gt;
* Maybe we never asked authorization for this game. Note that usually we ask authorizations for every popular games (ex: &amp;quot;Most wanted games&amp;quot;). So if the game is popular, the reason is probably not this one.&lt;br /&gt;
* The publisher refused.&lt;br /&gt;
* The publisher accepted, but we didn&#039;t find a developer until now for this game.&lt;br /&gt;
* The game adaptation is ready, but we are waiting for a specific event to release it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To conclude: yes we are taking into account your suggestions, but as you can see there are many factors than can influence the fact that a game is (or is not) on BGA. In addition, as a rule of thumb, we don&#039;t communicate about &amp;quot;why&amp;quot; this game is not on BGA. If we already got the authorization, we want to keep the &amp;quot;surprise&amp;quot;, and if we didn&#039;t get the authorization, the game publisher may not want to explain the reasons.&lt;br /&gt;
&lt;br /&gt;
=== Are you taking into account the &amp;quot;Most wanted games&amp;quot; list? When will these games be on BGA? ===&lt;br /&gt;
&lt;br /&gt;
You should read first the previous section (&amp;quot;how do we select games that are on BGA?&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
So the answer is:&lt;br /&gt;
* Yes, we are taking this list into account.&lt;br /&gt;
* For most of these games we already asked for authorizations.&lt;br /&gt;
* Some of these games won&#039;t be on BGA (authorization refused), some may be, some are in an &amp;quot;intermediate&amp;quot; step.&lt;br /&gt;
* We don&#039;t communicate about future game releases anyway.&lt;br /&gt;
&lt;br /&gt;
=== Why do some games have expansions on BGA and some don&#039;t? ===&lt;br /&gt;
&lt;br /&gt;
You should read first the previous section (&amp;quot;how do we select games that are on BGA?&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Game expansions follow the same steps than games. There can be various reasons why a game publisher doesn&#039;t want the expansion online, and sometimes we don&#039;t find a developer that has the time to develop it.&lt;br /&gt;
&lt;br /&gt;
===I&#039;m a game publisher: why would I like to have my game on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
The main goal of Board Game Arena is to make it easy for people to discover and love new games. We think that there are only two kinds of players on Board Game Arena: those who already bought the games they are playing online, and those who plan to buy them soon!&lt;br /&gt;
&lt;br /&gt;
As the activity of this website contributes to increasing a game&#039;s popularity and thus generates hard copy sales in the &amp;quot;real world&amp;quot;, we think it is beneficial to the board game community: people from all over the world can play online, we can have fun developing this game platform to the best of our ability, and game publishers get money from the box sales and build a special relationship with their player&#039;s community.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m a game publisher: how to get my game on Board Game Arena ===&lt;br /&gt;
&lt;br /&gt;
At first, you just have to write us an email (contact (at) boardgamearena.com) with a description of your game(s).&lt;br /&gt;
&lt;br /&gt;
Then, we add this game to the list of &amp;quot;available licences&amp;quot; on our website dedicated to game developers ([http://studio.boardgamearena.com BGA Studio]).&lt;br /&gt;
&lt;br /&gt;
The most difficult part is to find a developer among our community. Our only requirement is that the developer must love the game. Of course, the most popular the game is, the easiest it is to find a volunteer developer. Sometimes it is very fast, sometimes it takes months, sometimes it never happens. We can&#039;t say in advance.&lt;br /&gt;
&lt;br /&gt;
It is also possible to find your own developer: of course it accelerates the process a lot!&lt;br /&gt;
&lt;br /&gt;
== Turn-based mode ==&lt;br /&gt;
&lt;br /&gt;
Please read [[Turn based FAQ]].&lt;br /&gt;
&lt;br /&gt;
== Issues with BGA ==&lt;br /&gt;
&lt;br /&gt;
===What can I do if I have an issue with the website?===&lt;br /&gt;
&lt;br /&gt;
Most of the issues on this website should be solved with a simple web page refresh (or &amp;quot;F5&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you experience persistent issues, you can browse the [http://boardgamearena.com/#!bugs bug tool], see if someone already reported the issue, and add a new bug report if that&#039;s not the case. Please take some time to describe the bug you are reporting in detail so that we can quickly reproduce and fix it.&lt;br /&gt;
&lt;br /&gt;
=== Why is my bug still not fixed? ===&lt;br /&gt;
&lt;br /&gt;
We fix bugs every weeks. Of course we have priorities:&lt;br /&gt;
* We give the highest priority to recent features and recent games, because the most important bugs are reported fast.&lt;br /&gt;
* We give the highest priority to the bugs with the biggest number of &amp;quot;green thumb&amp;quot; on the [http://boardgamearena.com/#!bugs bug tool].&lt;br /&gt;
* Usually we fix bugs by group. So if we decide to fix an important bug on a game, there is a chance that we will fix 3 or 4 minor bugs at the same time.&lt;br /&gt;
&lt;br /&gt;
BGA is known for the quality of its adaptations, and if you look at the bug tool, you can see that -considering the number of games and the size of the community- there are not so many critical bugs with a lot of &amp;quot;green thumbs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Please also note that BGA adaptations are realized by volunteers (even if most of them are also professional developers). It is not always easy for them to fix bugs, especially when some players are complaining violently and/or do not give precise information in bug reports.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I played on smartphone / tablet / touch device and I have some difficulties: what can I do? ===&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb, BGA does not support tablets/smartphones. There are tons of board game adaptations for tablets/smartphones, and some BGA adaptations are not well designed for small screens. Thus, we don&#039;t have plans to do a mobile / tablet version at the moment.&lt;br /&gt;
&lt;br /&gt;
So if you want to use BGA from a smartphone / tablet you can, but we don&#039;t promise to fix all bugs so it&#039;s at your own risk :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Why is BGA slow? Why do I have bad connections performances on BGA? ===&lt;br /&gt;
&lt;br /&gt;
We are constantly monitoring server responsiveness. Some incidents occurs, but most of the time BGA is responsive.&lt;br /&gt;
&lt;br /&gt;
We designed our game servers (ie: servers used when you are inside a game) to be very responsive. Usually, less than 2% of the game moves take more than 200 milliseconds to process, and less than 0.2% take more than 1 second.&lt;br /&gt;
&lt;br /&gt;
BGA servers are located in Europe (France), but we bought servers all across the world (19 locations) so that the big files (ex: images) are loaded fast even if you are far from us.&lt;br /&gt;
&lt;br /&gt;
Most of bad performances came from your internet connection or your system. Try to connect with a different browser / computer / internet connection to troubleshoot the issue.&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb, is BGA is not responsive enough, you shouldn&#039;t engage yourself into a game because there is a risk for you to get clock penalties.&lt;br /&gt;
&lt;br /&gt;
=== I got issue with a specific player: how does the moderation works? ===&lt;br /&gt;
&lt;br /&gt;
You should read [[Moderation and grades]] page.&lt;br /&gt;
&lt;br /&gt;
== Contribute to BGA ==&lt;br /&gt;
&lt;br /&gt;
=== How can I contribute to BGA? ===&lt;br /&gt;
&lt;br /&gt;
Please visit page [http://boardgamearena.com/#!contribute Contribute to BGA].&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m a software developer. What can I do? ===&lt;br /&gt;
&lt;br /&gt;
We created a website specifically dedicated to board games adaptation development: [http://studio.boardgamearena.com BGA Studio].&lt;br /&gt;
&lt;br /&gt;
== About the BGA team ==&lt;br /&gt;
&lt;br /&gt;
=== Who are you? How to contact you? ===&lt;br /&gt;
&lt;br /&gt;
Please read page [[About us]].&lt;br /&gt;
&lt;br /&gt;
=== How you guys make money? Do you make a living of it? ===&lt;br /&gt;
&lt;br /&gt;
Yes we still work aside, and yes there is a huge work to be done here everyday.&lt;br /&gt;
&lt;br /&gt;
There is essentially Club membership, but this is not enough. What we&#039;d like to do is basically continue like this because we think this &amp;quot;community based&amp;quot; approach is the best for BGA.&lt;br /&gt;
&lt;br /&gt;
What we are trying to do, in addition, is to find a way to create a commercial activity in game portal development, distinct from BGA. This way we could have a flexible work with a source of revenue, distinct from BGA, that allows us to finance the time we spent on BGA.&lt;br /&gt;
&lt;br /&gt;
=== Do you recruit? ===&lt;br /&gt;
&lt;br /&gt;
If we had enough money we would start by &amp;quot;recruiting ourselves&amp;quot; :)&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1516</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1516"/>
		<updated>2015-04-28T20:41:49Z</updated>

		<summary type="html">&lt;p&gt;Een: /* How you guys make money? Do you make a living of it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Help]]&lt;br /&gt;
&lt;br /&gt;
== General questions ==&lt;br /&gt;
&lt;br /&gt;
===What is Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena (BGA) is an online board game platform. With BGA, you can play online and in real time against players from the whole world. A selection of various board games and card games is available. In order to play, the only thing you need is your browser!&lt;br /&gt;
&lt;br /&gt;
===What do you mean by &amp;quot;real time play&amp;quot;?===&lt;br /&gt;
&lt;br /&gt;
On Board Game Arena your opponents are connected to the game platform during the entire game. They can see your moves and react to them immediately - as is the case in the real world.&lt;br /&gt;
&lt;br /&gt;
===What is &amp;quot;turn based play&amp;quot;?===&lt;br /&gt;
&lt;br /&gt;
This is often referred to as &amp;quot;asynchronous play&amp;quot; on other sites, and is used here to differentiate from &amp;quot;real time play&amp;quot;.  Instead of all players being around the table at the same time, players leave and come back.  After your opponent takes a move you are notified that it is your turn (via email or on your next visit to the site).  You then go to your game, take your turn, and the process repeats for the next player.&lt;br /&gt;
&lt;br /&gt;
For details please read [[Turn based FAQ]].&lt;br /&gt;
&lt;br /&gt;
===What do I need to play?===&lt;br /&gt;
&lt;br /&gt;
Your browser ... and that&#039;s it!&lt;br /&gt;
&lt;br /&gt;
Board Game Arena does not require anything else on your computer. Thus, you can play from any computer, anywhere, anytime!&lt;br /&gt;
&lt;br /&gt;
In order to make this possible we are using the latest technologies available for the web. This is the reason you should play with the most up to date web browsers to enjoy an optimal BGA experience (read more about our [[Browser_support|browser policy]]).&lt;br /&gt;
&lt;br /&gt;
===How much does it cost to play on BGA?===&lt;br /&gt;
&lt;br /&gt;
Playing on BGA is free.&lt;br /&gt;
&lt;br /&gt;
You can also choose to help us by making a donation and becoming a [http://en.boardgamearena.com/#!club Board Game Arena club] member.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What are the games available on BGA?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena offers a various selection of board and card games, but  specializes in modern (&amp;quot;European style&amp;quot;) adult games.&lt;br /&gt;
&lt;br /&gt;
[http://en.boardgamearena.com/#!gamelist See available games].&lt;br /&gt;
&lt;br /&gt;
== Meeting players and starting games ==&lt;br /&gt;
&lt;br /&gt;
===I launched a new table but nobody is joining?===&lt;br /&gt;
&lt;br /&gt;
For the most popular games you can find players at any time of the day. For other games we advise you to come back at peak hour (around 22:00 CEST) if you can&#039;t find opponents at the moment.&lt;br /&gt;
&lt;br /&gt;
Tip: check the number of online/available players for a game before launching the table.&lt;br /&gt;
&lt;br /&gt;
Tip: if nobody is available for a realtime game, you can turn your table into a turn-based table, so another player can join even hours/days after you created it.&lt;br /&gt;
&lt;br /&gt;
===I joined a game. When does the game start?===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For realtime games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
Each table has an administrator, which is the table creator. It is the responsibility of the table administrator to start the game when he is satisfied with the number of players having joined the table.&lt;br /&gt;
&lt;br /&gt;
If you are the table administrator and can&#039;t launch the game, most of the time it&#039;s because there is not yet enough players joined the table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For turnbased games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
The game starts as soon as the maximum number of players has been reached. The table administrator can also starts the game manually if the minimum number of required players has been reached.&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the small color circle next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/online_.png : this player is active. He completed an action very recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/inactive_.png : this player is inactive. He is connected to the website but did not perform any action recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/offline_.png : this player is offline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What does the &#039;% hits&#039; statistic mean?===&lt;br /&gt;
% hits = number of victory points / number of games played&lt;br /&gt;
&lt;br /&gt;
Where number of victory points is the following:&lt;br /&gt;
* When you win a 2 players game: 1 point.&lt;br /&gt;
* When you win a 3 players game: 1.5 points.&lt;br /&gt;
* When you win a 4 players game: 2 points.&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
This way, &amp;quot;50%&amp;quot; means that you win 50% of 2 players game, or 33% of 3 players game, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== During the game ==&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the icons next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player.gif : this player must make a move now.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_clockalert.gif : this player must make a move now, and he has spent his reflexion time. Can someone wake him up? ;)&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_nonack.gif : this player must make a move now, but is probably not aware of the fact. If the situation does not evolve, it might be that this player has some connection issue.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/common/zombie.png : this player is a &amp;quot;zombie&amp;quot; (he left the game or has been fired from the game). The game goes on without this player.&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;normal&amp;quot; avatar of a player is displayed, it means that this player is waiting for his turn to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A player has to make a move but he/she doesn&#039;t. What can I do?===&lt;br /&gt;
&lt;br /&gt;
* First, please remember that this player has the right to think as long as he needs to about the next move...  well as long as he still has some time left on the game clock, that is.&lt;br /&gt;
* Then you can ask this player to confirm that he is still thinking about how to play.&lt;br /&gt;
* If this player seems to be away, we advise you to wait a few  minutes: this player may be experiencing some network problems or have left his computer temporarily.&lt;br /&gt;
* If the player is not coming back, you can skip his turn as soon as his clock is negative. He will get a &amp;quot;leave&amp;quot; penalty and you will will &amp;quot;by forfeit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For more details, please read [[Game clock]].&lt;br /&gt;
&lt;br /&gt;
===What is the current progression of the game I&#039;m playing?===&lt;br /&gt;
&lt;br /&gt;
A percentage of progression is displayed on the top of the web page.&lt;br /&gt;
There is also a progress bar at the bottom of the web page shows you the current progression of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is forbidden on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Leaving a game in progress on purpose.&lt;br /&gt;
* Taking an unnecessary and unreasonable amount of time at the end of game in an obvious losing situation.&lt;br /&gt;
* Kingmaking: enabling another player to win on purpose while there is a better move to make for yourself.&lt;br /&gt;
* Running out of time on the game clock.&lt;br /&gt;
* Giving some piece of information about the current game situation that corrupts the normal game flow.&lt;br /&gt;
* Communicating with another player about the game privately (ex: with MSN).&lt;br /&gt;
* Provocation / triumphalism / defeatism ... anything which is not fair play.&lt;br /&gt;
* Having a shocking avatar (no advertisement, no politics, ...)&lt;br /&gt;
&lt;br /&gt;
Going against these rules will affect your reputation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is absolutely forbidden in Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Creating multiple accounts and playing against oneself.&lt;br /&gt;
* Insulting other players in any manner.&lt;br /&gt;
&lt;br /&gt;
Going against these rules can lead to the removal of your account and/or to the blacklisting of your IP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What if some player does something wrong?===&lt;br /&gt;
&lt;br /&gt;
The Board Game Arena platform has been designed to encourage players to maintain good behavior. The reputation system allows you to distinguish between good and bad players. Then, it is up to you to decide whether to start a game with them or not.&lt;br /&gt;
&lt;br /&gt;
If you think a player has behaved badly during a game, you can give him a &amp;quot;red thumb&amp;quot; at the end of the game.&lt;br /&gt;
&lt;br /&gt;
If you think a player has committed a serious wrongdoing during a game (ex: insult), please report this player to us, using the &amp;quot;report this player&amp;quot; link from his profile or game result page, so that we can take appropriate measures.&lt;br /&gt;
&lt;br /&gt;
== Tournaments ==&lt;br /&gt;
&lt;br /&gt;
Tournaments is a BETA feature of BGA (for a long time).&lt;br /&gt;
&lt;br /&gt;
Tournament management is very complex. We&#039;d like to open tournament creation to everyone at some time in the future but it need a lot of work and until then we always had something more urgent to do.&lt;br /&gt;
&lt;br /&gt;
When tournaments will be improved, this FAQ section will be improved too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About board games we proposed on BGA ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is the legal status of this website?===&lt;br /&gt;
&lt;br /&gt;
All the games currently available on this site have been licensed or otherwise authorized by copyright holders. Please be aware that games available on BGA can be removed at the copyright holders demand (for example: if they publish their own adaptation of the game).&lt;br /&gt;
&lt;br /&gt;
Board Game Arena would like to thank all game publishers and game designers who allow us to have their games here, thus making it possible for this website to exist.&lt;br /&gt;
&lt;br /&gt;
=== How do we select games that are on BGA? Why the game XXX is not on BGA? ===&lt;br /&gt;
&lt;br /&gt;
To have a game published on BGA we need 2 things:&lt;br /&gt;
* The authorization of the rights owner (most of the time: original publisher of the game).&lt;br /&gt;
* A software developer who develops the adaptation (ie: has some time available to develop it).&lt;br /&gt;
&lt;br /&gt;
We (= BGA team) are trying a lot of board games ourselves. Sometimes we are lucky enough to play prototypes too. And of course we receive a lot of game suggestions through the BGA forum, the BoardGameGeek &amp;quot;most wanted games&amp;quot; list, or by any other means. Based on this we are asking game publishers for authorizations, and sometimes we also receive requests directly from game publishers - there is no rule.&lt;br /&gt;
&lt;br /&gt;
As it is today, BGA has a very good reputation and very productive relationships with almost all major board game publishers, but this is not enough: each situation is specific, and there can be various reasons why a game publisher can refuse to see a game adaptation on BGA (for example: board games with a third party licence, like &amp;quot;Star Wars&amp;quot;, is practically impossible to negotiate).&lt;br /&gt;
&lt;br /&gt;
On the other hand, we got some authorizations for some very good games but no developers volunteering to develop them, or sometimes some of them don&#039;t manage to finish the job. Developers of adaptations are volunteers, and we don&#039;t blame them for this.&lt;br /&gt;
&lt;br /&gt;
Finally, some games are authorized and being developed, but the time frame is not good. For example, it happened that we had too many games to release and we decided to delay some of them. It also frequently happens that we must synchronize the release of a game with a publisher event, so the game adaptation can stay &amp;quot;on hold&amp;quot; for some months.&lt;br /&gt;
&lt;br /&gt;
So if you are asking yourself: why game XXX is not on BGA, it could be for various reasons:&lt;br /&gt;
* Maybe we never asked authorization for this game. Note that usually we ask authorizations for every popular games (ex: &amp;quot;Most wanted games&amp;quot;). So if the game is popular, the reason is probably not this one.&lt;br /&gt;
* The publisher refused.&lt;br /&gt;
* The publisher accepted, but we didn&#039;t find a developer until now for this game.&lt;br /&gt;
* The game adaptation is ready, but we are waiting for a specific event to release it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To conclude: yes we are taking into account your suggestions, but as you can see there are many factors than can influence the fact that a game is (or is not) on BGA. In addition, as a rule of thumb, we don&#039;t communicate about &amp;quot;why&amp;quot; this game is not on BGA. If we already got the authorization, we want to keep the &amp;quot;surprise&amp;quot;, and if we didn&#039;t get the authorization, the game publisher may not want to explain the reasons.&lt;br /&gt;
&lt;br /&gt;
=== Are you taking into account the &amp;quot;Most wanted games&amp;quot; list? When will these games be on BGA? ===&lt;br /&gt;
&lt;br /&gt;
You should read first the previous section (&amp;quot;how do we select games that are on BGA?&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
So the answer is:&lt;br /&gt;
* Yes, we are taking this list into account.&lt;br /&gt;
* For most of these games we already asked for authorizations.&lt;br /&gt;
* Some of these games won&#039;t be on BGA (authorization refused), some may be, some are in an &amp;quot;intermediate&amp;quot; step.&lt;br /&gt;
* We don&#039;t communicate about future game releases anyway.&lt;br /&gt;
&lt;br /&gt;
=== Why do some games have expansions on BGA and some don&#039;t? ===&lt;br /&gt;
&lt;br /&gt;
You should read first the previous section (&amp;quot;how do we select games that are on BGA?&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Game expansions follow the same steps than games. There can be various reasons why a game publisher doesn&#039;t want the expansion online, and sometimes we don&#039;t find a developer that has the time to develop it.&lt;br /&gt;
&lt;br /&gt;
===I&#039;m a game publisher: why would I like to have my game on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
The main goal of Board Game Arena is to make it easy for people to discover and love new games. We think that there are only two kinds of players on Board Game Arena: those who already bought the games they are playing online, and those who plan to buy them soon!&lt;br /&gt;
&lt;br /&gt;
As the activity of this website contributes to increasing a game&#039;s popularity and thus generates hard copy sales in the &amp;quot;real world&amp;quot;, we think it is beneficial to the board game community: people from all over the world can play online, we can have fun developing this game platform to the best of our ability, and game publishers get money from the box sales and build a special relationship with their player&#039;s community.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m a game publisher: how to get my game on Board Game Arena ===&lt;br /&gt;
&lt;br /&gt;
At first, you just have to write us an email (contact (at) boardgamearena.com) with a description of your game(s).&lt;br /&gt;
&lt;br /&gt;
Then, we add this game to the list of &amp;quot;available licences&amp;quot; on our website dedicated to game developers ([http://studio.boardgamearena.com BGA Studio]).&lt;br /&gt;
&lt;br /&gt;
The most difficult part is to find a developer among our community. Our only requirement is that the developer must love the game. Of course, the most popular the game is, the easiest it is to find a volunteer developer. Sometimes it is very fast, sometimes it takes months, sometimes it never happens. We can&#039;t say in advance.&lt;br /&gt;
&lt;br /&gt;
It is also possible to find your own developer: of course it accelerates the process a lot!&lt;br /&gt;
&lt;br /&gt;
== Turn-based mode ==&lt;br /&gt;
&lt;br /&gt;
Please read [[Turn based FAQ]].&lt;br /&gt;
&lt;br /&gt;
== Issues with BGA ==&lt;br /&gt;
&lt;br /&gt;
===What can I do if I have an issue with the website?===&lt;br /&gt;
&lt;br /&gt;
Most of the issues on this website should be solved with a simple web page refresh (or &amp;quot;F5&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you experience persistent issues, you can browse the [http://boardgamearena.com/#!bugs bug tool], see if someone already reported the issue, and add a new bug report if that&#039;s not the case. Please take some time to describe the bug you are reporting in detail so that we can quickly reproduce and fix it.&lt;br /&gt;
&lt;br /&gt;
=== Why is my bug still not fixed? ===&lt;br /&gt;
&lt;br /&gt;
We fix bugs every weeks. Of course we have priorities:&lt;br /&gt;
* We give the highest priority to recent features and recent games, because the most important bugs are reported fast.&lt;br /&gt;
* We give the highest priority to the bugs with the biggest number of &amp;quot;green thumb&amp;quot; on the [http://boardgamearena.com/#!bugs bug tool].&lt;br /&gt;
* Usually we fix bugs by group. So if we decide to fix an important bug on a game, there is chance that we fix 3 or 4 minor bug at the same time.&lt;br /&gt;
&lt;br /&gt;
BGA is known for the quality of its adaptation, and if you look at the bug tool, you can see that -considering the number of games and the size of the community- there are not so much critical bugs with many &amp;quot;green thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Please also note that BGA adaptations are realized by volunteers and not professional developers (even if most of them are also professional developers). This is not always easy for them to fix bugs, especially when some players are complaining violently and/or do not give precise information in bug reports.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I played on smartphone / tablet / touch device and I have some difficulties: what can I do? ===&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb, BGA do not support tablet/smartphones. There are tons of board gamers adaptations for tablet/smartphones, and some BGA adaptations are not well designed for small screens. Thus, we don&#039;t have plan to do a mobile / tablet version at now.&lt;br /&gt;
&lt;br /&gt;
So if you want to use BGA from a smartphone / tablet you can, but we don&#039;t promise to fix all bugs so it&#039;s at your own risk :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Why BGA is slow? Why do I have bad connections performances on BGA? ===&lt;br /&gt;
&lt;br /&gt;
We are constantly monitoring server responsiveness. Some incidents occurs, but most of the time BGA is responsive.&lt;br /&gt;
&lt;br /&gt;
We designed our game servers (ie: servers used when you are inside a game) to be very responsive. Usually, less than 2% of the game moves take more than 200 milliseconds to process, and less than 0.2% take more than 1 seconds.&lt;br /&gt;
&lt;br /&gt;
BGA servers are located in Europe (France), but we bought servers all across the world (19 locations) so that the big files (ex: images) are loaded fast even if you are far from us.&lt;br /&gt;
&lt;br /&gt;
Most of bad performances came from your internet connection or your system. Try to connect with a different browser / computer / internet connection to troubleshoot the issue.&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb, is BGA is not responsive enough, you shouldn&#039;t engage yourself into a game because there is a risk for you to get clock penalties.&lt;br /&gt;
&lt;br /&gt;
=== I got issue with a specific player: how does the moderation works? ===&lt;br /&gt;
&lt;br /&gt;
You should read [[Moderation and grades]] page.&lt;br /&gt;
&lt;br /&gt;
== Contribute to BGA ==&lt;br /&gt;
&lt;br /&gt;
=== How can I contribute to BGA? ===&lt;br /&gt;
&lt;br /&gt;
Please visit page [http://boardgamearena.com/#!contribute Contribute to BGA].&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m a software developer. What can I do? ===&lt;br /&gt;
&lt;br /&gt;
We created a website specifically dedicated to board games adaptation development: [http://studio.boardgamearena.com BGA Studio].&lt;br /&gt;
&lt;br /&gt;
== About the BGA team ==&lt;br /&gt;
&lt;br /&gt;
=== Who are you? How to contact you? ===&lt;br /&gt;
&lt;br /&gt;
Please read page [[About us]].&lt;br /&gt;
&lt;br /&gt;
=== How you guys make money? Do you make a living of it? ===&lt;br /&gt;
&lt;br /&gt;
Yes we still work aside, and yes there is a huge work to be done here everyday.&lt;br /&gt;
&lt;br /&gt;
There is essentially Club membership, but this is not enough. What we&#039;d like to do is basically continue like this because we think this &amp;quot;community based&amp;quot; approach is the best for BGA.&lt;br /&gt;
&lt;br /&gt;
What we are trying to do, in addition, is to find a way to create a commercial activity in game portal development, distinct from BGA. This way we could have a flexible work with a source of revenue, distinct from BGA, that allows us to finance the time we spent on BGA.&lt;br /&gt;
&lt;br /&gt;
=== Do you recruit? ===&lt;br /&gt;
&lt;br /&gt;
If we had enough money we would start by &amp;quot;recruiting ourselves&amp;quot; :)&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1515</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1515"/>
		<updated>2015-04-28T20:40:01Z</updated>

		<summary type="html">&lt;p&gt;Een: /* About board games we proposed on BGA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Help]]&lt;br /&gt;
&lt;br /&gt;
== General questions ==&lt;br /&gt;
&lt;br /&gt;
===What is Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena (BGA) is an online board game platform. With BGA, you can play online and in real time against players from the whole world. A selection of various board games and card games is available. In order to play, the only thing you need is your browser!&lt;br /&gt;
&lt;br /&gt;
===What do you mean by &amp;quot;real time play&amp;quot;?===&lt;br /&gt;
&lt;br /&gt;
On Board Game Arena your opponents are connected to the game platform during the entire game. They can see your moves and react to them immediately - as is the case in the real world.&lt;br /&gt;
&lt;br /&gt;
===What is &amp;quot;turn based play&amp;quot;?===&lt;br /&gt;
&lt;br /&gt;
This is often referred to as &amp;quot;asynchronous play&amp;quot; on other sites, and is used here to differentiate from &amp;quot;real time play&amp;quot;.  Instead of all players being around the table at the same time, players leave and come back.  After your opponent takes a move you are notified that it is your turn (via email or on your next visit to the site).  You then go to your game, take your turn, and the process repeats for the next player.&lt;br /&gt;
&lt;br /&gt;
For details please read [[Turn based FAQ]].&lt;br /&gt;
&lt;br /&gt;
===What do I need to play?===&lt;br /&gt;
&lt;br /&gt;
Your browser ... and that&#039;s it!&lt;br /&gt;
&lt;br /&gt;
Board Game Arena does not require anything else on your computer. Thus, you can play from any computer, anywhere, anytime!&lt;br /&gt;
&lt;br /&gt;
In order to make this possible we are using the latest technologies available for the web. This is the reason you should play with the most up to date web browsers to enjoy an optimal BGA experience (read more about our [[Browser_support|browser policy]]).&lt;br /&gt;
&lt;br /&gt;
===How much does it cost to play on BGA?===&lt;br /&gt;
&lt;br /&gt;
Playing on BGA is free.&lt;br /&gt;
&lt;br /&gt;
You can also choose to help us by making a donation and becoming a [http://en.boardgamearena.com/#!club Board Game Arena club] member.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What are the games available on BGA?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena offers a various selection of board and card games, but  specializes in modern (&amp;quot;European style&amp;quot;) adult games.&lt;br /&gt;
&lt;br /&gt;
[http://en.boardgamearena.com/#!gamelist See available games].&lt;br /&gt;
&lt;br /&gt;
== Meeting players and starting games ==&lt;br /&gt;
&lt;br /&gt;
===I launched a new table but nobody is joining?===&lt;br /&gt;
&lt;br /&gt;
For the most popular games you can find players at any time of the day. For other games we advise you to come back at peak hour (around 22:00 CEST) if you can&#039;t find opponents at the moment.&lt;br /&gt;
&lt;br /&gt;
Tip: check the number of online/available players for a game before launching the table.&lt;br /&gt;
&lt;br /&gt;
Tip: if nobody is available for a realtime game, you can turn your table into a turn-based table, so another player can join even hours/days after you created it.&lt;br /&gt;
&lt;br /&gt;
===I joined a game. When does the game start?===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For realtime games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
Each table has an administrator, which is the table creator. It is the responsibility of the table administrator to start the game when he is satisfied with the number of players having joined the table.&lt;br /&gt;
&lt;br /&gt;
If you are the table administrator and can&#039;t launch the game, most of the time it&#039;s because there is not yet enough players joined the table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For turnbased games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
The game starts as soon as the maximum number of players has been reached. The table administrator can also starts the game manually if the minimum number of required players has been reached.&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the small color circle next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/online_.png : this player is active. He completed an action very recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/inactive_.png : this player is inactive. He is connected to the website but did not perform any action recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/offline_.png : this player is offline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What does the &#039;% hits&#039; statistic mean?===&lt;br /&gt;
% hits = number of victory points / number of games played&lt;br /&gt;
&lt;br /&gt;
Where number of victory points is the following:&lt;br /&gt;
* When you win a 2 players game: 1 point.&lt;br /&gt;
* When you win a 3 players game: 1.5 points.&lt;br /&gt;
* When you win a 4 players game: 2 points.&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
This way, &amp;quot;50%&amp;quot; means that you win 50% of 2 players game, or 33% of 3 players game, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== During the game ==&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the icons next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player.gif : this player must make a move now.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_clockalert.gif : this player must make a move now, and he has spent his reflexion time. Can someone wake him up? ;)&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_nonack.gif : this player must make a move now, but is probably not aware of the fact. If the situation does not evolve, it might be that this player has some connection issue.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/common/zombie.png : this player is a &amp;quot;zombie&amp;quot; (he left the game or has been fired from the game). The game goes on without this player.&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;normal&amp;quot; avatar of a player is displayed, it means that this player is waiting for his turn to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A player has to make a move but he/she doesn&#039;t. What can I do?===&lt;br /&gt;
&lt;br /&gt;
* First, please remember that this player has the right to think as long as he needs to about the next move...  well as long as he still has some time left on the game clock, that is.&lt;br /&gt;
* Then you can ask this player to confirm that he is still thinking about how to play.&lt;br /&gt;
* If this player seems to be away, we advise you to wait a few  minutes: this player may be experiencing some network problems or have left his computer temporarily.&lt;br /&gt;
* If the player is not coming back, you can skip his turn as soon as his clock is negative. He will get a &amp;quot;leave&amp;quot; penalty and you will will &amp;quot;by forfeit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For more details, please read [[Game clock]].&lt;br /&gt;
&lt;br /&gt;
===What is the current progression of the game I&#039;m playing?===&lt;br /&gt;
&lt;br /&gt;
A percentage of progression is displayed on the top of the web page.&lt;br /&gt;
There is also a progress bar at the bottom of the web page shows you the current progression of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is forbidden on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Leaving a game in progress on purpose.&lt;br /&gt;
* Taking an unnecessary and unreasonable amount of time at the end of game in an obvious losing situation.&lt;br /&gt;
* Kingmaking: enabling another player to win on purpose while there is a better move to make for yourself.&lt;br /&gt;
* Running out of time on the game clock.&lt;br /&gt;
* Giving some piece of information about the current game situation that corrupts the normal game flow.&lt;br /&gt;
* Communicating with another player about the game privately (ex: with MSN).&lt;br /&gt;
* Provocation / triumphalism / defeatism ... anything which is not fair play.&lt;br /&gt;
* Having a shocking avatar (no advertisement, no politics, ...)&lt;br /&gt;
&lt;br /&gt;
Going against these rules will affect your reputation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is absolutely forbidden in Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Creating multiple accounts and playing against oneself.&lt;br /&gt;
* Insulting other players in any manner.&lt;br /&gt;
&lt;br /&gt;
Going against these rules can lead to the removal of your account and/or to the blacklisting of your IP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What if some player does something wrong?===&lt;br /&gt;
&lt;br /&gt;
The Board Game Arena platform has been designed to encourage players to maintain good behavior. The reputation system allows you to distinguish between good and bad players. Then, it is up to you to decide whether to start a game with them or not.&lt;br /&gt;
&lt;br /&gt;
If you think a player has behaved badly during a game, you can give him a &amp;quot;red thumb&amp;quot; at the end of the game.&lt;br /&gt;
&lt;br /&gt;
If you think a player has committed a serious wrongdoing during a game (ex: insult), please report this player to us, using the &amp;quot;report this player&amp;quot; link from his profile or game result page, so that we can take appropriate measures.&lt;br /&gt;
&lt;br /&gt;
== Tournaments ==&lt;br /&gt;
&lt;br /&gt;
Tournaments is a BETA feature of BGA (for a long time).&lt;br /&gt;
&lt;br /&gt;
Tournament management is very complex. We&#039;d like to open tournament creation to everyone at some time in the future but it need a lot of work and until then we always had something more urgent to do.&lt;br /&gt;
&lt;br /&gt;
When tournaments will be improved, this FAQ section will be improved too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About board games we proposed on BGA ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is the legal status of this website?===&lt;br /&gt;
&lt;br /&gt;
All the games currently available on this site have been licensed or otherwise authorized by copyright holders. Please be aware that games available on BGA can be removed at the copyright holders demand (for example: if they publish their own adaptation of the game).&lt;br /&gt;
&lt;br /&gt;
Board Game Arena would like to thank all game publishers and game designers who allow us to have their games here, thus making it possible for this website to exist.&lt;br /&gt;
&lt;br /&gt;
=== How do we select games that are on BGA? Why the game XXX is not on BGA? ===&lt;br /&gt;
&lt;br /&gt;
To have a game published on BGA we need 2 things:&lt;br /&gt;
* The authorization of the rights owner (most of the time: original publisher of the game).&lt;br /&gt;
* A software developer who develops the adaptation (ie: has some time available to develop it).&lt;br /&gt;
&lt;br /&gt;
We (= BGA team) are trying a lot of board games ourselves. Sometimes we are lucky enough to play prototypes too. And of course we receive a lot of game suggestions through the BGA forum, the BoardGameGeek &amp;quot;most wanted games&amp;quot; list, or by any other means. Based on this we are asking game publishers for authorizations, and sometimes we also receive requests directly from game publishers - there is no rule.&lt;br /&gt;
&lt;br /&gt;
As it is today, BGA has a very good reputation and very productive relationships with almost all major board game publishers, but this is not enough: each situation is specific, and there can be various reasons why a game publisher can refuse to see a game adaptation on BGA (for example: board games with a third party licence, like &amp;quot;Star Wars&amp;quot;, is practically impossible to negotiate).&lt;br /&gt;
&lt;br /&gt;
On the other hand, we got some authorizations for some very good games but no developers volunteering to develop them, or sometimes some of them don&#039;t manage to finish the job. Developers of adaptations are volunteers, and we don&#039;t blame them for this.&lt;br /&gt;
&lt;br /&gt;
Finally, some games are authorized and being developed, but the time frame is not good. For example, it happened that we had too many games to release and we decided to delay some of them. It also frequently happens that we must synchronize the release of a game with a publisher event, so the game adaptation can stay &amp;quot;on hold&amp;quot; for some months.&lt;br /&gt;
&lt;br /&gt;
So if you are asking yourself: why game XXX is not on BGA, it could be for various reasons:&lt;br /&gt;
* Maybe we never asked authorization for this game. Note that usually we ask authorizations for every popular games (ex: &amp;quot;Most wanted games&amp;quot;). So if the game is popular, the reason is probably not this one.&lt;br /&gt;
* The publisher refused.&lt;br /&gt;
* The publisher accepted, but we didn&#039;t find a developer until now for this game.&lt;br /&gt;
* The game adaptation is ready, but we are waiting for a specific event to release it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To conclude: yes we are taking into account your suggestions, but as you can see there are many factors than can influence the fact that a game is (or is not) on BGA. In addition, as a rule of thumb, we don&#039;t communicate about &amp;quot;why&amp;quot; this game is not on BGA. If we already got the authorization, we want to keep the &amp;quot;surprise&amp;quot;, and if we didn&#039;t get the authorization, the game publisher may not want to explain the reasons.&lt;br /&gt;
&lt;br /&gt;
=== Are you taking into account the &amp;quot;Most wanted games&amp;quot; list? When will these games be on BGA? ===&lt;br /&gt;
&lt;br /&gt;
You should read first the previous section (&amp;quot;how do we select games that are on BGA?&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
So the answer is:&lt;br /&gt;
* Yes, we are taking this list into account.&lt;br /&gt;
* For most of these games we already asked for authorizations.&lt;br /&gt;
* Some of these games won&#039;t be on BGA (authorization refused), some may be, some are in an &amp;quot;intermediate&amp;quot; step.&lt;br /&gt;
* We don&#039;t communicate about future game releases anyway.&lt;br /&gt;
&lt;br /&gt;
=== Why do some games have expansions on BGA and some don&#039;t? ===&lt;br /&gt;
&lt;br /&gt;
You should read first the previous section (&amp;quot;how do we select games that are on BGA?&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Game expansions follow the same steps than games. There can be various reasons why a game publisher doesn&#039;t want the expansion online, and sometimes we don&#039;t find a developer that has the time to develop it.&lt;br /&gt;
&lt;br /&gt;
===I&#039;m a game publisher: why would I like to have my game on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
The main goal of Board Game Arena is to make it easy for people to discover and love new games. We think that there are only two kinds of players on Board Game Arena: those who already bought the games they are playing online, and those who plan to buy them soon!&lt;br /&gt;
&lt;br /&gt;
As the activity of this website contributes to increasing a game&#039;s popularity and thus generates hard copy sales in the &amp;quot;real world&amp;quot;, we think it is beneficial to the board game community: people from all over the world can play online, we can have fun developing this game platform to the best of our ability, and game publishers get money from the box sales and build a special relationship with their player&#039;s community.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m a game publisher: how to get my game on Board Game Arena ===&lt;br /&gt;
&lt;br /&gt;
At first, you just have to write us an email (contact (at) boardgamearena.com) with a description of your game(s).&lt;br /&gt;
&lt;br /&gt;
Then, we add this game to the list of &amp;quot;available licences&amp;quot; on our website dedicated to game developers ([http://studio.boardgamearena.com BGA Studio]).&lt;br /&gt;
&lt;br /&gt;
The most difficult part is to find a developer among our community. Our only requirement is that the developer must love the game. Of course, the most popular the game is, the easiest it is to find a volunteer developer. Sometimes it is very fast, sometimes it takes months, sometimes it never happens. We can&#039;t say in advance.&lt;br /&gt;
&lt;br /&gt;
It is also possible to find your own developer: of course it accelerates the process a lot!&lt;br /&gt;
&lt;br /&gt;
== Turn-based mode ==&lt;br /&gt;
&lt;br /&gt;
Please read [[Turn based FAQ]].&lt;br /&gt;
&lt;br /&gt;
== Issues with BGA ==&lt;br /&gt;
&lt;br /&gt;
===What can I do if I have an issue with the website?===&lt;br /&gt;
&lt;br /&gt;
Most of the issues on this website should be solved with a simple web page refresh (or &amp;quot;F5&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you experience persistent issues, you can browse the [http://boardgamearena.com/#!bugs bug tool], see if someone already reported the issue, and add a new bug report if that&#039;s not the case. Please take some time to describe the bug you are reporting in detail so that we can quickly reproduce and fix it.&lt;br /&gt;
&lt;br /&gt;
=== Why is my bug still not fixed? ===&lt;br /&gt;
&lt;br /&gt;
We fix bugs every weeks. Of course we have priorities:&lt;br /&gt;
* We give the highest priority to recent features and recent games, because the most important bugs are reported fast.&lt;br /&gt;
* We give the highest priority to the bugs with the biggest number of &amp;quot;green thumb&amp;quot; on the [http://boardgamearena.com/#!bugs bug tool].&lt;br /&gt;
* Usually we fix bugs by group. So if we decide to fix an important bug on a game, there is chance that we fix 3 or 4 minor bug at the same time.&lt;br /&gt;
&lt;br /&gt;
BGA is known for the quality of its adaptation, and if you look at the bug tool, you can see that -considering the number of games and the size of the community- there are not so much critical bugs with many &amp;quot;green thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Please also note that BGA adaptations are realized by volunteers and not professional developers (even if most of them are also professional developers). This is not always easy for them to fix bugs, especially when some players are complaining violently and/or do not give precise information in bug reports.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I played on smartphone / tablet / touch device and I have some difficulties: what can I do? ===&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb, BGA do not support tablet/smartphones. There are tons of board gamers adaptations for tablet/smartphones, and some BGA adaptations are not well designed for small screens. Thus, we don&#039;t have plan to do a mobile / tablet version at now.&lt;br /&gt;
&lt;br /&gt;
So if you want to use BGA from a smartphone / tablet you can, but we don&#039;t promise to fix all bugs so it&#039;s at your own risk :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Why BGA is slow? Why do I have bad connections performances on BGA? ===&lt;br /&gt;
&lt;br /&gt;
We are constantly monitoring server responsiveness. Some incidents occurs, but most of the time BGA is responsive.&lt;br /&gt;
&lt;br /&gt;
We designed our game servers (ie: servers used when you are inside a game) to be very responsive. Usually, less than 2% of the game moves take more than 200 milliseconds to process, and less than 0.2% take more than 1 seconds.&lt;br /&gt;
&lt;br /&gt;
BGA servers are located in Europe (France), but we bought servers all across the world (19 locations) so that the big files (ex: images) are loaded fast even if you are far from us.&lt;br /&gt;
&lt;br /&gt;
Most of bad performances came from your internet connection or your system. Try to connect with a different browser / computer / internet connection to troubleshoot the issue.&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb, is BGA is not responsive enough, you shouldn&#039;t engage yourself into a game because there is a risk for you to get clock penalties.&lt;br /&gt;
&lt;br /&gt;
=== I got issue with a specific player: how does the moderation works? ===&lt;br /&gt;
&lt;br /&gt;
You should read [[Moderation and grades]] page.&lt;br /&gt;
&lt;br /&gt;
== Contribute to BGA ==&lt;br /&gt;
&lt;br /&gt;
=== How can I contribute to BGA? ===&lt;br /&gt;
&lt;br /&gt;
Please visit page [http://boardgamearena.com/#!contribute Contribute to BGA].&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m a software developer. What can I do? ===&lt;br /&gt;
&lt;br /&gt;
We created a website specifically dedicated to board games adaptation development: [http://studio.boardgamearena.com BGA Studio].&lt;br /&gt;
&lt;br /&gt;
== About the BGA team ==&lt;br /&gt;
&lt;br /&gt;
=== Who are you? How to contact you? ===&lt;br /&gt;
&lt;br /&gt;
Please read page [[About us]].&lt;br /&gt;
&lt;br /&gt;
=== How you guys make money? Do you make a living of it? ===&lt;br /&gt;
&lt;br /&gt;
Yes we still work aside, and yes there is a huge work to be done here everyday.&lt;br /&gt;
&lt;br /&gt;
There is essentially Club membership, but this is not enough. What we&#039;d like to do is basically continue like this because we think this is the best approach for BGA.&lt;br /&gt;
&lt;br /&gt;
What we are trying to do, in addition, is to find a way to create a commercial activity in game portal development, distinct from BGA. This way we could have a flexible work with a source of revenue, distinct from BGA, that allow us to finance the time we spent on BGA.&lt;br /&gt;
&lt;br /&gt;
=== Do you recruit? ===&lt;br /&gt;
&lt;br /&gt;
If we had enough money we would start by &amp;quot;recruiting ourselves&amp;quot; :)&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Game_clock&amp;diff=1375</id>
		<title>Game clock</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Game_clock&amp;diff=1375"/>
		<updated>2015-02-18T21:21:12Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Help]]&lt;br /&gt;
On &#039;&#039;&#039;Board Game Arena&#039;&#039;&#039; you are playing &amp;quot;live&amp;quot; (real time) or &amp;quot;turn-based&amp;quot; (asynchronously). In both cases, you have an allotted delay to play your moves.&lt;br /&gt;
&lt;br /&gt;
Most of the time, your initial delay at the beginning of a game is some minutes (in realtime mode) or some days (in turn-based mode). During each turn, or on specific occasions, you get an additional delay. If you have no more time to play, you will get a &amp;quot;clock&amp;quot; penalty and your opponents can decide to skip your turns.&lt;br /&gt;
&lt;br /&gt;
== Time to think ==&lt;br /&gt;
&lt;br /&gt;
Your allotted time to think is displayed on the right of your player&#039;s name. When it&#039;s your turn to play, this time is also displayed at the top of the web page.&lt;br /&gt;
&lt;br /&gt;
== Game speed ==&lt;br /&gt;
&lt;br /&gt;
Table administrator can make a choice between some game speed profile (example: fast, normal, slow). There are many speeds for each mode (realtime and turn-based).&lt;br /&gt;
&lt;br /&gt;
The additional amount of time credited each turn depends on the chosen game speed profile. Be careful to check the game speed setting before the game starts to adjust your timing. The interface displays an estimation of the game duration based on recently played games with the same speed settings.&lt;br /&gt;
&lt;br /&gt;
Note: your allotted time to think cannot get higher that your initial time to think. For example, if you start the game with 5 minutes of thinking time, you time will be limited to 5 minutes maximum.&lt;br /&gt;
&lt;br /&gt;
Note: playing without a time limit is strongly discouraged, except if you are playing with friends, or to discover a new game. Remember that without time limit, you can&#039;t skip the turn of a player that is not playing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running out of time ==&lt;br /&gt;
&lt;br /&gt;
As soon as you run out of time (negative clock), you get a clock penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For realtime games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When a player has a negative clock, any one of his opponents can make him skip his turn. Once this has been done, all following turns are skipped automatically.&lt;br /&gt;
&lt;br /&gt;
When you are in this situation (turns skipped automatically), you can get back in the game by clicking on the dedicated button &amp;quot;get back in this game&amp;quot;. Note that you are not allowed to get back in the game if your clock is still negative. However, as all your turn are skipped, it shouldn&#039;t take long before your clock becomes positive again.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t/don&#039;t manage to get back in the game before the game end, you will get &#039;&#039;&#039;both&#039;&#039;&#039; a &amp;quot;leave&amp;quot; penalty on your profile and an ELO penalty for this game.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For turn-based games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
On turn-based games, you are warned by email when you are running out of time.&lt;br /&gt;
&lt;br /&gt;
When you are out of time, your opponents also receive an email notifying them that they can make you skip your turn (they can also choose to wait if they don&#039;t mind or if you told them that you would be offline for some time).&lt;br /&gt;
&lt;br /&gt;
== Continue the game after a &amp;quot;skip turn&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
If you are playing in a game where a player skips all his turns, you have 2 options:&lt;br /&gt;
* You can continue to play the game until the end. This is recommended. In this case you will earn the ELO points you deserve for your victory.&lt;br /&gt;
* You can abandon the game. All players with a negative clock will accept automatically and receive &#039;&#039;&#039;both&#039;&#039;&#039; an ELO penalty and a &amp;quot;leave&amp;quot; penalty. But the you and the other players with a positive clock won&#039;t get any ELO since the game didn&#039;t reach its end).&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;My opponent is too slow&amp;quot; ==&lt;br /&gt;
 &lt;br /&gt;
Each of us has different expectations on game speed. Please remember that as soon as a table has been set up at a given game speed, each player is allowed to use all his allotted time to think. If you want to play fast, set up or join only tables with &amp;quot;fast&amp;quot; mode on, but don&#039;t bully an opponent to play when he has the right to use his alloted time to think.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== &amp;quot;I would like to think a little&amp;quot; ==&lt;br /&gt;
 &lt;br /&gt;
If you are in a critical step of the game and want to take some time to think, you can click on the &amp;quot;I would like to think a little&amp;quot; link at the top right of the page.&lt;br /&gt;
&lt;br /&gt;
Thus, your opponents will get a message and won&#039;t be thinking that you are away from keyboard or disconnected.&lt;br /&gt;
&lt;br /&gt;
Clicking on this link is not mandatory, but we encourage its use as a courtesy.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Game_clock&amp;diff=1373</id>
		<title>Game clock</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Game_clock&amp;diff=1373"/>
		<updated>2015-02-17T22:03:59Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Help]]&lt;br /&gt;
On &#039;&#039;&#039;Board Game Arena&#039;&#039;&#039; you are playing &amp;quot;live&amp;quot; (real time) or &amp;quot;turn-based&amp;quot; (asynchronously). In both cases, you have an allotted delay to play your moves.&lt;br /&gt;
&lt;br /&gt;
Most of the time, your initial delay at the beginning of a game is some minutes (in realtime mode) or some days (in turn-based mode). During each turn, or on specific occasions, you get an additional delay. If you have no more time to play, you will get a &amp;quot;clock&amp;quot; penalty and your opponents can decide to skip your turns.&lt;br /&gt;
&lt;br /&gt;
== Time to think ==&lt;br /&gt;
&lt;br /&gt;
Your allotted time to think is displayed on the right of your player&#039;s name. When it&#039;s your turn to play, this time is also displayed at the top of the web page.&lt;br /&gt;
&lt;br /&gt;
== Game speed ==&lt;br /&gt;
&lt;br /&gt;
Table administrator can make a choice between some game speed profile (example: fast, normal, slow). There are many speeds for each mode (realtime and turn-based).&lt;br /&gt;
&lt;br /&gt;
The additional amount of time credited each turn depends on the chosen game speed profile. Be careful to check the game speed setting before the game starts to adjust your timing. The interface displays an estimation of the game duration based on recently played games with the same speed settings.&lt;br /&gt;
&lt;br /&gt;
Note: your allotted time to think cannot get higher that your initial time to think. For example, if you start the game with 5 minutes of thinking time, you time will be limited to 5 minutes maximum.&lt;br /&gt;
&lt;br /&gt;
Note: playing without a time limit is strongly discouraged, except if you are playing with friends, or to discover a new game. Remember that without time limit, you can&#039;t skip the turn of a player that is not playing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running out of time ==&lt;br /&gt;
&lt;br /&gt;
As soon as you run out of time (negative clock), you get a clock penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For realtime games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When a player has a negative clock, any one of his opponents can make him skip his turn. Once this has been done, all following turns are skipped automatically.&lt;br /&gt;
&lt;br /&gt;
When you are in this situation (turns skipped automatically), you can get back in the game by clicking on the dedicated button &amp;quot;get back in this game&amp;quot;. Note that you are not allowed to get back in the game if your clock is still negative. However, as all your turn are skipped, it shouldn&#039;t take long before your clock becomes positive again.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t/don&#039;t manage to get back in the game before the game end, you will get a &amp;quot;leave&amp;quot; penalty on your profile.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For turn-based games&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
On turn-based games, you are warned by email when you are running out of time.&lt;br /&gt;
&lt;br /&gt;
When you are out of time, your opponents receive an email notifying them that they can make you skip your turn.&lt;br /&gt;
&lt;br /&gt;
== Continue the game after a &amp;quot;skip turn&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
If you are playing in a game where a player skips all his turns, you have 2 options:&lt;br /&gt;
* You can continue to play the game until the end. This is recommended. In this case you will earn the ELO points you deserve for your victory.&lt;br /&gt;
* You can abandon the game. All players with a negative clock will accept automatically and receive both an ELO penalty and a &amp;quot;leave&amp;quot; penalty. But the you and the other players with a positive clock won&#039;t get any ELO since the game didn&#039;t reach its end).&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;My opponent is too slow&amp;quot; ==&lt;br /&gt;
 &lt;br /&gt;
Each of us has different expectations on game speed. Please remember that as soon as a table has been set up at a given game speed, each player is allowed to use all his allotted time to think. If you want to play fast, set up or join only tables with &amp;quot;fast&amp;quot; mode on, but don&#039;t bully an opponent to play when he has the right to use his alloted time to think.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== &amp;quot;I would like to think a little&amp;quot; ==&lt;br /&gt;
 &lt;br /&gt;
If you are in a critical step of the game and want to take some time to think, you can click on the &amp;quot;I would like to think a little&amp;quot; link at the top right of the page.&lt;br /&gt;
&lt;br /&gt;
Thus, your opponents will get a message and won&#039;t be thinking that you are away from keyboard or disconnected.&lt;br /&gt;
&lt;br /&gt;
Clicking on this link is not mandatory, but we encourage its use as a courtesy.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1278</id>
		<title>Gamehelpcheckers</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1278"/>
		<updated>2014-10-26T20:48:05Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Game variants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Objective of the Game ==&lt;br /&gt;
&lt;br /&gt;
Checkers, also known as &#039;draughts&#039;, is a timeless abstract strategy game for two players dating back almost a thousand years. In the game you move your pieces until you&#039;ve jumped over all pieces of your opponent and have removed them from the board. Players move one piece diagonally at a time in alternating play (starting with light).  All references to squares refer to the dark squares only. The board is an 8 by 8 square of squares in alternating light or dark colours.  Players should set up pieces on the 12 dark squares in the first three rows closest to them (the light spaces are completely ignored in the game), setting up three rows of 4 checkers.&lt;br /&gt;
&lt;br /&gt;
== Game variants ==&lt;br /&gt;
&lt;br /&gt;
There is a lot of Checkers variants. Four of them are available on Board Game Arena :&lt;br /&gt;
&lt;br /&gt;
:* International Checkers (10x10 board, men can capture backwards, kings can fly, one must capture as many pieces as possible)&lt;br /&gt;
:* Straight Checkers (8x8 board, men cannot capture backwards, kings can capture backwards but cannot fly, one must capture if possible but not necessarily as many pieces as possible)&lt;br /&gt;
:* Brazilian Checkers (8x8 board, men can capture backwards, kings can fly, one must capture as many pieces as possible)&lt;br /&gt;
:* Russian Checkers (8x8 board, men can capture backwards, kings can fly and go on capturing immediately after getting crowned, one must capture if possible but not necessarily as many pieces as possible).&lt;br /&gt;
&lt;br /&gt;
Make sure to check the rules for the variant you are currently playing: the following detailed section applies only to Straight Checkers.&lt;br /&gt;
&lt;br /&gt;
== Straight Checkers ==&lt;br /&gt;
&lt;br /&gt;
===Moving &amp;amp; Capturing===&lt;br /&gt;
&lt;br /&gt;
Take turns moving a checker one space diagonally forward towards the opponent&#039;s side of the board on a square that contains no checkers of either player. You may &#039;jump&#039; your opponents checkers by making a capturing move if your checker is located at most one space behind your opponent&#039;s checker (on your side). When capturing you jump over the checker moving two spaces in the same direction and then remove their piece from the game. Capturing multiple pieces using multiple jumps in the same turn is a key part of the game, when doing so you may change which direction they&#039;re moving diagonally, but they must still always move forward.&lt;br /&gt;
&lt;br /&gt;
:* If you have the opportunity to jump your opponent&#039;s checker, you must.&lt;br /&gt;
:* You may continue capturing subsequent checkers until there are no more possible captures.&lt;br /&gt;
:* If you have the opportunity to jump a choice of opponent&#039;s checkers, you may choose which but must capture one of them.&lt;br /&gt;
&lt;br /&gt;
===Kings===&lt;br /&gt;
&lt;br /&gt;
When one of your pieces reaches the end of the opponent&#039;s board that piece is upgraded to a king, these may move in either direction now.&lt;br /&gt;
&lt;br /&gt;
:* Kings may move forward or backward diagonally.&lt;br /&gt;
:* Kings can still only move one diagonal space at a time unless capturing.&lt;br /&gt;
:* Kings may move both forward and backward in the same turn when capturing.&lt;br /&gt;
&lt;br /&gt;
==Winning==&lt;br /&gt;
&lt;br /&gt;
Complete &#039;&#039;one&#039;&#039; of the following two objectives;&lt;br /&gt;
&lt;br /&gt;
:* Capture all of your opponent&#039;s pieces.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* Block all your opponent&#039;s pieces so they can&#039;t make any more moves.&lt;br /&gt;
&lt;br /&gt;
==Draws==&lt;br /&gt;
&lt;br /&gt;
A draw is declared if &#039;&#039;any&#039;&#039; of these conditions occur;&lt;br /&gt;
&lt;br /&gt;
:* The same situation repeats itself for the third time (not necessarily consecutive).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* 25 moves have been played without moving a man forward or making a capture.&lt;br /&gt;
&lt;br /&gt;
==Strategy==&lt;br /&gt;
&lt;br /&gt;
:* Be aggressive, you are more likely to win.  Playing to the board sides are safer though without reward.&lt;br /&gt;
:* Forward- always forward, it&#039;s alright to lose pieces as long as you take the opponent&#039;s, save your kings.&lt;br /&gt;
:* Safety in numbers, don&#039;t leave your pieces alone, move them one after another in small groups to protect them.&lt;br /&gt;
:* Protect the rear, protect forward or don&#039;t move your end row pieces as long as possible to prevent opponent&#039;s kings.&lt;br /&gt;
:* Sacrifice when needed. draw out your opponent so you can get 2-1 trades the following turn, don&#039;t expose your kings without reward.&lt;br /&gt;
:* Each king you get is a huge bonus, try to get as many as possible and don&#039;t waste them, sacrificing several pieces for a king can be alright.&lt;br /&gt;
:* Don&#039;t forget to block your opponent when possible, you make not only that piece vulnerable but fail to protect it with a counter and give your opponent the chance to take multiple of your pieces in one turn.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1277</id>
		<title>Gamehelpcheckers</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1277"/>
		<updated>2014-10-26T20:47:34Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Game variants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Objective of the Game ==&lt;br /&gt;
&lt;br /&gt;
Checkers, also known as &#039;draughts&#039;, is a timeless abstract strategy game for two players dating back almost a thousand years. In the game you move your pieces until you&#039;ve jumped over all pieces of your opponent and have removed them from the board. Players move one piece diagonally at a time in alternating play (starting with light).  All references to squares refer to the dark squares only. The board is an 8 by 8 square of squares in alternating light or dark colours.  Players should set up pieces on the 12 dark squares in the first three rows closest to them (the light spaces are completely ignored in the game), setting up three rows of 4 checkers.&lt;br /&gt;
&lt;br /&gt;
== Game variants ==&lt;br /&gt;
&lt;br /&gt;
There is a lot of Checkers variants. Four of them are available on Board Game Arena :&lt;br /&gt;
&lt;br /&gt;
:* International Checkers (10x10 board, men can capture backwards, kings can fly, one must capture as many pieces as possible)&lt;br /&gt;
:* Straight Checkers (8x8 board, men cannot capture backwards, kings can capture backwards but not fly, one must capture if possible but not necessarily as many pieces as possible)&lt;br /&gt;
:* Brazilian Checkers (8x8 board, men can capture backwards, kings can fly, one must capture as many pieces as possible)&lt;br /&gt;
:* Russian Checkers (8x8 board, men can capture backwards, kings can fly and go on capturing immediately after getting crowned, one must capture if possible but not necessarily as many pieces as possible).&lt;br /&gt;
&lt;br /&gt;
Make sure to check the rules for the variant you are currently playing: the following detailed section applies only to Straight Checkers.&lt;br /&gt;
&lt;br /&gt;
== Straight Checkers ==&lt;br /&gt;
&lt;br /&gt;
===Moving &amp;amp; Capturing===&lt;br /&gt;
&lt;br /&gt;
Take turns moving a checker one space diagonally forward towards the opponent&#039;s side of the board on a square that contains no checkers of either player. You may &#039;jump&#039; your opponents checkers by making a capturing move if your checker is located at most one space behind your opponent&#039;s checker (on your side). When capturing you jump over the checker moving two spaces in the same direction and then remove their piece from the game. Capturing multiple pieces using multiple jumps in the same turn is a key part of the game, when doing so you may change which direction they&#039;re moving diagonally, but they must still always move forward.&lt;br /&gt;
&lt;br /&gt;
:* If you have the opportunity to jump your opponent&#039;s checker, you must.&lt;br /&gt;
:* You may continue capturing subsequent checkers until there are no more possible captures.&lt;br /&gt;
:* If you have the opportunity to jump a choice of opponent&#039;s checkers, you may choose which but must capture one of them.&lt;br /&gt;
&lt;br /&gt;
===Kings===&lt;br /&gt;
&lt;br /&gt;
When one of your pieces reaches the end of the opponent&#039;s board that piece is upgraded to a king, these may move in either direction now.&lt;br /&gt;
&lt;br /&gt;
:* Kings may move forward or backward diagonally.&lt;br /&gt;
:* Kings can still only move one diagonal space at a time unless capturing.&lt;br /&gt;
:* Kings may move both forward and backward in the same turn when capturing.&lt;br /&gt;
&lt;br /&gt;
==Winning==&lt;br /&gt;
&lt;br /&gt;
Complete &#039;&#039;one&#039;&#039; of the following two objectives;&lt;br /&gt;
&lt;br /&gt;
:* Capture all of your opponent&#039;s pieces.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* Block all your opponent&#039;s pieces so they can&#039;t make any more moves.&lt;br /&gt;
&lt;br /&gt;
==Draws==&lt;br /&gt;
&lt;br /&gt;
A draw is declared if &#039;&#039;any&#039;&#039; of these conditions occur;&lt;br /&gt;
&lt;br /&gt;
:* The same situation repeats itself for the third time (not necessarily consecutive).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* 25 moves have been played without moving a man forward or making a capture.&lt;br /&gt;
&lt;br /&gt;
==Strategy==&lt;br /&gt;
&lt;br /&gt;
:* Be aggressive, you are more likely to win.  Playing to the board sides are safer though without reward.&lt;br /&gt;
:* Forward- always forward, it&#039;s alright to lose pieces as long as you take the opponent&#039;s, save your kings.&lt;br /&gt;
:* Safety in numbers, don&#039;t leave your pieces alone, move them one after another in small groups to protect them.&lt;br /&gt;
:* Protect the rear, protect forward or don&#039;t move your end row pieces as long as possible to prevent opponent&#039;s kings.&lt;br /&gt;
:* Sacrifice when needed. draw out your opponent so you can get 2-1 trades the following turn, don&#039;t expose your kings without reward.&lt;br /&gt;
:* Each king you get is a huge bonus, try to get as many as possible and don&#039;t waste them, sacrificing several pieces for a king can be alright.&lt;br /&gt;
:* Don&#039;t forget to block your opponent when possible, you make not only that piece vulnerable but fail to protect it with a counter and give your opponent the chance to take multiple of your pieces in one turn.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1276</id>
		<title>Gamehelpcheckers</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1276"/>
		<updated>2014-10-26T20:38:54Z</updated>

		<summary type="html">&lt;p&gt;Een: Make the description more accurate for BGA implementation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Objective of the Game ==&lt;br /&gt;
&lt;br /&gt;
Checkers, also known as &#039;draughts&#039;, is a timeless abstract strategy game for two players dating back almost a thousand years. In the game you move your pieces until you&#039;ve jumped over all pieces of your opponent and have removed them from the board. Players move one piece diagonally at a time in alternating play (starting with light).  All references to squares refer to the dark squares only. The board is an 8 by 8 square of squares in alternating light or dark colours.  Players should set up pieces on the 12 dark squares in the first three rows closest to them (the light spaces are completely ignored in the game), setting up three rows of 4 checkers.&lt;br /&gt;
&lt;br /&gt;
== Game variants ==&lt;br /&gt;
&lt;br /&gt;
There is a lot of Checkers variants. Four of them are available on Board Game Arena :&lt;br /&gt;
&lt;br /&gt;
:* International Checkers&lt;br /&gt;
:* Straight Checkers&lt;br /&gt;
:* Brazilian Checkers&lt;br /&gt;
:* Russian Checkers.&lt;br /&gt;
&lt;br /&gt;
Make sure to check the rules for the variant you are currently playing: the following section applies only to Straight Checkers.&lt;br /&gt;
&lt;br /&gt;
== Straight Checkers ==&lt;br /&gt;
&lt;br /&gt;
===Moving &amp;amp; Capturing===&lt;br /&gt;
&lt;br /&gt;
Take turns moving a checker one space diagonally forward towards the opponent&#039;s side of the board on a square that contains no checkers of either player. You may &#039;jump&#039; your opponents checkers by making a capturing move if your checker is located at most one space behind your opponent&#039;s checker (on your side). When capturing you jump over the checker moving two spaces in the same direction and then remove their piece from the game. Capturing multiple pieces using multiple jumps in the same turn is a key part of the game, when doing so you may change which direction they&#039;re moving diagonally, but they must still always move forward.&lt;br /&gt;
&lt;br /&gt;
:* If you have the opportunity to jump your opponent&#039;s checker, you must.&lt;br /&gt;
:* You may continue capturing subsequent checkers until there are no more possible captures.&lt;br /&gt;
:* If you have the opportunity to jump a choice of opponent&#039;s checkers, you may choose which but must capture one of them.&lt;br /&gt;
&lt;br /&gt;
===Kings===&lt;br /&gt;
&lt;br /&gt;
When one of your pieces reaches the end of the opponent&#039;s board that piece is upgraded to a king, these may move in either direction now.&lt;br /&gt;
&lt;br /&gt;
:* Kings may move forward or backward diagonally.&lt;br /&gt;
:* Kings can still only move one diagonal space at a time unless capturing.&lt;br /&gt;
:* Kings may move both forward and backward in the same turn when capturing.&lt;br /&gt;
&lt;br /&gt;
==Winning==&lt;br /&gt;
&lt;br /&gt;
Complete &#039;&#039;one&#039;&#039; of the following two objectives;&lt;br /&gt;
&lt;br /&gt;
:* Capture all of your opponent&#039;s pieces.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* Block all your opponent&#039;s pieces so they can&#039;t make any more moves.&lt;br /&gt;
&lt;br /&gt;
==Draws==&lt;br /&gt;
&lt;br /&gt;
A draw is declared if &#039;&#039;any&#039;&#039; of these conditions occur;&lt;br /&gt;
&lt;br /&gt;
:* The same situation repeats itself for the third time (not necessarily consecutive).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* 25 moves have been played without moving a man forward or making a capture.&lt;br /&gt;
&lt;br /&gt;
==Strategy==&lt;br /&gt;
&lt;br /&gt;
:* Be aggressive, you are more likely to win.  Playing to the board sides are safer though without reward.&lt;br /&gt;
:* Forward- always forward, it&#039;s alright to lose pieces as long as you take the opponent&#039;s, save your kings.&lt;br /&gt;
:* Safety in numbers, don&#039;t leave your pieces alone, move them one after another in small groups to protect them.&lt;br /&gt;
:* Protect the rear, protect forward or don&#039;t move your end row pieces as long as possible to prevent opponent&#039;s kings.&lt;br /&gt;
:* Sacrifice when needed. draw out your opponent so you can get 2-1 trades the following turn, don&#039;t expose your kings without reward.&lt;br /&gt;
:* Each king you get is a huge bonus, try to get as many as possible and don&#039;t waste them, sacrificing several pieces for a king can be alright.&lt;br /&gt;
:* Don&#039;t forget to block your opponent when possible, you make not only that piece vulnerable but fail to protect it with a counter and give your opponent the chance to take multiple of your pieces in one turn.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=About_Board_Game_Arena&amp;diff=1234</id>
		<title>About Board Game Arena</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=About_Board_Game_Arena&amp;diff=1234"/>
		<updated>2014-10-11T09:57:05Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;With &#039;&#039;&#039;Board Game Arena&#039;&#039;&#039; you can play board games online with the whole world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Board Game Arena is a next generation game platform which makes online gaming more simple and attractive:&lt;br /&gt;
&lt;br /&gt;
* Nothing to install: play straight from your browser, from anywhere, at anytime.&lt;br /&gt;
* Real time: your opponents are online, you play &amp;quot;live&amp;quot;.&lt;br /&gt;
* Simple: if you know the game, then you know how to play online.&lt;br /&gt;
* Free.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Board Game Arena offers a [http://en.boardgamearena.com/#!gamelist growing selection of board and card games]. We are specialized in modern adults games (&amp;quot;European style games&amp;quot;). This game platform has been designed to host any kind of game. This flexibility allow us to propose a &#039;&#039;&#039;new game every month&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1233</id>
		<title>Gamehelpcheckers</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1233"/>
		<updated>2014-10-07T21:42:09Z</updated>

		<summary type="html">&lt;p&gt;Een: /* ￼ Objective of the Game */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Objective of the Game ==&lt;br /&gt;
&lt;br /&gt;
Checkers, also known as &#039;draughts&#039;, is a timeless abstract strategy game for two players dating back almost a thousand years. In the game you move your pieces until you&#039;ve jumped over all pieces of your opponent and have removed them from the board. Players move one piece diagonally at a time in alternating play (starting with light).  All references to squares refer to the dark squares only. The board is an 8 by 8 square of squares in alternating light or dark colours.  Players should set up pieces on the 12 dark squares in the first three rows closest to them (the light spaces are completely ignored in the game), setting up three rows of 4 checkers.&lt;br /&gt;
&lt;br /&gt;
==Moving &amp;amp; Capturing==&lt;br /&gt;
&lt;br /&gt;
Take turns moving a checker one space diagonally forward towards the opponent&#039;s side of the board on a square that contains no checkers of either player. You may &#039;jump&#039; your opponents checkers by making a capturing move if your checker is located at most one space behind your opponent&#039;s checker (on your side). When capturing you jump over the checker moving two spaces in the same direction and then remove their piece from the game. Capturing multiple pieces using multiple jumps in the same turn is a key part of the game, when doing so you may change which direction they&#039;re moving diagonally, but they must still always move forward.&lt;br /&gt;
&lt;br /&gt;
:* If you have the opportunity to jump your opponent&#039;s checker, you must.&lt;br /&gt;
:* You may continue capturing subsequent checkers until there are no more possible captures.&lt;br /&gt;
:* If you have the opportunity to jump a choice of opponent&#039;s checkers, you may choose which but must capture one of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Kings==&lt;br /&gt;
&lt;br /&gt;
When one of your pieces reaches the end of the opponent&#039;s board that piece is upgraded to a king, these may move in either direction now.&lt;br /&gt;
&lt;br /&gt;
:* Kings may move forward or backward diagonally.&lt;br /&gt;
:* Kings can still only move one diagonal space at a time unless capturing.&lt;br /&gt;
:* Kings may move both forward and backward in the same turn when capturing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Winning==&lt;br /&gt;
&lt;br /&gt;
Complete &#039;&#039;one&#039;&#039; of the following three objectives;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:* Capture all of an opponent&#039;s pieces.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* Block all your opponent&#039;s pieces so they can&#039;t make any more moves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* Have all your pieces on the opponent&#039;s far end of the board (your opponent will need to have captured half or more of your pieces).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Draws==&lt;br /&gt;
&lt;br /&gt;
A draw is declared if &#039;&#039;any&#039;&#039; of these conditions occur;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:* A game is a draw if neither opponent has the possibility to win the game.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* The game is considered a draw when the same situation repeats itself for the third time (not necessarily consecutive).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:* A one king against one king endgame is often declared a draw.&lt;br /&gt;
&lt;br /&gt;
==Strategy==&lt;br /&gt;
&lt;br /&gt;
:* Be aggressive, you are more likely to win.  Playing to the board sides are safer though without reward.&lt;br /&gt;
:* Forward- always forward, it&#039;s alright to lose pieces as long as you take the opponent&#039;s, save your kings.&lt;br /&gt;
:* Safety in numbers, don&#039;t leave your pieces alone, move them one after another in small groups to protect them.&lt;br /&gt;
:* Protect the rear, protect forward or don&#039;t move your end row pieces as long as possible to prevent opponent&#039;s kings.&lt;br /&gt;
:* Sacrifice when needed. draw out your opponent so you can get 2-1 trades the following turn, don&#039;t expose your kings without reward.&lt;br /&gt;
:* Each king you get is a huge bonus, try to get as many as possible and don&#039;t waste them, sacrificing several pieces for a king can be alright.&lt;br /&gt;
:* Don&#039;t forget to block your opponent when possible, you make not only that piece vulnerable but fail to protect it with a counter and give your opponent the chance to take multiple of your pieces in one turn.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=TermsOfService&amp;diff=1209</id>
		<title>TermsOfService</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=TermsOfService&amp;diff=1209"/>
		<updated>2014-08-31T14:28:39Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Board Game Arena Terms of Service =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Welcome to BGA! ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for using our services (“Services”). The Services are provided by Board Game Arena (&amp;quot;BGA&amp;quot;), located at G. Isabelli, 19 bd de la République, 92260 Fontenay-aux-Roses, France.&lt;br /&gt;
&lt;br /&gt;
By using our Services, you are agreeing to these terms. Please read them carefully.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using our Services ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You must follow any policies made available to you within the Services.&lt;br /&gt;
&lt;br /&gt;
Don’t misuse our Services. For example, don’t interfere with our Services or try to access them using a method other than the interface and the instructions that we provide. You may use our Services only as permitted by law, including applicable export and re-export control laws and regulations. We may suspend or stop providing our Services to you if you do not comply with our terms or policies or if we are investigating suspected misconduct.&lt;br /&gt;
&lt;br /&gt;
Using our Services does not give you ownership of any intellectual property rights in our Services or the content you access. You may not use content from our Services unless you obtain permission from its owner or are otherwise permitted by law. These terms do not grant you the right to use any branding or logos used in our Services. Don’t remove, obscure, or alter any legal notices displayed in or along with our Services.&lt;br /&gt;
&lt;br /&gt;
Our Services display some content that is not from BGA. This content is the sole responsibility of the entity that makes it available. We may review content to determine whether it is illegal or violates our policies, and we may remove or refuse to display content that we reasonably believe violates our policies or the law. But that does not necessarily mean that we review content, so please don’t assume that we do.&lt;br /&gt;
&lt;br /&gt;
In connection with your use of the Services, we may send you service announcements, administrative messages, and other information. You may opt out of some of those communications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Your BGA Account ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may need a BGA Account in order to use some of our Services. You may create your own BGA Account, or your BGA Account may be assigned to you by an administrator, such as your employer or educational institution. If you are using a BGA Account assigned to you by an administrator, different or additional terms may apply and your administrator may be able to access or disable your account.&lt;br /&gt;
&lt;br /&gt;
To protect your BGA Account, keep your password confidential. You are responsible for the activity that happens on or through your BGA Account. Try not to reuse your BGA Account password on third-party applications. If you learn of any unauthorized use of your password or BGA Account, please change it immediately from your preferences.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Your responsibilities as a BGA player (&amp;quot;the Player&amp;quot;) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Player is solely responsible for any message, content and information posted by him on the site since, in its capacity as host of the service considered here, under the provisions of French Law No. 2004-575 of 21 June 2004 on confidence in the digital economy, BGA cannot be held responsible for the content posted or transmitted by Players on the Site and on which BGA exercises no control and monitoring.&lt;br /&gt;
&lt;br /&gt;
The Player expressly agrees, under penalty of criminal responsibility or civil liability, that the messages and content he will post on the Site are not likely to (without this list being exhaustive):&lt;br /&gt;
&lt;br /&gt;
* violate intellectual property rights of third parties: in this respect the Player undertakes not to reproduce or communicate publicly on the Site or the material protected under copyright, trademark filed as or more generally protected by other intellectual property rights held by third parties without the prior consent of the holders of such proprietary rights;&lt;br /&gt;
* Contain computer viruses likely to interrupt, destroy or impair the functionality of the Site; &lt;br /&gt;
* Being an apologist for crimes or contain illegal messages, threatening, or pedophile nature, pornographic, defamatory, obscene, hateful, racist, antisemitic, xenophobic, revisionist or contrary to public order or morality; &lt;br /&gt;
* Infringe privacy or dignity of others; &lt;br /&gt;
* Incite violence, fanaticism, crime, suicide, hatred due to religion, race, gender, sexual orientation, ethnicity;&lt;br /&gt;
* Harass other players with whom the Player would be contacted when discussing the different communication areas of the site;&lt;br /&gt;
* Promote or encourage any criminal activity or enterprise; &lt;br /&gt;
* Solicit and / or disclose passwords and / or personal information for commercial or unlawful purposes; &lt;br /&gt;
* Transmit any chain e-mails, unsolicited mass mailings, instant messages, commercials or unwanted unsolicited mail; &lt;br /&gt;
* Contain advertisements and / or solicitations to offer products and / or commercial services through the Site;&lt;br /&gt;
* Contain addresses or hypertext links to external sites whose content is contrary to the laws and regulations, which violate the rights of others or is contrary to these terms.&lt;br /&gt;
&lt;br /&gt;
The Player agrees to hold only one account on BGA, unless otherwise approved by BGA. We reserve the right to terminate any multiple accounts attributable to the same person.&lt;br /&gt;
&lt;br /&gt;
The Player agrees not to resort to the use of automated systems such as scripts to play or send messages.&lt;br /&gt;
&lt;br /&gt;
The Player is solely responsible for the keeping and confidentiality of their password and agrees not to communicate it to any other player or to use the account, the username and password of another Player.&lt;br /&gt;
&lt;br /&gt;
The Player guarantees the accuracy of information provided to BGA for purposes of registration and agrees to notify any subsequent changes.&lt;br /&gt;
&lt;br /&gt;
The Player acknowledges that BGA reserves, in case his use of the site would be contrary to these Terms or to generally applicable laws and regulatory provisions, the right to - immediately and without notice - deregister him from the Site services and / or to block his access to the Site.&lt;br /&gt;
&lt;br /&gt;
BGA reserves, assuming the Player would be responsible for an offense under the legislation or for affecting the rights of third parties, the right to provide, upon request of any legitimate authority (courts, administrative authorities, police), all information allowing or facilitating the identification of the offending Player.&lt;br /&gt;
&lt;br /&gt;
The Player is required to notify BGA, using the &amp;quot;Report this player&amp;quot; function, of any misuse of the Site of which he has knowledge, including any message whose contents violates the above prohibitions or more generally applicable laws and regulatory provisions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy and Copyright Protection ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BGA&#039;s [http://boardgamearena.com/#!doc/privacy privacy policies] explain how we treat your personal data and protect your privacy when you use our Services. By using our Services, you agree that BGA can use such data in accordance with our privacy policies.&lt;br /&gt;
&lt;br /&gt;
We respond to notices of alleged copyright infringement and terminate accounts of repeat infringers according to the process set out in France and the European Union.&lt;br /&gt;
&lt;br /&gt;
If you think somebody is violating your copyrights and want to notify us, you can contact us directly though our &amp;quot;Contact&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
BGA uses cookies. Cookies are stored on the computer of the subscriber, to record information relating to the navigation of the computer on the Site (such as pages viewed, date and time of visit, etc.) that BGA can read during subsequent visits. This allows for easier navigation and avoids having to provide at each new visit information that was already sent at an earlier date. It is stated that the shelf life of &amp;quot;cookies&amp;quot; created by BGA is less than 6 (six) months. BGA notifies the Player that the settings of his browser allows him to be alerted of the presence of &amp;quot;cookies&amp;quot; and to disable the use of &amp;quot;cookies&amp;quot; should he want to do so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Your Content in our Services ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of our Services allow you to upload, submit, store, send or receive content. You retain ownership of any intellectual property rights that you hold in that content. In short, what belongs to you stays yours.&lt;br /&gt;
&lt;br /&gt;
When you upload, submit, store, send or receive content to or through our Services, you give BGA (and those we work with) a worldwide license to use, host, store, reproduce, modify, create derivative works (such as those resulting from translations, adaptations or other changes we make so that your content works better with our Services), communicate, publish, publicly perform, publicly display and distribute such content. The rights you grant in this license are for the limited purpose of operating, promoting, and improving our Services, and to develop new ones. This license continues even if you stop using our Services. Some Services may offer you ways to access and remove content that has been provided to that Service. Also, in some of our Services, there are terms or settings that narrow the scope of our use of the content submitted in those Services. Make sure you have the necessary rights to grant us this license for any content that you submit to our Services.&lt;br /&gt;
&lt;br /&gt;
Our automated systems analyze your content to provide you personally relevant features. This analysis occurs as the content is sent, received, and when it is stored.&lt;br /&gt;
&lt;br /&gt;
You can find more information about how BGA uses and stores content in the privacy policy or additional terms for particular Services. If you submit feedback or suggestions about our Services, we may use your feedback or suggestions without obligation to you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Software in our Services ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a Service requires or includes downloadable software, this software may update automatically on your device once a new version or feature is available. Some Services may let you adjust your automatic update settings.&lt;br /&gt;
&lt;br /&gt;
BGA gives you a personal, worldwide, royalty-free, non-assignable and non-exclusive license to use the software provided to you by BGA as part of the Services. This license is for the sole purpose of enabling you to use and enjoy the benefit of the Services as provided by BGA, in the manner permitted by these terms. You may not copy, modify, distribute, sell, or lease any part of our Services or included software, nor may you reverse engineer or attempt to extract the source code of that software, unless laws prohibit those restrictions or you have our written permission.&lt;br /&gt;
&lt;br /&gt;
Open source software is important to us. Some software used in our Services may be offered under an open source license that we will make available to you. There may be provisions in the open source license that expressly override some of these terms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Modifying and Terminating our Services ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are constantly changing and improving our Services. We may add or remove functionalities or features, and we may suspend or stop a Service altogether.&lt;br /&gt;
&lt;br /&gt;
You can stop using our Services at any time, although we’ll be sorry to see you go. BGA may also stop providing Services to you, or add or create new limits to our Services at any time.&lt;br /&gt;
&lt;br /&gt;
We believe that you own your data and preserving your access to such data is important. If we discontinue a Service, where reasonably possible, we will give you reasonable advance notice and a chance to get information out of that Service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Our Warranties and Disclaimers ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We provide our Services using a commercially reasonable level of skill and care and we hope that you will enjoy using them. But there are certain things that we don’t promise about our Services.&lt;br /&gt;
&lt;br /&gt;
OTHER THAN AS EXPRESSLY SET OUT IN THESE TERMS OR ADDITIONAL TERMS, NEITHER BGA NOR ITS SUPPLIERS OR DISTRIBUTORS MAKE ANY SPECIFIC PROMISES ABOUT THE SERVICES. FOR EXAMPLE, WE DON’T MAKE ANY COMMITMENTS ABOUT THE CONTENT WITHIN THE SERVICES, THE SPECIFIC FUNCTIONS OF THE SERVICES, OR THEIR RELIABILITY, AVAILABILITY, OR ABILITY TO MEET YOUR NEEDS. WE PROVIDE THE SERVICES “AS IS”.&lt;br /&gt;
&lt;br /&gt;
SOME JURISDICTIONS PROVIDE FOR CERTAIN WARRANTIES, LIKE THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE EXTENT PERMITTED BY LAW, WE EXCLUDE ALL WARRANTIES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Liability for our Services ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WHEN PERMITTED BY LAW, BGA WILL NOT BE RESPONSIBLE FOR LOST PROFITS, REVENUES, OR DATA, FINANCIAL LOSSES OR INDIRECT, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES.&lt;br /&gt;
&lt;br /&gt;
TO THE EXTENT PERMITTED BY LAW, THE TOTAL LIABILITY OF BGA, AND ITS SUPPLIERS AND DISTRIBUTORS, FOR ANY CLAIMS UNDER THESE TERMS, INCLUDING FOR ANY IMPLIED WARRANTIES, IS LIMITED TO THE AMOUNT YOU PAID US TO USE THE SERVICES (OR, IF WE CHOOSE, TO SUPPLYING YOU THE SERVICES AGAIN).&lt;br /&gt;
&lt;br /&gt;
IN ALL CASES, BGA, AND ITS SUPPLIERS AND DISTRIBUTORS, WILL NOT BE LIABLE FOR ANY LOSS OR DAMAGE THAT IS NOT REASONABLY FORESEEABLE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Business uses of our Services ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using our Services on behalf of a business, that business accepts these terms. It will hold harmless and indemnify BGA and its affiliates, officers, agents, and employees from any claim, suit or action arising from or related to the use of the Services or violation of these terms, including any liability or expense arising from claims, losses, damages, suits, judgments, litigation costs and attorneys’ fees.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About these Terms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We may modify these terms or any additional terms that apply to a Service to, for example, reflect changes to the law or changes to our Services. You should look at the terms regularly. Changes will be effective immediately. If you do not agree to the modified terms for a Service, you should discontinue your use of that Service.&lt;br /&gt;
&lt;br /&gt;
If there is a conflict between these terms and the additional terms, the additional terms will control for that conflict.&lt;br /&gt;
&lt;br /&gt;
These terms control the relationship between BGA and you. They do not create any third party beneficiary rights.&lt;br /&gt;
&lt;br /&gt;
If you do not comply with these terms, and we don’t take action right away, this doesn’t mean that we are giving up any rights that we may have (such as taking action in the future).&lt;br /&gt;
&lt;br /&gt;
If it turns out that a particular term is not enforceable, this will not affect any other terms.&lt;br /&gt;
&lt;br /&gt;
The laws of France will apply to any disputes arising out of or relating to these terms or the Services. All claims arising out of or relating to these terms or the Services will be litigated exclusively in the French courts.&lt;br /&gt;
&lt;br /&gt;
For information about how to contact BGA, please visit our [http://boardgamearena.com/#!doc/contact contact page].&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelppuertorico&amp;diff=1085</id>
		<title>Gamehelppuertorico</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelppuertorico&amp;diff=1085"/>
		<updated>2014-03-02T10:27:41Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Two players variant */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
Be the player with the most victory points at the end of the game by collecting:&lt;br /&gt;
&lt;br /&gt;
* victory points earned for buildings&lt;br /&gt;
* victory point tokens earned at the captain phase&lt;br /&gt;
* conditional victory points earned at the end of the game for occupied large buildings&lt;br /&gt;
&lt;br /&gt;
In case of a tie, the player owning the most doubloons and goods is the winner.&lt;br /&gt;
&lt;br /&gt;
== Rules summary ==&lt;br /&gt;
&lt;br /&gt;
The game is played over several rounds.&lt;br /&gt;
At the start of a round, the governor selects a role, then each player in turn selects a role.&lt;br /&gt;
At the end of the round, the governor token moves to the next player.&lt;br /&gt;
&lt;br /&gt;
When a role has been chosen, each player in turn plays the action for this role. Only the player who selected the role can use the role privilege.&lt;br /&gt;
&lt;br /&gt;
Available roles are the following:&lt;br /&gt;
&lt;br /&gt;
* Mayor: colonists set foot in the new world ! Privilege : the mayor can get one more colonist from the supply. Action : in turn, begining with the mayor, players get one colonist from the ship, until it is empty. Then players have to set colonists on their buildings and plantations.&lt;br /&gt;
* Craftsman: goods are produced. Privilege : the craftsman can produce one more good of his choice. Action : produce goods for your occupied buildings and plantations.&lt;br /&gt;
* Trader: goods are sold to the trading house. Privilege : the trader earns 1 extra doubloon if he sells. Action : sell one good the trading house doesn&#039;t have yet.&lt;br /&gt;
* Settler : plantations settlement. Privilege : the settler can get a quarry instead of a plantation. Action : get a plantation chosen among those available.&lt;br /&gt;
* Builder : buildings are bought and built. Privilege : the builder can get a building for 1 doubloon less than the regular price. Action : get a building chosen among those available.&lt;br /&gt;
* Captain : victory points are won by shipping goods to the old world. Privilege : the captain earns one extra victory points if he ships some goods. Action : select a type of good to load on a cargo ship; 1 victory point is earned for each barrel of this type of good loaded on the ship.&lt;br /&gt;
* Prospector : gold rush brings money ! Privilege : the prospector gets one doubloon from the bank. Action : none.&lt;br /&gt;
&lt;br /&gt;
Please also note that occupied violet buildings have modifier effects for role actions.&lt;br /&gt;
&lt;br /&gt;
End of game happens at the end of the round for which one of the following events comes to pass :&lt;br /&gt;
&lt;br /&gt;
* there is not enough colonists in the supply to refill the colonist ship at the end of the mayor phase&lt;br /&gt;
* the last victory point token has been earned during the captain phase&lt;br /&gt;
* at least one of the players built on his 12th and last free space in the city.&lt;br /&gt;
&lt;br /&gt;
== Playing online ==&lt;br /&gt;
&lt;br /&gt;
Choosing a role : click on the role of your choice in the list on the right of your game board.&lt;br /&gt;
&lt;br /&gt;
* Mayor role : accept or refuse to get an extra colonist from the supply. Colonists are then automatically recruited by players. Click on a building or a plantation to setup a colonist on it. Click on a colonist to send it back to San Juan (the counter for colonists in San Juan is situated in your player panel on the right of the page).&lt;br /&gt;
&lt;br /&gt;
* Craftsman role : goods production is automated (counters for goods owned are in the player panel on the right of the page). Then, choose one extra good that you can produce as your privilege.&lt;br /&gt;
&lt;br /&gt;
* Trader role : choose a good that you want to sell by clicking on the appropriate counter in your player panel.&lt;br /&gt;
&lt;br /&gt;
* Settler role : click on the plantation (or quarry) that you want. Placement on your board is automated.&lt;br /&gt;
&lt;br /&gt;
* Builder role : click on the building that you want to buy. Placement on your board is automated.&lt;br /&gt;
&lt;br /&gt;
* Captain role : click on the cargo boat on which you want to ship some goods. Then choose the type of good that you want to ship by clicking on the appropriate counter in your player panel. At the end of the captain phase, if you have some goods to store (warehouse or windrose), click on the corresponding counter. Stored goods will be highlighted by a red frame.&lt;br /&gt;
&lt;br /&gt;
* Prospector role : doubloon is earned immediately.&lt;br /&gt;
&lt;br /&gt;
Tooltips are available to give information on roles and buildings by hovering over game elements with the mouse.&lt;br /&gt;
&lt;br /&gt;
== &#039;Balanced game&#039; variant ==&lt;br /&gt;
&lt;br /&gt;
This variant implements two game balance fixes giving each player an equal chance of winning as listed in the [http://en.wikipedia.org/wiki/Puerto_Rico_%28board_game%29 Puerto Rico (board game) Wikipedia page].&lt;br /&gt;
&lt;br /&gt;
* The prices of the Factory and University buildings are swapped so that the Factory costs 8 doubloons and the University costs 7 doubloons&lt;br /&gt;
* Any player that starts with a corn plantation starts with 1 doubloon less than the players that start with an indigo plantation.&lt;br /&gt;
&lt;br /&gt;
== Two players variant ==&lt;br /&gt;
&lt;br /&gt;
Craftsman Angst : if this variant is selected, players alternate selecting a role as usual, until the Governor has selected &#039;&#039;&#039;three&#039;&#039;&#039; roles and the opponent has selected &#039;&#039;&#039;two&#039;&#039;&#039; roles (instead of three in a classic two players game), then the governor token goes to the opponent and a new round starts.&lt;br /&gt;
This variant avoids the consecutive selection of two roles by the same player which happens on a change of round with the classic two player game rules.&lt;br /&gt;
&lt;br /&gt;
This variant is described on [http://www.boardgamegeek.com/thread/679955/the-craftsman-angst-variant-the-most-popular-revis Board Game Geek].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Have a good game !&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelppuertorico&amp;diff=1084</id>
		<title>Gamehelppuertorico</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelppuertorico&amp;diff=1084"/>
		<updated>2014-03-02T10:26:22Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
Be the player with the most victory points at the end of the game by collecting:&lt;br /&gt;
&lt;br /&gt;
* victory points earned for buildings&lt;br /&gt;
* victory point tokens earned at the captain phase&lt;br /&gt;
* conditional victory points earned at the end of the game for occupied large buildings&lt;br /&gt;
&lt;br /&gt;
In case of a tie, the player owning the most doubloons and goods is the winner.&lt;br /&gt;
&lt;br /&gt;
== Rules summary ==&lt;br /&gt;
&lt;br /&gt;
The game is played over several rounds.&lt;br /&gt;
At the start of a round, the governor selects a role, then each player in turn selects a role.&lt;br /&gt;
At the end of the round, the governor token moves to the next player.&lt;br /&gt;
&lt;br /&gt;
When a role has been chosen, each player in turn plays the action for this role. Only the player who selected the role can use the role privilege.&lt;br /&gt;
&lt;br /&gt;
Available roles are the following:&lt;br /&gt;
&lt;br /&gt;
* Mayor: colonists set foot in the new world ! Privilege : the mayor can get one more colonist from the supply. Action : in turn, begining with the mayor, players get one colonist from the ship, until it is empty. Then players have to set colonists on their buildings and plantations.&lt;br /&gt;
* Craftsman: goods are produced. Privilege : the craftsman can produce one more good of his choice. Action : produce goods for your occupied buildings and plantations.&lt;br /&gt;
* Trader: goods are sold to the trading house. Privilege : the trader earns 1 extra doubloon if he sells. Action : sell one good the trading house doesn&#039;t have yet.&lt;br /&gt;
* Settler : plantations settlement. Privilege : the settler can get a quarry instead of a plantation. Action : get a plantation chosen among those available.&lt;br /&gt;
* Builder : buildings are bought and built. Privilege : the builder can get a building for 1 doubloon less than the regular price. Action : get a building chosen among those available.&lt;br /&gt;
* Captain : victory points are won by shipping goods to the old world. Privilege : the captain earns one extra victory points if he ships some goods. Action : select a type of good to load on a cargo ship; 1 victory point is earned for each barrel of this type of good loaded on the ship.&lt;br /&gt;
* Prospector : gold rush brings money ! Privilege : the prospector gets one doubloon from the bank. Action : none.&lt;br /&gt;
&lt;br /&gt;
Please also note that occupied violet buildings have modifier effects for role actions.&lt;br /&gt;
&lt;br /&gt;
End of game happens at the end of the round for which one of the following events comes to pass :&lt;br /&gt;
&lt;br /&gt;
* there is not enough colonists in the supply to refill the colonist ship at the end of the mayor phase&lt;br /&gt;
* the last victory point token has been earned during the captain phase&lt;br /&gt;
* at least one of the players built on his 12th and last free space in the city.&lt;br /&gt;
&lt;br /&gt;
== Playing online ==&lt;br /&gt;
&lt;br /&gt;
Choosing a role : click on the role of your choice in the list on the right of your game board.&lt;br /&gt;
&lt;br /&gt;
* Mayor role : accept or refuse to get an extra colonist from the supply. Colonists are then automatically recruited by players. Click on a building or a plantation to setup a colonist on it. Click on a colonist to send it back to San Juan (the counter for colonists in San Juan is situated in your player panel on the right of the page).&lt;br /&gt;
&lt;br /&gt;
* Craftsman role : goods production is automated (counters for goods owned are in the player panel on the right of the page). Then, choose one extra good that you can produce as your privilege.&lt;br /&gt;
&lt;br /&gt;
* Trader role : choose a good that you want to sell by clicking on the appropriate counter in your player panel.&lt;br /&gt;
&lt;br /&gt;
* Settler role : click on the plantation (or quarry) that you want. Placement on your board is automated.&lt;br /&gt;
&lt;br /&gt;
* Builder role : click on the building that you want to buy. Placement on your board is automated.&lt;br /&gt;
&lt;br /&gt;
* Captain role : click on the cargo boat on which you want to ship some goods. Then choose the type of good that you want to ship by clicking on the appropriate counter in your player panel. At the end of the captain phase, if you have some goods to store (warehouse or windrose), click on the corresponding counter. Stored goods will be highlighted by a red frame.&lt;br /&gt;
&lt;br /&gt;
* Prospector role : doubloon is earned immediately.&lt;br /&gt;
&lt;br /&gt;
Tooltips are available to give information on roles and buildings by hovering over game elements with the mouse.&lt;br /&gt;
&lt;br /&gt;
== &#039;Balanced game&#039; variant ==&lt;br /&gt;
&lt;br /&gt;
This variant implements two game balance fixes giving each player an equal chance of winning as listed in the [http://en.wikipedia.org/wiki/Puerto_Rico_%28board_game%29 Puerto Rico (board game) Wikipedia page].&lt;br /&gt;
&lt;br /&gt;
* The prices of the Factory and University buildings are swapped so that the Factory costs 8 doubloons and the University costs 7 doubloons&lt;br /&gt;
* Any player that starts with a corn plantation starts with 1 doubloon less than the players that start with an indigo plantation.&lt;br /&gt;
&lt;br /&gt;
== Two players variant ==&lt;br /&gt;
&lt;br /&gt;
Craftsman Angst : if this variant is selected, players alternate selecting a role as usual, until the Governor has selected three roles and the opponent has selected two (instead of three in a classic two players game), then the governor token goes to the opponent and a new round starts.&lt;br /&gt;
So it avoids the consecutive selection of two roles by the same player that happens on a change of round with the classic two player game.&lt;br /&gt;
&lt;br /&gt;
This variant is described on [http://www.boardgamegeek.com/thread/679955/the-craftsman-angst-variant-the-most-popular-revis Board Game Geek].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Have a good game !&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Stock&amp;diff=1082</id>
		<title>Stock</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Stock&amp;diff=1082"/>
		<updated>2014-02-24T18:33:09Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;quot;Stock&amp;quot; is a javascript component that you can use on your game interface to display a set of elements of the same size that need to be arranged in one or several lines.&lt;br /&gt;
&lt;br /&gt;
Stock is very flexible and is the most used component in BGA games.&lt;br /&gt;
&lt;br /&gt;
Stock is used for example:&lt;br /&gt;
* To display set of cards, typically hands (ex: in Hearts, Seasons, The Boss, Race for the Galaxy, ...).&lt;br /&gt;
* To display items in player panels (ex: Takenoko, Amyitis, ...)&lt;br /&gt;
* ... in many other situations. For example, black dice and cubes on cards in Troyes are displayed with stock components.&lt;br /&gt;
&lt;br /&gt;
Using stock:&lt;br /&gt;
* Your items are arranged nicely and sorted by type.&lt;br /&gt;
* When adding (or removing) items to the set. All items slide smoothly to their new position in the set to host the new one.&lt;br /&gt;
* Select/unselect items is a built-in functionnality.&lt;br /&gt;
* You don&#039;t have to care about inserting/removing HTML piece of code: the entire life of the stock is managed by the component.&lt;br /&gt;
&lt;br /&gt;
== Using stock: a simple example ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look on how the stock is used in game &amp;quot;Hearts&amp;quot; to display a hand of standard cards.&lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/stock&amp;quot; as a dependency:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define([&lt;br /&gt;
    &amp;quot;dojo&amp;quot;,&amp;quot;dojo/_base/declare&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/core/gamegui&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/counter&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/stock&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The stock is initialized in Javascript &amp;quot;setup&amp;quot; method like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Player hand&lt;br /&gt;
    this.playerHand = new ebg.stock();&lt;br /&gt;
    this.playerHand.create( this, $(&#039;myhand&#039;), this.cardwidth, this.cardheight );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanations:&lt;br /&gt;
* We create a new stock object for the player hand.&lt;br /&gt;
* As parameters of the &amp;quot;create&amp;quot; method, we provide the width/height of an item (=a card), and the container div &amp;quot;myhand&amp;quot; - which is a simple void &amp;quot;div&amp;quot; element defines in our HTML template (.tpl).&lt;br /&gt;
&lt;br /&gt;
Then, we must tell the stock what are the items it is going to display during its life: the 52 cards of a standard card game. Of course, we did not create 52 different images, but create a &amp;quot;CSS sprite&amp;quot; image named &amp;quot;cards.jpg&amp;quot; with all the cards arranged in 4 rows and 13 columns.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how we tell stock what are the items type to display:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Explain there are 13 images per row in the CSS sprite image&lt;br /&gt;
    this.playerHand.image_items_per_row = 13;&lt;br /&gt;
&lt;br /&gt;
    // Create cards types:&lt;br /&gt;
    for( var color=1;color&amp;lt;=4;color++ )&lt;br /&gt;
    {&lt;br /&gt;
        for( var value=2;value&amp;lt;=14;value++ )&lt;br /&gt;
        {&lt;br /&gt;
            // Build card type id&lt;br /&gt;
            var card_type_id = this.getCardUniqueId( color, value );&lt;br /&gt;
            this.playerHand.addItemType( card_type_id, card_type_id, g_gamethemeurl+&#039;img/cards.jpg&#039;, card_type_id );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanations:&lt;br /&gt;
* At first, we tell the stock component that our CSS sprite contains 13 items per row. This way, it can find the correct image for each card type id.&lt;br /&gt;
* Then for the 4x13 cards, we call &amp;quot;addItemType&amp;quot; method that create the type. The arguments are the type id, the weight of the card (for sorting purpose), the URL of our CSS sprite, and the position of our card image in the CSS sprite.&lt;br /&gt;
&lt;br /&gt;
Note: in this specific example we need to generate a unique ID for each type of card based on its color and value. This is the only purpose of &amp;quot;getCardUniqueId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now, if we need to add - for example - the 5 of Heart to player&#039;s hand, we can do this.&lt;br /&gt;
this.playerHand.addToStock( this.getCardUniqueId( 2 /* 2=hearts */, 5 ) );&lt;br /&gt;
&lt;br /&gt;
In reality, cards have some IDs, which are useful to manipulate them. This is the reason we are using &amp;quot;addToStockWithId&amp;quot; instead:&lt;br /&gt;
this.playerHand.addToStock( this.getCardUniqueId( 2 /* 2=hearts */, 5 ), my_card_id );&lt;br /&gt;
&lt;br /&gt;
If afterwards we want to remove this card from the stock:&lt;br /&gt;
this.playerHand.removeFromStockById( my_card_id );&lt;br /&gt;
&lt;br /&gt;
== Complete stock component reference ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;create( page, container_div, item_width, item_height ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With create, you create a new stock component.&lt;br /&gt;
Parameters:&lt;br /&gt;
* page: the container page. Usually: &amp;quot;this&amp;quot;.&lt;br /&gt;
* container_div: the container &amp;quot;div&amp;quot; element (a void div element in your template, with an id).&lt;br /&gt;
* a stock item width and height, in pixels.&lt;br /&gt;
&lt;br /&gt;
(See &amp;quot;Hearts&amp;quot; example above).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;count():&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the total number of items in the stock right now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addItemType( type, weight, image, image_position ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Define a new type of item to the stock.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is mandatory to define a new item type before adding it to the stock. Example: if you want to have a stock control that can contains cubes of 3 different colors, you must add 3 item types (one for each color).&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* type: ID of the type to add. You can choose any positive integer. All item types must have distinct IDs.&lt;br /&gt;
* weight: weight of items of this type. Weight value is used to sort items of the stock during the display. Note that you can specify the same weight for all items (in this case they are not sorted and their order might change randomly at any time).&lt;br /&gt;
* image: URL of item image. Most of the time, you will use a CSS sprite for stock item, so you have to specify CSS sprite image here.&lt;br /&gt;
&lt;br /&gt;
Be careful: you must specify the image url as this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  g_gamethemeurl+&#039;img/yourimage.png&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* image_position: if &amp;quot;image&amp;quot; specify the URL of a CSS sprite, you must specify the position of the item image in this CSS sprite. For example, if you have a CSS sprite with 3 cubes with a size of 20x20 pixels each (so your CSS image has for example a size of 20x60 or 60x20), you specify &amp;quot;0&amp;quot; for the first cube image, 1 for the second, 2 for the third.&lt;br /&gt;
Important: there are more than one line of items in your CSS sprite,  you must specify how many items per line you have in your CSS sprite like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Specify that there is 10 image items per row in images used in &amp;quot;myStockObject&amp;quot; control.&lt;br /&gt;
    this.myStockObject.image_items_per_row = 10;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addToStock( type, from )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add an item to the stock, with the specified type.&lt;br /&gt;
&lt;br /&gt;
To make your life easy, in most of the case we suggest you to use &amp;quot;addToStockWithId&amp;quot; in order to give an ID to the item added. &amp;quot;addToStock&amp;quot; is perfect when you are using a stock controls with items that are generic game material that does not need to be addressed individually (ex: a bunch of money tokens).&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* type: ID of the item type to use (as specified in &amp;quot;addItemType&amp;quot;)&lt;br /&gt;
* from: OPTIONNAL: if you specify a HTML item here, the item will appear on this item and will be slided to its position on the stock item.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // Add a money token to the &amp;quot;player money&amp;quot; stock.&lt;br /&gt;
  // The money token will appear on &amp;quot;player_id&amp;quot; player panel and will move to its position.&lt;br /&gt;
  this.playerMoney.addToStock( MONEY_TOKEN, &#039;overall_player_board_&#039;+player_id );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Important: for a given stock control, you must use either addToStock or addToStockWithId, but NEVER BOTH OF THEM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addToStockWithId( type, id, from )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is exactly the same method than &amp;quot;addToStock&amp;quot;, except that you associate an ID to the newly created item.&lt;br /&gt;
&lt;br /&gt;
This is especially useful:&lt;br /&gt;
* When you need to know which item(s) has been selected by the user (see &amp;quot;getSelectedItems&amp;quot;).&lt;br /&gt;
* When you need to remove a specific item from the stock with &amp;quot;removeFromStockById&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Important: for a given stock control, you must use either addToStock or addToStockWithId, but NEVER BOTH OF THEM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;removeFromStock( type, to )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Remove an item of the specific type from the stock.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;to&amp;quot; is an optional parameter. If &amp;quot;to&amp;quot; contains the ID of an HTML element, the item removed from the stock is slided to this HTML element before it disappear.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;removeFromStockById( id, to )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Remove an item with a specific ID from the stock.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;to&amp;quot; is an optional parameter. If &amp;quot;to&amp;quot; contains the ID of an HTML element, the item removed from the stock is slided to this HTML element before it disappear.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;removeAll()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Remove all items from the stock.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPresentTypeList()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return an array with all the types of items present in the stock right now.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    this.myStockControl.removeAll();&lt;br /&gt;
    this.myStockControl.addToStock( 65 );&lt;br /&gt;
    this.myStockControl.addToStock( 34 );&lt;br /&gt;
    this.myStockControl.addToStock( 89 );&lt;br /&gt;
    this.myStockControl.addToStock( 65 );&lt;br /&gt;
    &lt;br /&gt;
    // The following returns: { 34:1,  65:1,  89:1  }&lt;br /&gt;
    var item_types = this.myStockControl.getPresentTypeList();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;resetItemsPosition()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you moved an item from the stock control manually (ex: after a drag&#039;n&#039;drop) and want to reset their position to their original ones, you can call this method.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;item_margin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default, there is a margin of 5px between the items of a stock. You can change the member variable &amp;quot;item_margin&amp;quot; to change this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     this.myStockControl.item_margin=5;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;changeItemsWeight( newWeights )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With this method you can change dynamically the weight of the item types in a stock control.&lt;br /&gt;
&lt;br /&gt;
Items are immediately re-sorted with the new weight.&lt;br /&gt;
&lt;br /&gt;
Example: with a stock control that contains classic cards, you can order them by value or by color. Using changeItemsWeight you can switch from one sort method to another when a player request this.&lt;br /&gt;
&lt;br /&gt;
newWeights is an associative array: item type id =&amp;gt; new weight.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Item type 1 gets a new weight of 10, 2 a new weight of 20, 3 a new weight of 30.&lt;br /&gt;
    this.myStockControl.changeItemsWeight( { 1: 10, 2: 20, 3: 30 } );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setSelectionMode( mode )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each stock control, you can specify a selection mode:&lt;br /&gt;
* 0: no item can be selected by the player.&lt;br /&gt;
* 1: a maximum of one item can be selected by the player at the same time.&lt;br /&gt;
* 2: several items can be selected by the player at the same time.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setSelectionAppeareance( type )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each stock control, you can specify a selection highlighting type:&lt;br /&gt;
* &#039;border&#039;: there will be a red border around selected items (this is the default). The attribute &#039;apparenceBorderWidth&#039; can be used to manage the width of the border (in pixels).&lt;br /&gt;
* &#039;disappear&#039;: the selected item will fade out and disappear. This is useful when the selection has the effect of destroying the item.&lt;br /&gt;
* &#039;class&#039;: there will be an extra &#039;stockitem_selecte&#039; css class added to the element when it is selected (and removed when unselected). You can override this class in the css file for your game.&lt;br /&gt;
&lt;br /&gt;
By default this class definition is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.stockitem_selected {&lt;br /&gt;
	border: 2px solid red ! important;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to override it for example to change the border color add this in your &amp;lt;game&amp;gt;.css file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.stockitem_selected {&lt;br /&gt;
	border: 2px solid orange ! important;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: the &#039;class&#039; highlighting type has not yet been deployed on the studio - 24/02/2014. This warning will be removed after the next upgrade.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;isSelected( id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return true/false wether the specified item id has been selected or not.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;selectItem( id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Select the specified item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;unselectItem( id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Unselect the specified item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;unselectAll()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Unselect all items of the stock.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;onChangeSelection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This callback method is called when the player select/unselect an item of the stock.&lt;br /&gt;
&lt;br /&gt;
You can connect this to one of your method like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    dojo.connect( this.myStockControl, &#039;onChangeSelection&#039;, this, &#039;onMyMethodToCall&#039; );&lt;br /&gt;
    &lt;br /&gt;
    (...)&lt;br /&gt;
    &lt;br /&gt;
    onMyMethodToCall: function( control_name )&lt;br /&gt;
    {&lt;br /&gt;
        // This method is called when myStockControl selected items changed&lt;br /&gt;
        var items = this.myStockControl.getSelectedItems();&lt;br /&gt;
        &lt;br /&gt;
        // (do something)&lt;br /&gt;
    },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The &amp;quot;control_name&amp;quot; argument is the ID (the &amp;quot;DOM&amp;quot; id) of the &amp;quot;div&amp;quot; container of your stock control. Using &amp;quot;control_name&amp;quot;, you can use the same callback method for different Stock control and see which one trigger the method.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getSelectedItems()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the list of selected items, as an array with the following format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
   { type:1,  id:  1001 },&lt;br /&gt;
   { type:1,  id:  1002 },&lt;br /&gt;
   { type:3,  id:  1003 }&lt;br /&gt;
   ...&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getUnselectedItems()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as the previous one, but return unselected item instead of seleted ones.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAllItems()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get all items (same format than getSelectedItems and getUnselectedItems).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setOverlap( horizontal_percent, vertical_percent )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make items on the stock control &amp;quot;overlap&amp;quot; on each other, to save space.&lt;br /&gt;
&lt;br /&gt;
By default, horizontal_overlap and vertical_overlap are 0.&lt;br /&gt;
&lt;br /&gt;
When horizontal_overlap=20, it means that a stock item must overlap on 20% of the width of the previous item. horizontal_overlap can&#039;t be over 100.&lt;br /&gt;
&lt;br /&gt;
vertical_overlap works differently: one items on two are shifted up.&lt;br /&gt;
&lt;br /&gt;
See &amp;quot;Jaipur&amp;quot; game to see an example to use of this function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;onItemCreate&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using onItemCreate, you can trigger a method each time a new item is added to the Stock, in order you can customize it.&lt;br /&gt;
&lt;br /&gt;
Complete example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // During &amp;quot;setup&amp;quot; phase, we associate our method &amp;quot;setupNewCard&amp;quot; with the creation of a new stock item:&lt;br /&gt;
    this.myStockItem.onItemCreate = dojo.hitch( this, &#039;setupNewCard&#039; ); &lt;br /&gt;
&lt;br /&gt;
     (...)&lt;br /&gt;
&lt;br /&gt;
    // And here is our &amp;quot;setupNewCard&amp;quot;:&lt;br /&gt;
    setupNewCard: function( card_div, card_type_id, card_id )&lt;br /&gt;
    {&lt;br /&gt;
       // Add a special tooltip on the card:&lt;br /&gt;
       this.addTooltip( card_div.id, _(&amp;quot;Some nice tooltip for this item&amp;quot;), &#039;&#039; );&lt;br /&gt;
&lt;br /&gt;
       // Note that &amp;quot;card_type_id&amp;quot; contains the type of the item, so you can do special actions depending on the item type&lt;br /&gt;
&lt;br /&gt;
       // Add some custom HTML content INSIDE the Stock item:&lt;br /&gt;
       dojo.place( this.format_block( &#039;jstpl_my_card_content&#039;, {&lt;br /&gt;
                                ....&lt;br /&gt;
                           } ), card_div.id );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips when adding/removing items to/from Stock components ==&lt;br /&gt;
&lt;br /&gt;
The usual way is the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Situation A&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When you add a card to a stock item, and this card is &#039;&#039;&#039;not&#039;&#039;&#039; coming from another stock: use &amp;quot;addToStockWithId&amp;quot; with a &amp;quot;from&amp;quot; argument set to the element of your interface where card should come from.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Situation B&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When you add a card to a stock item, and this card is coming from another stock:&lt;br /&gt;
* on the destination Stock, use &amp;quot;addToStockWithId&amp;quot; with a &amp;quot;from&amp;quot; equals to the HTML id of the corresponding item in the source Stock. For example, If the source stock id is &amp;quot;myHand&amp;quot;, then the HTML id of card 48 is &amp;quot;myHand_item_48&amp;quot;.&lt;br /&gt;
* then, remove the source item with &amp;quot;removeFromStockById&amp;quot;.&lt;br /&gt;
(note that it&#039;s important to do things in this order, because source item must still exists when you use it as the origin of the slide).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Situation C&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When you move a card from a stock item to something that is not a stock item:&lt;br /&gt;
* insert the card as a classic HTML template (dojo.place / this.format_block).&lt;br /&gt;
* place it on the Stock item with &amp;quot;this.placeOnObject&amp;quot;, using Stock item HTML id (see above).&lt;br /&gt;
* slide it to its new position with &amp;quot;this.slideToObject&amp;quot;&lt;br /&gt;
* remove the card from the Stock item with &amp;quot;removeFromStockById&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the methods above, your cards should slide to, from and between your Stock controls smoothly&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Stock&amp;diff=1081</id>
		<title>Stock</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Stock&amp;diff=1081"/>
		<updated>2014-02-24T18:22:08Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;quot;Stock&amp;quot; is a javascript component that you can use on your game interface to display a set of elements of the same size that need to be arranged in one or several lines.&lt;br /&gt;
&lt;br /&gt;
Stock is very flexible and is the most used component in BGA games.&lt;br /&gt;
&lt;br /&gt;
Stock is used for example:&lt;br /&gt;
* To display set of cards, typically hands (ex: in Hearts, Seasons, The Boss, Race for the Galaxy, ...).&lt;br /&gt;
* To display items in player panels (ex: Takenoko, Amyitis, ...)&lt;br /&gt;
* ... in many other situations. For example, black dice and cubes on cards in Troyes are displayed with stock components.&lt;br /&gt;
&lt;br /&gt;
Using stock:&lt;br /&gt;
* Your items are arranged nicely and sorted by type.&lt;br /&gt;
* When adding (or removing) items to the set. All items slide smoothly to their new position in the set to host the new one.&lt;br /&gt;
* Select/unselect items is a built-in functionnality.&lt;br /&gt;
* You don&#039;t have to care about inserting/removing HTML piece of code: the entire life of the stock is managed by the component.&lt;br /&gt;
&lt;br /&gt;
== Using stock: a simple example ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look on how the stock is used in game &amp;quot;Hearts&amp;quot; to display a hand of standard cards.&lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/stock&amp;quot; as a dependency:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define([&lt;br /&gt;
    &amp;quot;dojo&amp;quot;,&amp;quot;dojo/_base/declare&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/core/gamegui&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/counter&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/stock&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The stock is initialized in Javascript &amp;quot;setup&amp;quot; method like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Player hand&lt;br /&gt;
    this.playerHand = new ebg.stock();&lt;br /&gt;
    this.playerHand.create( this, $(&#039;myhand&#039;), this.cardwidth, this.cardheight );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanations:&lt;br /&gt;
* We create a new stock object for the player hand.&lt;br /&gt;
* As parameters of the &amp;quot;create&amp;quot; method, we provide the width/height of an item (=a card), and the container div &amp;quot;myhand&amp;quot; - which is a simple void &amp;quot;div&amp;quot; element defines in our HTML template (.tpl).&lt;br /&gt;
&lt;br /&gt;
Then, we must tell the stock what are the items it is going to display during its life: the 52 cards of a standard card game. Of course, we did not create 52 different images, but create a &amp;quot;CSS sprite&amp;quot; image named &amp;quot;cards.jpg&amp;quot; with all the cards arranged in 4 rows and 13 columns.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how we tell stock what are the items type to display:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Explain there are 13 images per row in the CSS sprite image&lt;br /&gt;
    this.playerHand.image_items_per_row = 13;&lt;br /&gt;
&lt;br /&gt;
    // Create cards types:&lt;br /&gt;
    for( var color=1;color&amp;lt;=4;color++ )&lt;br /&gt;
    {&lt;br /&gt;
        for( var value=2;value&amp;lt;=14;value++ )&lt;br /&gt;
        {&lt;br /&gt;
            // Build card type id&lt;br /&gt;
            var card_type_id = this.getCardUniqueId( color, value );&lt;br /&gt;
            this.playerHand.addItemType( card_type_id, card_type_id, g_gamethemeurl+&#039;img/cards.jpg&#039;, card_type_id );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanations:&lt;br /&gt;
* At first, we tell the stock component that our CSS sprite contains 13 items per row. This way, it can find the correct image for each card type id.&lt;br /&gt;
* Then for the 4x13 cards, we call &amp;quot;addItemType&amp;quot; method that create the type. The arguments are the type id, the weight of the card (for sorting purpose), the URL of our CSS sprite, and the position of our card image in the CSS sprite.&lt;br /&gt;
&lt;br /&gt;
Note: in this specific example we need to generate a unique ID for each type of card based on its color and value. This is the only purpose of &amp;quot;getCardUniqueId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now, if we need to add - for example - the 5 of Heart to player&#039;s hand, we can do this.&lt;br /&gt;
this.playerHand.addToStock( this.getCardUniqueId( 2 /* 2=hearts */, 5 ) );&lt;br /&gt;
&lt;br /&gt;
In reality, cards have some IDs, which are useful to manipulate them. This is the reason we are using &amp;quot;addToStockWithId&amp;quot; instead:&lt;br /&gt;
this.playerHand.addToStock( this.getCardUniqueId( 2 /* 2=hearts */, 5 ), my_card_id );&lt;br /&gt;
&lt;br /&gt;
If afterwards we want to remove this card from the stock:&lt;br /&gt;
this.playerHand.removeFromStockById( my_card_id );&lt;br /&gt;
&lt;br /&gt;
== Complete stock component reference ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;create( page, container_div, item_width, item_height ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With create, you create a new stock component.&lt;br /&gt;
Parameters:&lt;br /&gt;
* page: the container page. Usually: &amp;quot;this&amp;quot;.&lt;br /&gt;
* container_div: the container &amp;quot;&amp;lt;div&amp;gt;&amp;quot; element (a void &amp;lt;div&amp;gt; element in your template, with an id).&lt;br /&gt;
* a stock item width and height, in pixels.&lt;br /&gt;
&lt;br /&gt;
(See &amp;quot;Hearts&amp;quot; example above).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;count():&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the total number of items in the stock right now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addItemType( type, weight, image, image_position ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Define a new type of item to the stock.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is mandatory to define a new item type before adding it to the stock. Example: if you want to have a stock control that can contains cubes of 3 different colors, you must add 3 item types (one for each color).&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* type: ID of the type to add. You can choose any positive integer. All item types must have distinct IDs.&lt;br /&gt;
* weight: weight of items of this type. Weight value is used to sort items of the stock during the display. Note that you can specify the same weight for all items (in this case they are not sorted and their order might change randomly at any time).&lt;br /&gt;
* image: URL of item image. Most of the time, you will use a CSS sprite for stock item, so you have to specify CSS sprite image here.&lt;br /&gt;
&lt;br /&gt;
Be careful: you must specify the image url as this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  g_gamethemeurl+&#039;img/yourimage.png&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* image_position: if &amp;quot;image&amp;quot; specify the URL of a CSS sprite, you must specify the position of the item image in this CSS sprite. For example, if you have a CSS sprite with 3 cubes with a size of 20x20 pixels each (so your CSS image has for example a size of 20x60 or 60x20), you specify &amp;quot;0&amp;quot; for the first cube image, 1 for the second, 2 for the third.&lt;br /&gt;
Important: there are more than one line of items in your CSS sprite,  you must specify how many items per line you have in your CSS sprite like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Specify that there is 10 image items per row in images used in &amp;quot;myStockObject&amp;quot; control.&lt;br /&gt;
    this.myStockObject.image_items_per_row = 10;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addToStock( type, from )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add an item to the stock, with the specified type.&lt;br /&gt;
&lt;br /&gt;
To make your life easy, in most of the case we suggest you to use &amp;quot;addToStockWithId&amp;quot; in order to give an ID to the item added. &amp;quot;addToStock&amp;quot; is perfect when you are using a stock controls with items that are generic game material that does not need to be addressed individually (ex: a bunch of money tokens).&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* type: ID of the item type to use (as specified in &amp;quot;addItemType&amp;quot;)&lt;br /&gt;
* from: OPTIONNAL: if you specify a HTML item here, the item will appear on this item and will be slided to its position on the stock item.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // Add a money token to the &amp;quot;player money&amp;quot; stock.&lt;br /&gt;
  // The money token will appear on &amp;quot;player_id&amp;quot; player panel and will move to its position.&lt;br /&gt;
  this.playerMoney.addToStock( MONEY_TOKEN, &#039;overall_player_board_&#039;+player_id );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Important: for a given stock control, you must use either addToStock or addToStockWithId, but NEVER BOTH OF THEM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addToStockWithId( type, id, from )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is exactly the same method than &amp;quot;addToStock&amp;quot;, except that you associate an ID to the newly created item.&lt;br /&gt;
&lt;br /&gt;
This is especially useful:&lt;br /&gt;
* When you need to know which item(s) has been selected by the user (see &amp;quot;getSelectedItems&amp;quot;).&lt;br /&gt;
* When you need to remove a specific item from the stock with &amp;quot;removeFromStockById&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Important: for a given stock control, you must use either addToStock or addToStockWithId, but NEVER BOTH OF THEM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;removeFromStock( type, to )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Remove an item of the specific type from the stock.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;to&amp;quot; is an optional parameter. If &amp;quot;to&amp;quot; contains the ID of an HTML element, the item removed from the stock is slided to this HTML element before it disappear.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;removeFromStockById( id, to )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Remove an item with a specific ID from the stock.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;to&amp;quot; is an optional parameter. If &amp;quot;to&amp;quot; contains the ID of an HTML element, the item removed from the stock is slided to this HTML element before it disappear.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;removeAll()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Remove all items from the stock.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPresentTypeList()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return an array with all the types of items present in the stock right now.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    this.myStockControl.removeAll();&lt;br /&gt;
    this.myStockControl.addToStock( 65 );&lt;br /&gt;
    this.myStockControl.addToStock( 34 );&lt;br /&gt;
    this.myStockControl.addToStock( 89 );&lt;br /&gt;
    this.myStockControl.addToStock( 65 );&lt;br /&gt;
    &lt;br /&gt;
    // The following returns: { 34:1,  65:1,  89:1  }&lt;br /&gt;
    var item_types = this.myStockControl.getPresentTypeList();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;resetItemsPosition()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you moved an item from the stock control manually (ex: after a drag&#039;n&#039;drop) and want to reset their position to their original ones, you can call this method.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;item_margin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default, there is a margin of 5px between the items of a stock. You can change the member variable &amp;quot;item_margin&amp;quot; to change this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     this.myStockControl.item_margin=5;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;changeItemsWeight( newWeights )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With this method you can change dynamically the weight of the item types in a stock control.&lt;br /&gt;
&lt;br /&gt;
Items are immediately re-sorted with the new weight.&lt;br /&gt;
&lt;br /&gt;
Example: with a stock control that contains classic cards, you can order them by value or by color. Using changeItemsWeight you can switch from one sort method to another when a player request this.&lt;br /&gt;
&lt;br /&gt;
newWeights is an associative array: item type id =&amp;gt; new weight.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Item type 1 gets a new weight of 10, 2 a new weight of 20, 3 a new weight of 30.&lt;br /&gt;
    this.myStockControl.changeItemsWeight( { 1: 10, 2: 20, 3: 30 } );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setSelectionMode( mode )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each stock control, you can specify a selection mode:&lt;br /&gt;
* 0: no item can be selected by the player.&lt;br /&gt;
* 1: a maximum of one item can be selected by the player at the same time.&lt;br /&gt;
* 2: several items can be selected by the player at the same time.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setSelectionAppeareance( type )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each stock control, you can specify a selection highlighting type:&lt;br /&gt;
* &#039;border&#039;: there will be a red border around selected items (this is the default). The attribute &#039;apparenceBorderWidth&#039; can be used to manage the width of the border (in pixels).&lt;br /&gt;
* &#039;disappear&#039;: the selected item will fade out and disappear. This is useful when the selection has the effect of destroying the item.&lt;br /&gt;
* &#039;class&#039;: there will be an extra &#039;stockitem_selecte&#039; css class added to the element when it is selected (and removed when unselected). You can override this class in the css file for your game.&lt;br /&gt;
&lt;br /&gt;
By default this class definition is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.stockitem_selected {&lt;br /&gt;
	border: 2px solid red ! important;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to override it for example to change the border color add this in your &amp;lt;game&amp;gt;.css file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.stockitem_selected {&lt;br /&gt;
	border: 2px solid orange ! important;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: the &#039;class&#039; highlighting type has not yet been deployed on the studio - 24/02/2014. This warning will be removed after the next upgrade.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;isSelected( id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return true/false wether the specified item id has been selected or not.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;selectItem( id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Select the specified item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;unselectItem( id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Unselect the specified item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;unselectAll()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Unselect all items of the stock.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;onChangeSelection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This callback method is called when the player select/unselect an item of the stock.&lt;br /&gt;
&lt;br /&gt;
You can connect this to one of your method like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    dojo.connect( this.myStockControl, &#039;onChangeSelection&#039;, this, &#039;onMyMethodToCall&#039; );&lt;br /&gt;
    &lt;br /&gt;
    (...)&lt;br /&gt;
    &lt;br /&gt;
    onMyMethodToCall: function( control_name )&lt;br /&gt;
    {&lt;br /&gt;
        // This method is called when myStockControl selected items changed&lt;br /&gt;
        var items = this.myStockControl.getSelectedItems();&lt;br /&gt;
        &lt;br /&gt;
        // (do something)&lt;br /&gt;
    },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The &amp;quot;control_name&amp;quot; argument is the ID (the &amp;quot;DOM&amp;quot; id) of the &amp;lt;div&amp;gt; container of your stock control. Using &amp;quot;control_name&amp;quot;, you can use the same callback method for different Stock control and see which one trigger the method.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getSelectedItems()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the list of selected items, as an array with the following format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
   { type:1,  id:  1001 },&lt;br /&gt;
   { type:1,  id:  1002 },&lt;br /&gt;
   { type:3,  id:  1003 }&lt;br /&gt;
   ...&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getUnselectedItems()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as the previous one, but return unselected item instead of seleted ones.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAllItems()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get all items (same format than getSelectedItems and getUnselectedItems).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setOverlap( horizontal_percent, vertical_percent )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make items on the stock control &amp;quot;overlap&amp;quot; on each other, to save space.&lt;br /&gt;
&lt;br /&gt;
By default, horizontal_overlap and vertical_overlap are 0.&lt;br /&gt;
&lt;br /&gt;
When horizontal_overlap=20, it means that a stock item must overlap on 20% of the width of the previous item. horizontal_overlap can&#039;t be over 100.&lt;br /&gt;
&lt;br /&gt;
vertical_overlap works differently: one items on two are shifted up.&lt;br /&gt;
&lt;br /&gt;
See &amp;quot;Jaipur&amp;quot; game to see an example to use of this function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;onItemCreate&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using onItemCreate, you can trigger a method each time a new item is added to the Stock, in order you can customize it.&lt;br /&gt;
&lt;br /&gt;
Complete example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // During &amp;quot;setup&amp;quot; phase, we associate our method &amp;quot;setupNewCard&amp;quot; with the creation of a new stock item:&lt;br /&gt;
    this.myStockItem.onItemCreate = dojo.hitch( this, &#039;setupNewCard&#039; ); &lt;br /&gt;
&lt;br /&gt;
     (...)&lt;br /&gt;
&lt;br /&gt;
    // And here is our &amp;quot;setupNewCard&amp;quot;:&lt;br /&gt;
    setupNewCard: function( card_div, card_type_id, card_id )&lt;br /&gt;
    {&lt;br /&gt;
       // Add a special tooltip on the card:&lt;br /&gt;
       this.addTooltip( card_div.id, _(&amp;quot;Some nice tooltip for this item&amp;quot;), &#039;&#039; );&lt;br /&gt;
&lt;br /&gt;
       // Note that &amp;quot;card_type_id&amp;quot; contains the type of the item, so you can do special actions depending on the item type&lt;br /&gt;
&lt;br /&gt;
       // Add some custom HTML content INSIDE the Stock item:&lt;br /&gt;
       dojo.place( this.format_block( &#039;jstpl_my_card_content&#039;, {&lt;br /&gt;
                                ....&lt;br /&gt;
                           } ), card_div.id );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips when adding/removing items to/from Stock components ==&lt;br /&gt;
&lt;br /&gt;
The usual way is the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Situation A&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When you add a card to a stock item, and this card is &#039;&#039;&#039;not&#039;&#039;&#039; coming from another stock: use &amp;quot;addToStockWithId&amp;quot; with a &amp;quot;from&amp;quot; argument set to the element of your interface where card should come from.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Situation B&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When you add a card to a stock item, and this card is coming from another stock:&lt;br /&gt;
* on the destination Stock, use &amp;quot;addToStockWithId&amp;quot; with a &amp;quot;from&amp;quot; equals to the HTML id of the corresponding item in the source Stock. For example, If the source stock id is &amp;quot;myHand&amp;quot;, then the HTML id of card 48 is &amp;quot;myHand_item_48&amp;quot;.&lt;br /&gt;
* then, remove the source item with &amp;quot;removeFromStockById&amp;quot;.&lt;br /&gt;
(note that it&#039;s important to do things in this order, because source item must still exists when you use it as the origin of the slide).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Situation C&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When you move a card from a stock item to something that is not a stock item:&lt;br /&gt;
* insert the card as a classic HTML template (dojo.place / this.format_block).&lt;br /&gt;
* place it on the Stock item with &amp;quot;this.placeOnObject&amp;quot;, using Stock item HTML id (see above).&lt;br /&gt;
* slide it to its new position with &amp;quot;this.slideToObject&amp;quot;&lt;br /&gt;
* remove the card from the Stock item with &amp;quot;removeFromStockById&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the methods above, your cards should slide to, from and between your Stock controls smoothly&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Stock&amp;diff=1080</id>
		<title>Stock</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Stock&amp;diff=1080"/>
		<updated>2014-02-24T18:05:47Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;quot;Stock&amp;quot; is a javascript component that you can use on your game interface to display a set of elements of the same size that need to be arranged in one or several lines.&lt;br /&gt;
&lt;br /&gt;
Stock is very flexible and is the most used component in BGA games.&lt;br /&gt;
&lt;br /&gt;
Stock is used for example:&lt;br /&gt;
* To display set of cards, typically hands (ex: in Hearts, Seasons, The Boss, Race for the Galaxy, ...).&lt;br /&gt;
* To display items in player panels (ex: Takenoko, Amyitis, ...)&lt;br /&gt;
* ... in many other situations. For example, black dice and cubes on cards in Troyes are displayed with stock components.&lt;br /&gt;
&lt;br /&gt;
Using stock:&lt;br /&gt;
* Your items are arranged nicely and sorted by type.&lt;br /&gt;
* When adding (or removing) items to the set. All items slide smoothly to their new position in the set to host the new one.&lt;br /&gt;
* Select/unselect items is a built-in functionnality.&lt;br /&gt;
* You don&#039;t have to care about inserting/removing HTML piece of code: the entire life of the stock is managed by the component.&lt;br /&gt;
&lt;br /&gt;
== Using stock: a simple example ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look on how the stock is used in game &amp;quot;Hearts&amp;quot; to display a hand of standard cards.&lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/stock&amp;quot; as a dependency:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define([&lt;br /&gt;
    &amp;quot;dojo&amp;quot;,&amp;quot;dojo/_base/declare&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/core/gamegui&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/counter&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/stock&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The stock is initialized in Javascript &amp;quot;setup&amp;quot; method like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Player hand&lt;br /&gt;
    this.playerHand = new ebg.stock();&lt;br /&gt;
    this.playerHand.create( this, $(&#039;myhand&#039;), this.cardwidth, this.cardheight );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanations:&lt;br /&gt;
* We create a new stock object for the player hand.&lt;br /&gt;
* As parameters of the &amp;quot;create&amp;quot; method, we provide the width/height of an item (=a card), and the container div &amp;quot;myhand&amp;quot; - which is a simple void &amp;quot;div&amp;quot; element defines in our HTML template (.tpl).&lt;br /&gt;
&lt;br /&gt;
Then, we must tell the stock what are the items it is going to display during its life: the 52 cards of a standard card game. Of course, we did not create 52 different images, but create a &amp;quot;CSS sprite&amp;quot; image named &amp;quot;cards.jpg&amp;quot; with all the cards arranged in 4 rows and 13 columns.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how we tell stock what are the items type to display:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Explain there are 13 images per row in the CSS sprite image&lt;br /&gt;
    this.playerHand.image_items_per_row = 13;&lt;br /&gt;
&lt;br /&gt;
    // Create cards types:&lt;br /&gt;
    for( var color=1;color&amp;lt;=4;color++ )&lt;br /&gt;
    {&lt;br /&gt;
        for( var value=2;value&amp;lt;=14;value++ )&lt;br /&gt;
        {&lt;br /&gt;
            // Build card type id&lt;br /&gt;
            var card_type_id = this.getCardUniqueId( color, value );&lt;br /&gt;
            this.playerHand.addItemType( card_type_id, card_type_id, g_gamethemeurl+&#039;img/cards.jpg&#039;, card_type_id );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanations:&lt;br /&gt;
* At first, we tell the stock component that our CSS sprite contains 13 items per row. This way, it can find the correct image for each card type id.&lt;br /&gt;
* Then for the 4x13 cards, we call &amp;quot;addItemType&amp;quot; method that create the type. The arguments are the type id, the weight of the card (for sorting purpose), the URL of our CSS sprite, and the position of our card image in the CSS sprite.&lt;br /&gt;
&lt;br /&gt;
Note: in this specific example we need to generate a unique ID for each type of card based on its color and value. This is the only purpose of &amp;quot;getCardUniqueId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now, if we need to add - for example - the 5 of Heart to player&#039;s hand, we can do this.&lt;br /&gt;
this.playerHand.addToStock( this.getCardUniqueId( 2 /* 2=hearts */, 5 ) );&lt;br /&gt;
&lt;br /&gt;
In reality, cards have some IDs, which are useful to manipulate them. This is the reason we are using &amp;quot;addToStockWithId&amp;quot; instead:&lt;br /&gt;
this.playerHand.addToStock( this.getCardUniqueId( 2 /* 2=hearts */, 5 ), my_card_id );&lt;br /&gt;
&lt;br /&gt;
If afterwards we want to remove this card from the stock:&lt;br /&gt;
this.playerHand.removeFromStockById( my_card_id );&lt;br /&gt;
&lt;br /&gt;
== Complete stock component reference ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;create( page, container_div, item_width, item_height ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With create, you create a new stock component.&lt;br /&gt;
Parameters:&lt;br /&gt;
* page: the container page. Usually: &amp;quot;this&amp;quot;.&lt;br /&gt;
* container_div: the container &amp;quot;&amp;lt;div&amp;gt;&amp;quot; element (a void &amp;lt;div&amp;gt; element in your template, with an id).&lt;br /&gt;
* a stock item width and height, in pixels.&lt;br /&gt;
&lt;br /&gt;
(See &amp;quot;Hearts&amp;quot; example above).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;count():&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the total number of items in the stock right now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addItemType( type, weight, image, image_position ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Define a new type of item to the stock.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is mandatory to define a new item type before adding it to the stock. Example: if you want to have a stock control that can contains cubes of 3 different colors, you must add 3 item types (one for each color).&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* type: ID of the type to add. You can choose any positive integer. All item types must have distinct IDs.&lt;br /&gt;
* weight: weight of items of this type. Weight value is used to sort items of the stock during the display. Note that you can specify the same weight for all items (in this case they are not sorted and their order might change randomly at any time).&lt;br /&gt;
* image: URL of item image. Most of the time, you will use a CSS sprite for stock item, so you have to specify CSS sprite image here.&lt;br /&gt;
&lt;br /&gt;
Be careful: you must specify the image url as this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  g_gamethemeurl+&#039;img/yourimage.png&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* image_position: if &amp;quot;image&amp;quot; specify the URL of a CSS sprite, you must specify the position of the item image in this CSS sprite. For example, if you have a CSS sprite with 3 cubes with a size of 20x20 pixels each (so your CSS image has for example a size of 20x60 or 60x20), you specify &amp;quot;0&amp;quot; for the first cube image, 1 for the second, 2 for the third.&lt;br /&gt;
Important: there are more than one line of items in your CSS sprite,  you must specify how many items per line you have in your CSS sprite like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Specify that there is 10 image items per row in images used in &amp;quot;myStockObject&amp;quot; control.&lt;br /&gt;
    this.myStockObject.image_items_per_row = 10;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addToStock( type, from )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add an item to the stock, with the specified type.&lt;br /&gt;
&lt;br /&gt;
To make your life easy, in most of the case we suggest you to use &amp;quot;addToStockWithId&amp;quot; in order to give an ID to the item added. &amp;quot;addToStock&amp;quot; is perfect when you are using a stock controls with items that are generic game material that does not need to be addressed individually (ex: a bunch of money tokens).&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* type: ID of the item type to use (as specified in &amp;quot;addItemType&amp;quot;)&lt;br /&gt;
* from: OPTIONNAL: if you specify a HTML item here, the item will appear on this item and will be slided to its position on the stock item.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // Add a money token to the &amp;quot;player money&amp;quot; stock.&lt;br /&gt;
  // The money token will appear on &amp;quot;player_id&amp;quot; player panel and will move to its position.&lt;br /&gt;
  this.playerMoney.addToStock( MONEY_TOKEN, &#039;overall_player_board_&#039;+player_id );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Important: for a given stock control, you must use either addToStock or addToStockWithId, but NEVER BOTH OF THEM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addToStockWithId( type, id, from )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is exactly the same method than &amp;quot;addToStock&amp;quot;, except that you associate an ID to the newly created item.&lt;br /&gt;
&lt;br /&gt;
This is especially useful:&lt;br /&gt;
* When you need to know which item(s) has been selected by the user (see &amp;quot;getSelectedItems&amp;quot;).&lt;br /&gt;
* When you need to remove a specific item from the stock with &amp;quot;removeFromStockById&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Important: for a given stock control, you must use either addToStock or addToStockWithId, but NEVER BOTH OF THEM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;removeFromStock( type, to )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Remove an item of the specific type from the stock.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;to&amp;quot; is an optional parameter. If &amp;quot;to&amp;quot; contains the ID of an HTML element, the item removed from the stock is slided to this HTML element before it disappear.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;removeFromStockById( id, to )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Remove an item with a specific ID from the stock.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;to&amp;quot; is an optional parameter. If &amp;quot;to&amp;quot; contains the ID of an HTML element, the item removed from the stock is slided to this HTML element before it disappear.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;removeAll()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Remove all items from the stock.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPresentTypeList()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return an array with all the types of items present in the stock right now.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    this.myStockControl.removeAll();&lt;br /&gt;
    this.myStockControl.addToStock( 65 );&lt;br /&gt;
    this.myStockControl.addToStock( 34 );&lt;br /&gt;
    this.myStockControl.addToStock( 89 );&lt;br /&gt;
    this.myStockControl.addToStock( 65 );&lt;br /&gt;
    &lt;br /&gt;
    // The following returns: { 34:1,  65:1,  89:1  }&lt;br /&gt;
    var item_types = this.myStockControl.getPresentTypeList();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;resetItemsPosition()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you moved an item from the stock control manually (ex: after a drag&#039;n&#039;drop) and want to reset their position to their original ones, you can call this method.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;item_margin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default, there is a margin of 5px between the items of a stock. You can change the member variable &amp;quot;item_margin&amp;quot; to change this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     this.myStockControl.item_margin=5;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;changeItemsWeight( newWeights )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With this method you can change dynamically the weight of the item types in a stock control.&lt;br /&gt;
&lt;br /&gt;
Items are immediately re-sorted with the new weight.&lt;br /&gt;
&lt;br /&gt;
Example: with a stock control that contains classic cards, you can order them by value or by color. Using changeItemsWeight you can switch from one sort method to another when a player request this.&lt;br /&gt;
&lt;br /&gt;
newWeights is an associative array: item type id =&amp;gt; new weight.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Item type 1 gets a new weight of 10, 2 a new weight of 20, 3 a new weight of 30.&lt;br /&gt;
    this.myStockControl.changeItemsWeight( { 1: 10, 2: 20, 3: 30 } );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setSelectionMode( mode )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each stock control, you can specify a selection mode:&lt;br /&gt;
* 0: no item can be selected by the player.&lt;br /&gt;
* 1: a maximum of one item can be selected by the player at the same time.&lt;br /&gt;
* 2: several items can be selected by the player at the same time.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;isSelected( id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return true/false wether the specified item id has been selected or not.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;selectItem( id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Select the specified item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;unselectItem( id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Unselect the specified item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;unselectAll()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Unselect all items of the stock.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;onChangeSelection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This callback method is called when the player select/unselect an item of the stock.&lt;br /&gt;
&lt;br /&gt;
You can connect this to one of your method like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    dojo.connect( this.myStockControl, &#039;onChangeSelection&#039;, this, &#039;onMyMethodToCall&#039; );&lt;br /&gt;
    &lt;br /&gt;
    (...)&lt;br /&gt;
    &lt;br /&gt;
    onMyMethodToCall: function( control_name )&lt;br /&gt;
    {&lt;br /&gt;
        // This method is called when myStockControl selected items changed&lt;br /&gt;
        var items = this.myStockControl.getSelectedItems();&lt;br /&gt;
        &lt;br /&gt;
        // (do something)&lt;br /&gt;
    },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The &amp;quot;control_name&amp;quot; argument is the ID (the &amp;quot;DOM&amp;quot; id) of the &amp;lt;div&amp;gt; container of your stock control. Using &amp;quot;control_name&amp;quot;, you can use the same callback method for different Stock control and see which one trigger the method.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getSelectedItems()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the list of selected items, as an array with the following format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
   { type:1,  id:  1001 },&lt;br /&gt;
   { type:1,  id:  1002 },&lt;br /&gt;
   { type:3,  id:  1003 }&lt;br /&gt;
   ...&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getUnselectedItems()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as the previous one, but return unselected item instead of seleted ones.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAllItems()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get all items (same format than getSelectedItems and getUnselectedItems).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setOverlap( horizontal_percent, vertical_percent )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make items on the stock control &amp;quot;overlap&amp;quot; on each other, to save space.&lt;br /&gt;
&lt;br /&gt;
By default, horizontal_overlap and vertical_overlap are 0.&lt;br /&gt;
&lt;br /&gt;
When horizontal_overlap=20, it means that a stock item must overlap on 20% of the width of the previous item. horizontal_overlap can&#039;t be over 100.&lt;br /&gt;
&lt;br /&gt;
vertical_overlap works differently: one items on two are shifted up.&lt;br /&gt;
&lt;br /&gt;
See &amp;quot;Jaipur&amp;quot; game to see an example to use of this function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;onItemCreate&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using onItemCreate, you can trigger a method each time a new item is added to the Stock, in order you can customize it.&lt;br /&gt;
&lt;br /&gt;
Complete example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // During &amp;quot;setup&amp;quot; phase, we associate our method &amp;quot;setupNewCard&amp;quot; with the creation of a new stock item:&lt;br /&gt;
    this.myStockItem.onItemCreate = dojo.hitch( this, &#039;setupNewCard&#039; ); &lt;br /&gt;
&lt;br /&gt;
     (...)&lt;br /&gt;
&lt;br /&gt;
    // And here is our &amp;quot;setupNewCard&amp;quot;:&lt;br /&gt;
    setupNewCard: function( card_div, card_type_id, card_id )&lt;br /&gt;
    {&lt;br /&gt;
       // Add a special tooltip on the card:&lt;br /&gt;
       this.addTooltip( card_div.id, _(&amp;quot;Some nice tooltip for this item&amp;quot;), &#039;&#039; );&lt;br /&gt;
&lt;br /&gt;
       // Note that &amp;quot;card_type_id&amp;quot; contains the type of the item, so you can do special actions depending on the item type&lt;br /&gt;
&lt;br /&gt;
       // Add some custom HTML content INSIDE the Stock item:&lt;br /&gt;
       dojo.place( this.format_block( &#039;jstpl_my_card_content&#039;, {&lt;br /&gt;
                                ....&lt;br /&gt;
                           } ), card_div.id );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips when adding/removing items to/from Stock components ==&lt;br /&gt;
&lt;br /&gt;
The usual way is the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Situation A&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When you add a card to a stock item, and this card is &#039;&#039;&#039;not&#039;&#039;&#039; coming from another stock: use &amp;quot;addToStockWithId&amp;quot; with a &amp;quot;from&amp;quot; argument set to the element of your interface where card should come from.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Situation B&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When you add a card to a stock item, and this card is coming from another stock:&lt;br /&gt;
* on the destination Stock, use &amp;quot;addToStockWithId&amp;quot; with a &amp;quot;from&amp;quot; equals to the HTML id of the corresponding item in the source Stock. For example, If the source stock id is &amp;quot;myHand&amp;quot;, then the HTML id of card 48 is &amp;quot;myHand_item_48&amp;quot;.&lt;br /&gt;
* then, remove the source item with &amp;quot;removeFromStockById&amp;quot;.&lt;br /&gt;
(note that it&#039;s important to do things in this order, because source item must still exists when you use it as the origin of the slide).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Situation C&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
When you move a card from a stock item to something that is not a stock item:&lt;br /&gt;
* insert the card as a classic HTML template (dojo.place / this.format_block).&lt;br /&gt;
* place it on the Stock item with &amp;quot;this.placeOnObject&amp;quot;, using Stock item HTML id (see above).&lt;br /&gt;
* slide it to its new position with &amp;quot;this.slideToObject&amp;quot;&lt;br /&gt;
* remove the card from the Stock item with &amp;quot;removeFromStockById&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the methods above, your cards should slide to, from and between your Stock controls smoothly&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Game_interface_logic:_yourgamename.js&amp;diff=1079</id>
		<title>Game interface logic: yourgamename.js</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Game_interface_logic:_yourgamename.js&amp;diff=1079"/>
		<updated>2014-02-24T17:49:33Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Scoring dialogs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This is the main file for your game interface. Here you will define:&lt;br /&gt;
&lt;br /&gt;
* which actions on the page will generate calls to the server&lt;br /&gt;
* what happens when you get a notification for change from the server and how it will show in the browser. &lt;br /&gt;
&lt;br /&gt;
== File structure ==&lt;br /&gt;
&lt;br /&gt;
The details on how the file is structured is described directly with comments on the code skeleton provided to you.&lt;br /&gt;
&lt;br /&gt;
Basically, here&#039;s this structure:&lt;br /&gt;
* constructor: here you can define variable global to your whole interface.&lt;br /&gt;
* setup: this method is called when the page is refreshed, in order you can setup the game interface.&lt;br /&gt;
* onEnteringState: the method is called when entering in a new game state. This way you can customize the view for this game state.&lt;br /&gt;
* onLeavingState: the method is called when leaving a game state.&lt;br /&gt;
* onUpdateActionButtons: called when entering in a new state, in order you can add action buttons in status bar.&lt;br /&gt;
* (utility methods): at this place you can define your utility methods&lt;br /&gt;
* (player&#039;s actions): at this place you can write your handlers for player&#039;s action on the interface (ex: click on an item).&lt;br /&gt;
* setupNotifications: in this method you associate notifications with notification handlers. This way, for each game notification, you trigger a javascript method to handle it and update the game interface.&lt;br /&gt;
* (notification handlers): at this place you can define your notifications handlers.&lt;br /&gt;
&lt;br /&gt;
== General tips ==&lt;br /&gt;
&lt;br /&gt;
; this.player_id&lt;br /&gt;
: Id of the player on whose browser the code is running.&lt;br /&gt;
&lt;br /&gt;
; this.isSpectator&lt;br /&gt;
: Flag set to true if the user at the table is a spectator (not a player).&lt;br /&gt;
: Note: if you want to hide some element for spectators, you&#039;d better use [[Game_interface_stylesheet:_yourgamename.css#spectatorMode|CSS &#039;spectatorMode&#039; class]].&lt;br /&gt;
&lt;br /&gt;
; this.gamedatas&lt;br /&gt;
: Contains your initial set of datas to init the game, created at game start or game refresh (F5)&lt;br /&gt;
: You can update it as needed to keep an up to date reference of the game on the client side if you need it (most of the time you don&#039;t).&lt;br /&gt;
&lt;br /&gt;
; isCurrentPlayerActive()&lt;br /&gt;
: Returns true if the player on whose browser the code is running is currently active (it&#039;s his turn to play)&lt;br /&gt;
&lt;br /&gt;
; this.getActivePlayerId()&lt;br /&gt;
: Return the ID of active player, or null if we are not in a &amp;quot;activeplayer&amp;quot; type state.&lt;br /&gt;
&lt;br /&gt;
; this.getActivePlayers()&lt;br /&gt;
: Return an array with the IDs of players that are currently active (or an empty array if there is not).&lt;br /&gt;
&lt;br /&gt;
== Dojo framework ==&lt;br /&gt;
&lt;br /&gt;
BGA is using the [http://dojotoolkit.org/ Dojo Javascript framework].&lt;br /&gt;
&lt;br /&gt;
The Dojo framework allows us to do complex things easier, and the BGA framework is using Dojo framework a lot.&lt;br /&gt;
&lt;br /&gt;
To realize game although, you only need to use a few part of the Dojo framework. All the Dojo methods you need to use are describe on this page.&lt;br /&gt;
&lt;br /&gt;
== Access and manipulate the DOM ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$(&#039;some_html_element_id&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The $() function is used to get some HTML element using its &amp;quot;id&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
Example 1: modify the content of a &amp;quot;span&amp;quot; element:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In your HTML code:&lt;br /&gt;
   &amp;lt;span id=&amp;quot;a_value_in_the_game_interface&amp;quot;&amp;gt;1234&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your Javascript code:&lt;br /&gt;
   $(&#039;a_value_in_the_game_interface&#039;).innerHTML = &amp;quot;9999&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: $() is the standard method to access some HTML element with BGA Framework. You must not use &amp;quot;getElementById&amp;quot; function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.style&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With dojo.style you can modify a CSS property of any HTML element of your interface.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // Make an element disappear&lt;br /&gt;
     dojo.style( &#039;my_element&#039;, &#039;display&#039;, &#039;none&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Give an element a 2px border&lt;br /&gt;
     dojo.style( &#039;my_element&#039;, &#039;borderWidth&#039;, &#039;2px&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Change the background position of an element&lt;br /&gt;
     // (very practical when you are using CSS sprite to transform an element to another)&lt;br /&gt;
     dojo.style( &#039;my_element&#039;, &#039;backgroundPosition&#039;, &#039;-20px -50px&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: you must always use dojo.style to modify CSS properties of HTML elements.&lt;br /&gt;
&lt;br /&gt;
Note²: if you have to modify several CSS properties of an element, or if you have some complex CSS transformation to do, you should consider using dojo.addClass/dojo.removeClass (see below).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo CSS classes manipulation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In many situation, a bunch of many small CSS property update can be replaced by a CSS class change (ie: you add a CSS class to your element instead of applying all modification manually).&lt;br /&gt;
&lt;br /&gt;
Advantages are:&lt;br /&gt;
* All your CSS stuff remains in your CSS file.&lt;br /&gt;
* You can add/remove a list of CSS modifications with a simple function and whithout error.&lt;br /&gt;
* You can test if you applied the stuff to an element with &amp;quot;dojo.hasClass&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
Example from &amp;quot;Reversi&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // We add &amp;quot;possibleMove&amp;quot; to an element&lt;br /&gt;
    dojo.addClass( &#039;square_&#039;+x+&#039;_&#039;+y, &#039;possibleMove&#039; );&lt;br /&gt;
&lt;br /&gt;
    // In our CSS file, the class is defined as:&lt;br /&gt;
    .possibleMove {&lt;br /&gt;
      background-color: white;&lt;br /&gt;
      opacity: 0.2;&lt;br /&gt;
      filter:alpha(opacity=20); /* For IE8 and earlier */  &lt;br /&gt;
      cursor: pointer;  &lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     // So we&#039;ve applied 4 CSS property change in one line of code.&lt;br /&gt;
&lt;br /&gt;
     // ... and when we need to check if a square is a possible move on client side:&lt;br /&gt;
     if( dojo.hasClass( &#039;square_&#039;+x+&#039;_&#039;+y, &#039;possibleMove&#039; ) )&lt;br /&gt;
     { ... }&lt;br /&gt;
&lt;br /&gt;
     // ... and if we want to remove all possible moves in one line of code (see &amp;quot;dojo.query&amp;quot; method):&lt;br /&gt;
     dojo.query( &#039;.possibleMove&#039; ).removeClass( &#039;possibleMove&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conclusion: we encourage you to use dojo.addClass, dojo.removeClass and dojo.hasClass to make your life easier :)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.query&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With dojo.query, you can query a bunch of HTML elements with a single function, with a &amp;quot;CSS selector&amp;quot; style.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // All elements with class &amp;quot;possibleMove&amp;quot;:&lt;br /&gt;
     var elements = dojo.query( &#039;.possibleMove&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Count number of tokens (ie: elements with class &amp;quot;token&amp;quot;) on the board (ie: element with id &amp;quot;board&amp;quot;):&lt;br /&gt;
     dojo.query( &#039;#board .token&#039; ).length;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But what is really cool with dojo.query is that you can combine it with almost all methods above.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // Trigger a method when the mouse enter in any element with class &amp;quot;meeple&amp;quot;:&lt;br /&gt;
     dojo.query( &#039;.meeple&#039; ).connect( &#039;onmouseenter&#039;, this, &#039;myMethodToTrigger&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Hide all meeples who are on the board&lt;br /&gt;
     dojo.query( &#039;#board .meeple&#039; ).style( &#039;display&#039;, &#039;none&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.place&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
dojo.place is the best function to insert some HTML code somewhere in your game interface without breaking something. It is much better to use that &amp;quot;innerHTML=&#039;&#039;&amp;quot; method as soon as you must insert HTML tags and not only values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // Insert your HTML code as a child of a container element&lt;br /&gt;
     dojo.place( &amp;quot;&amp;lt;your html code&amp;gt;&amp;quot;, &amp;quot;your_container_element_id&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
     // Replace the container element with your new html&lt;br /&gt;
     dojo.place( &amp;quot;&amp;lt;your html code&amp;gt;&amp;quot;, &amp;quot;your_container_element_id&amp;quot;, &amp;quot;replace&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: the third parameter of dojo.place can take various interesting value: &amp;quot;first&amp;quot;, &amp;quot;after&amp;quot;, ... [http://dojotoolkit.org/reference-guide/1.7/dojo/place.html See full doc on dojo.place].&lt;br /&gt;
&lt;br /&gt;
Usually, when you want to insert some piece of HTML in your game interface, you should use &amp;quot;[[Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl#Javascript_templates|Javascript templates]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addStyleToClass: function( cssClassName, cssProperty, propertyValue )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as dojo.style(), but for all the nodes set with the specified cssClassName&lt;br /&gt;
&lt;br /&gt;
=== Animations ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dojo Animations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BGA animations is based on Dojo Animation ([http://dojotoolkit.org/documentation/tutorials/1.8/animation/ see tutorial here]).&lt;br /&gt;
&lt;br /&gt;
However, most of the time, you can just use methods below, which are built on top of Dojo Animation.&lt;br /&gt;
&lt;br /&gt;
Note: one interesting method from Dojo that could be useful from time to time is &amp;quot;Dojo.Animation&amp;quot;. It allows you to make any CSS property &amp;quot;slide&amp;quot; from one value to another.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideToObject( mobile_obj, target_obj, duration, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use slideToObject to &amp;quot;slide&amp;quot; an element to a target position.&lt;br /&gt;
&lt;br /&gt;
Sliding element on the game area is the recommended and the most used way to animate your game interface. Using slides allow players to figure out what is happening on the game, as if they were playing with the real boardgame.&lt;br /&gt;
&lt;br /&gt;
The parameters are:&lt;br /&gt;
* mobile_obj: the ID of the object to move. This object must be &amp;quot;relative&amp;quot; or &amp;quot;absolute&amp;quot; positioned.&lt;br /&gt;
* target_obj: the ID of the target object. This object must be &amp;quot;relative&amp;quot; or &amp;quot;absolute&amp;quot; positioned. Note that it is not mandatory that mobile_obj and target_obj have the same size. If their size are different, the system slides the center of mobile_obj to the center of target_obj.&lt;br /&gt;
* duration: (optional) defines the duration in millisecond of the slide. The default is 500 milliseconds.&lt;br /&gt;
* delay: (optional). If you defines a delay, the slide will start only after this delay. This is particularly useful when you want to slide several object from the same position to the same position: you can give a 0ms delay to the first object, a 100ms delay to the second one, a 200ms delay to the third one, ... this way they won&#039;t be superposed during the slide.&lt;br /&gt;
&lt;br /&gt;
BE CAREFUL: The method returns an dojo.fx animation, so you can combine it with other animation if you want to. It means that you have to call the &amp;quot;play()&amp;quot; method, otherwise the animation WON&#039;T START.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.slideToObject( &amp;quot;some_token&amp;quot;, &amp;quot;some_place_on_board&amp;quot; ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideToObjectPos( mobile_obj, target_obj, target_x, target_y, duration, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method does exactly the same than &amp;quot;slideToObjectPos&amp;quot;, except than you can specify some (x,y) coordinates. This way, &amp;quot;mobile_obj&amp;quot; will slide to the specified x,y position relatively to &amp;quot;target_obj&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example: slide a token to some place on the board, 10 pixels to the bottom:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.slideToObjectPos( &amp;quot;some_token&amp;quot;, &amp;quot;some_place_on_board&amp;quot;, 0, 10 ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideTemporaryObject( mobile_obj_html, mobile_obj_parent, from, to, duration, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method is useful when you want to slide a temporary HTML object from one place to another. As this object does not exists before the animation and won&#039;t remain after, it could be complex to create this object (with dojo.place), to place it at its origin (with placeOnObject) to slide it (with slideToObject) and to make it disappear at the end.&lt;br /&gt;
&lt;br /&gt;
slideTemporaryObject does all of this for you:&lt;br /&gt;
* mobile_obj_html is a piece of HTML code that represent the object to slide.&lt;br /&gt;
* mobile_obj_parent is the ID of an HTML element of your interface that will be the parent of this temporary HTML object.&lt;br /&gt;
* from is the ID of the origin of the slide.&lt;br /&gt;
* to is the ID of the target of the slide.&lt;br /&gt;
* duration/delay works exactly like in &amp;quot;slideToObject&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.slideTemporaryObject( &#039;&amp;lt;div class=&amp;quot;token_icon&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;, &#039;tokens&#039;, &#039;my_origin_div&#039;, &#039;my_target_div&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideToObjectAndDestroy: function( node, to, time, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method is a handy shortcut to slide an existing HTML object to some place then destroy it upon arrival. It can be used for example to move a victory token or a card from the board to the player panel to show that the player earns it, then destroy it when we don&#039;t need to keep it visible on the player panel.&lt;br /&gt;
&lt;br /&gt;
It works the same as this.slideToObject and takes the same arguments. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.slideToObjectAndDestroy( &amp;quot;some_token&amp;quot;, &amp;quot;some_place_on_board&amp;quot;, 1000, 0 ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.fadeOutAndDestroy( node )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function fade out the target HTML node, then destroy it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.fadeOutAndDestroy( &amp;quot;a_card_that_must_disappear&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CAREFUL: the HTML node still exists until during few milliseconds, until the fadeOut has been completed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rotating elements&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can check here [http://jimfulton.info/demos/dojo-animated-rotate.html an example of use] of Dojo to make an element rotate.&lt;br /&gt;
&lt;br /&gt;
This example combines &amp;quot;Dojo.Animation&amp;quot; method and a CSS3 property that allow you to rotate the element.&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: to asses browser compatibility, you must select the CSS property to use just like in the example (see sourcecode below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        var transform;&lt;br /&gt;
        dojo.forEach(&lt;br /&gt;
            [&#039;transform&#039;, &#039;WebkitTransform&#039;, &#039;msTransform&#039;,&lt;br /&gt;
             &#039;MozTransform&#039;, &#039;OTransform&#039;],&lt;br /&gt;
            function (name) {&lt;br /&gt;
                if (typeof dojo.body().style[name] != &#039;undefined&#039;) {&lt;br /&gt;
                    transform = name;&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
        // ... and then use &amp;quot;transform&amp;quot; as the name of your CSS property for rotation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Moving elements ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.placeOnObject( mobile_obj, target_obj )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
placeOnObject works exactly like &amp;quot;slideToObject&amp;quot;, except that the effect is immediate.&lt;br /&gt;
&lt;br /&gt;
This is not really an animation, but placeOnObject is frequently used before starting an animation.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // (We just created an object &amp;quot;my_new_token&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  // Place the new token on current player board&lt;br /&gt;
  this.placeOnObject( &amp;quot;my_new_token&amp;quot;, &amp;quot;overall_player_board_&amp;quot;+this.player_id );&lt;br /&gt;
  &lt;br /&gt;
  // Then slide it to its position on the board&lt;br /&gt;
  this.slideToObject( &amp;quot;my_new_token&amp;quot;, &amp;quot;a_place_on_board&amp;quot; ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.placeOnObjectPos( mobile_obj, target_obj, target_x, target_y )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method works exactly like placeOnObject, except than you can specify some (x,y) coordinates. This way, &amp;quot;mobile_obj&amp;quot; will be placed to the specified x,y position relatively to &amp;quot;target_obj&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.attachToNewParent( mobile_obj, target_obj )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With this method, you change the HTML parent of &amp;quot;mobile_obj&amp;quot; element. &amp;quot;target_obj&amp;quot; is the new parent of this element. The beauty of &lt;br /&gt;
attachToNewParent is that the mobile_obj element DOES NOT MOVE during this process.&lt;br /&gt;
&lt;br /&gt;
Note: what happens is that the method calculate a relative position of mobile_obj to make sure it does not move after the HTML parent changes.&lt;br /&gt;
&lt;br /&gt;
Why using this method?&lt;br /&gt;
&lt;br /&gt;
Changing the HTML parent of an element can be useful for the following reasons:&lt;br /&gt;
* When the HTML parent moves, all its child are moving with them. If some game elements is no more linked with a parent HTML object, you may want to attach it to another place.&lt;br /&gt;
* The z_order (vertical order of display) depends on the position in the DOM, so you may need to change the parent of some game elements when they are moving in your game area.&lt;br /&gt;
&lt;br /&gt;
CAREFUL: when you attach an HTML element with a new parent, you break all references to this HTML element (ex: dojo.connect).&lt;br /&gt;
&lt;br /&gt;
== Players input ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.connect&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to associate a player event with one of your notification method.&lt;br /&gt;
&lt;br /&gt;
Example: associate a click on an element (&amp;quot;my_element&amp;quot;) with one of our method (&amp;quot;onClickOnMyElement&amp;quot;):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      dojo.connect( $(&#039;my_element&#039;), &#039;onclick&#039;, this, &#039;onClickOnMyElement&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: this is the only possible correct way to associate a player input event to your code, and you must not use anything else.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.checkAction( &amp;quot;my_action_name&amp;quot; )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Usage: checkAction: function( action, nomessage )&lt;br /&gt;
&lt;br /&gt;
Check if player can do the specified action by taking into account:&lt;br /&gt;
* current game state&lt;br /&gt;
* interface locking (a player can&#039;t do any action if an action is already in progress)&lt;br /&gt;
&lt;br /&gt;
return true if action is authorized (ie: the action is listed as a &amp;quot;possibleaction&amp;quot; in current game state).&lt;br /&gt;
&lt;br /&gt;
return false and display an error message if not (display no message if nomessage parameter is true). The displayed error message could be either &amp;quot;This move is not allowed at this moment&amp;quot; or &amp;quot;An action is already in progress&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function onClickOnGameElement( evt )&lt;br /&gt;
  {&lt;br /&gt;
     if( this.checkAction( &amp;quot;my_action&amp;quot; ) )&lt;br /&gt;
     {&lt;br /&gt;
        // Do the action&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.ajaxcall( url, parameters, obj_callback, callback, callback_error )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method must be used to send a player input to the game server.&lt;br /&gt;
&lt;br /&gt;
* url: the url of the action to perform. For a game, it must be: &amp;quot;/&amp;lt;mygame&amp;gt;/&amp;lt;mygame&amp;gt;/myAction.html&amp;quot;&lt;br /&gt;
* parameters: an array of parameter to send to the game server. Note that &amp;quot;lock:true&amp;quot; must always be specified in this list of parameter in order the interface can be locked during the server call.&lt;br /&gt;
* obj_callback: must be set to &amp;quot;this&amp;quot;.&lt;br /&gt;
* callback: a function to trigger when the server returns and everything went fine.&lt;br /&gt;
* callback_error: (optional and rarely used) a function to trigger when the server returns an error.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.ajaxcall( &#039;/mygame/mygame/myaction.html&#039;, { lock: true, &lt;br /&gt;
   arg1: myarg1, &lt;br /&gt;
   arg2: myarg2, &lt;br /&gt;
   ...&lt;br /&gt;
}, this, function( result ) {&lt;br /&gt;
   // Do some stuff after a successful call&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restricted arguments names (please don&#039;t use them):&lt;br /&gt;
* &amp;quot;action&amp;quot;&lt;br /&gt;
* &amp;quot;module&amp;quot;&lt;br /&gt;
* &amp;quot;class&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.confirmationDialog()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Display a confirmation dialog with a yes/no choice.&lt;br /&gt;
&lt;br /&gt;
We advice you to NOT use this function unless the player action is really critical and could ruins the game, because it slows down the game and upset players.&lt;br /&gt;
&lt;br /&gt;
Usage: this.confirmationDialog( &amp;quot;Question to displayed&amp;quot;, callback_function_if_click_on_yes );&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.confirmationDialog( _(&#039;Are you sure to use this bonus (points penalty at the end of the game) ?&#039;),&lt;br /&gt;
                         dojo.hitch( this, function() {&lt;br /&gt;
                           this.ajaxcall( &#039;/seasons/seasons/useBonus.html&#039;,&lt;br /&gt;
                                { id:bonus_id, lock:true }, this, function( result ) {} );&lt;br /&gt;
                        } ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; addEventToClass: function( cssClassName, eventName, functionName )&lt;br /&gt;
: Same as dojo.connect(), but for all the nodes set with the specified cssClassName&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addActionButton( id, label, method, (opt)depreciated, (opt)bHighlight )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use this method to add an action button in the main action status bar.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* id: a ID that should be unique in your HTML DOM document.&lt;br /&gt;
* label: the text of the button. Should be translatable (use _() function).&lt;br /&gt;
* method: the name of your method that must be triggered when the player clicks on this button.&lt;br /&gt;
* depreciated (optional): do not use this. Please not specify this argument or use &amp;quot;null&amp;quot;.&lt;br /&gt;
* bHighlight: if set to &amp;quot;true&amp;quot;, the button is going blink to catch player&#039;s attention. Please don&#039;t abuse of blinking button.&lt;br /&gt;
&lt;br /&gt;
You should only use this method in your &amp;quot;onUpdateActionButtons&amp;quot; method. Usually, you use it like this (from Hears example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        onUpdateActionButtons: function( stateName, args )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &#039;onUpdateActionButtons: &#039;+stateName );&lt;br /&gt;
                      &lt;br /&gt;
            if( this.isCurrentPlayerActive() )&lt;br /&gt;
            {            &lt;br /&gt;
                switch( stateName )&lt;br /&gt;
                {&lt;br /&gt;
                case &#039;giveCards&#039;:&lt;br /&gt;
                    this.addActionButton( &#039;giveCards_button&#039;, _(&#039;Give selected cards&#039;), &#039;onGiveCards&#039; ); &lt;br /&gt;
                    break;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        },   &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, we are adding a &amp;quot;Give selected cards&amp;quot; button in the case we are on game state &amp;quot;giveCards&amp;quot;. When player clicks on this button, it triggers our &amp;quot;onGiveCards&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
See [[Translations]]&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
&lt;br /&gt;
When something happens on the server side, your game interface Javascript logic received a notification.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how you can handle these notifications on the client side.&lt;br /&gt;
&lt;br /&gt;
=== Subscribe to notifications ===&lt;br /&gt;
&lt;br /&gt;
Your Javascript &amp;quot;setupNotifications&amp;quot; method is the place where you can subscribe to notifications from your PHP code.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how you associate one of your Javascript method to a notification &amp;quot;playDisc&amp;quot; (from Reversi example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   // In setupNotifications method:&lt;br /&gt;
   dojo.subscribe( &#039;playDisc&#039;, this, &amp;quot;notif_playDisc&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: the &amp;quot;playDisc&amp;quot; corresponds to the name of the notification you define it in your PHP code, in your &amp;quot;notifyAllPlayers&amp;quot; or &amp;quot;notifyPlayer&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
Then, you have to define your &amp;quot;notif_playDisc&amp;quot; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        notif_playDisc: function( notif )&lt;br /&gt;
        {&lt;br /&gt;
            // Remove current possible moves (makes the board more clear)&lt;br /&gt;
            dojo.query( &#039;.possibleMove&#039; ).removeClass( &#039;possibleMove&#039; );        &lt;br /&gt;
        &lt;br /&gt;
            this.addDiscOnBoard( notif.args.x, notif.args.y, notif.args.player_id );&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In a notification handler like our &amp;quot;notif_playDisc&amp;quot; method, you can access to all notifications arguments with &amp;quot;notif.args&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // If you did this on PHP side:&lt;br /&gt;
    self::notifyAllPlayers( &amp;quot;myNotification&amp;quot;, &#039;&#039;, array( &amp;quot;myArgument&amp;quot; =&amp;gt; 3 ) );&lt;br /&gt;
&lt;br /&gt;
    // On Javascript side, you can access the &amp;quot;myArgument&amp;quot; like this:&lt;br /&gt;
    notif_myNotification: function( notif )&lt;br /&gt;
    {&lt;br /&gt;
       alert( &amp;quot;myArgument = &amp;quot; + notif.args.myArgument );&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Synchronous notifications ===&lt;br /&gt;
&lt;br /&gt;
When several notifications are received by your game interface, these notifications are processed immediately, one after the other, in the same exact order they have been generated in your PHP game logic.&lt;br /&gt;
&lt;br /&gt;
However, sometimes, you need to give some time to the players to figure out what happened on the game before jumping to the next notification. Indeed, in many games, they are a lot of automatic actions, and the computer is going to resolve all these actions very fast if you don&#039;t tell it not to do so.&lt;br /&gt;
&lt;br /&gt;
As an example, for Reversi, when someone is playing a disc, we want to wait 500 milliseconds before doing anything else in order the opponent player can figure out what move has been played.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how we do this, right after our subscription:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       dojo.subscribe( &#039;playDisc&#039;, this, &amp;quot;notif_playDisc&amp;quot; );&lt;br /&gt;
       this.notifqueue.setSynchronous( &#039;playDisc&#039;, 500 );   // Wait 500 milliseconds after executing the playDisc handler&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tooltips ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addTooltip( nodeId, _( helpString ), _( actionString ), delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a simple text tooltip to the DOM node.&lt;br /&gt;
&lt;br /&gt;
Specify &#039;helpString&#039; to display some information about &amp;quot;what is this game element?&amp;quot;.&lt;br /&gt;
Specify &#039;actionString&#039; to display some information about &amp;quot;what happens when I click on this element?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You must specify both helpString and actionString. Most of the time, you use only one and specify a void string (&amp;quot;&amp;quot;) for the other one.&lt;br /&gt;
&lt;br /&gt;
Usually, _() must be used for the text to be marked for translation.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Delay&amp;quot; is an optional parameter. Usually, it is primarily used to specify a zero delay for some game element when the tooltip gives really important information for the game - but remember: no essential information must be placed in tooltips as they won&#039;t be displayed in some browser (see Guidelines).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.addTooltip( &#039;cardcount&#039;, _(&#039;Number of cards in hand&#039;), &#039;&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addTooltipHtml( nodeId, html, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add an HTML tooltip to the DOM node (for more elaborate content such as presenting a bigger version of a card).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addTooltipToClass( cssClass, _( helpString ), _( actionString ), delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a simple text tooltip to all the DOM nodes set with this cssClass. &lt;br /&gt;
&lt;br /&gt;
IMPORTANT: all concerned nodes must have IDs to get tooltips.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addTooltipHtmlToClass( cssClass, html, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add an HTML tooltip to to all the DOM nodes set with this cssClass (for more elaborate content such as presenting a bigger version of a card).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: all concerned nodes must have IDs to get tooltips&lt;br /&gt;
&lt;br /&gt;
== Dialogs, warning messages, confirmation dialogs, ... ==&lt;br /&gt;
&lt;br /&gt;
=== Warning messages ===&lt;br /&gt;
&lt;br /&gt;
Sometimes, there is something important that is happening on the game and you have to make sure all players get the message. Most of the time, the evolution of the game situation or the game log is enough, but sometimes you need something more visible.&lt;br /&gt;
&lt;br /&gt;
Ex: someone fulfill one of the end of the game condition, so this is the last turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.showMessage( msg, type )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
showMessage shows a message in a big rectangular area on the top of the screen of current player.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;msg&amp;quot; is the string to display. It should be translated.&lt;br /&gt;
* &amp;quot;type&amp;quot; can be set to &amp;quot;info&amp;quot; or &amp;quot;error&amp;quot;. If set to &amp;quot;info&amp;quot;, the message will be an informative message on a white background. If set to &amp;quot;error&amp;quot;, the message will be an error message on a red background.&lt;br /&gt;
&lt;br /&gt;
Important: the normal way to inform players about the progression of the game is the game log. &amp;quot;showMessage&amp;quot; is intrusive and should not be used often.&lt;br /&gt;
&lt;br /&gt;
=== Confirmation dialog ===&lt;br /&gt;
&lt;br /&gt;
When an important action with a lot of consequences is triggered by the player, you may want to propose a confirmation dialog.&lt;br /&gt;
&lt;br /&gt;
CAREFUL: the general guidelines of BGA is to AVOID the use of confirmation dialog. Confirmation dialogs slow down the game and bother players. The players knows that they have to pay attention about each move when they are playing online.&lt;br /&gt;
&lt;br /&gt;
The situation where you should use a confirmation dialog are the following:&lt;br /&gt;
* It must not happen very often during a game.&lt;br /&gt;
* It must be linked to an action that can really &amp;quot;kill a game&amp;quot; if the player do not pay attention.&lt;br /&gt;
* It must be something that can be done by mistake (ex: a link on the action status bar).&lt;br /&gt;
&lt;br /&gt;
How to display a confirmation dialog:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        this.confirmationDialog( _(&#039;Are you sure you want to make this?&#039;), dojo.hitch( this, function() {&lt;br /&gt;
            this.ajaxcall( &#039;/mygame/mygame/makeThis.html&#039;, { lock:true }, this, function( result ) {} );&lt;br /&gt;
        } ) );   &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Dialogs ===&lt;br /&gt;
&lt;br /&gt;
At first, you shouldn&#039;t use dialogs windows.&lt;br /&gt;
&lt;br /&gt;
BGA guidelines specify that all game elements should be displayed on the main screen. Players can eventually scroll down to see game elements they don&#039;t need to see anytime, and you may eventually create anchors to move between game area section. Of course dialogs windows are very practical, but the thing is: all players know how to scroll down, and not all players know how to show up your dialog window. In addition, when the dialog shows up, players can&#039;t access the other game components.&lt;br /&gt;
&lt;br /&gt;
Sometimes although, you need to display a dialog window. Here is how you do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  // Create the new dialog. You should store the handler in a member variable to access it later&lt;br /&gt;
  this.myDlg = new dijit.Dialog({ title: _(&amp;quot;my dialog title to translate&amp;quot;) });&lt;br /&gt;
&lt;br /&gt;
  // Create the HTML of my dialog. The best practice here is to use [[Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl#Javascript_templates|Javascript templates]]:&lt;br /&gt;
  var html = this.format_block( &#039;jstpl_myDialogTemplate&#039;, { &lt;br /&gt;
                arg1: myArg1,&lt;br /&gt;
                arg2: myArg2,&lt;br /&gt;
                ...&lt;br /&gt;
            } );  &lt;br /&gt;
&lt;br /&gt;
  // Show the dialog&lt;br /&gt;
  this.myDlg.attr(&amp;quot;content&amp;quot;, html );&lt;br /&gt;
  this.myDlg.show(); &lt;br /&gt;
&lt;br /&gt;
  // Now that the dialog has been displayed, you can connect your method to some dialog elements&lt;br /&gt;
  // Example, a &amp;quot;close&amp;quot; button:&lt;br /&gt;
  dojo.connect( $(&#039;closeDlg&#039;), &#039;onclick&#039;, this, function(evt){&lt;br /&gt;
                evt.preventDefault();&lt;br /&gt;
                this.myDlg.hide();&lt;br /&gt;
            } );  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tip: be careful with &amp;quot;hide()&amp;quot; method to close your dialog: the dialog and its content is not completely removed from the DOM. It can cause you problems if you try to display the same dialog several times. A good practice is to wrap all the content of your dialog in a &amp;quot;&amp;lt;div id=&#039;myDlgContent&#039;&amp;gt;&amp;quot; div element, and to call &amp;quot;dojo.destroy(&#039;myDlgContent&#039;)&amp;quot; before displaying your dialog.&lt;br /&gt;
&lt;br /&gt;
=== Scoring dialogs ===&lt;br /&gt;
&lt;br /&gt;
Sometimes at the end of a round you want to display a big table that details the points wins in each section of the game.&lt;br /&gt;
&lt;br /&gt;
Example: in Hearts game, we display at the end of each round the number of &amp;quot;heart&amp;quot; cards collected by each player, the player who collected the Queen of Spades, and the total number of points loose by each player.&lt;br /&gt;
&lt;br /&gt;
Scoring dialogs are managed entirely on &#039;&#039;&#039;PHP side&#039;&#039;&#039;, but they are described here as their effects are visible only on client side.&lt;br /&gt;
&lt;br /&gt;
Displaying a scoring dialog is quite simple and is using a special notification type: &amp;quot;tableWindow&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // on PHP side:&lt;br /&gt;
  $this-&amp;gt;notifyAllPlayers( &amp;quot;tableWindow&amp;quot;, &#039;&#039;, array(&lt;br /&gt;
            &amp;quot;id&amp;quot; =&amp;gt; &#039;finalScoring&#039;,&lt;br /&gt;
            &amp;quot;title&amp;quot; =&amp;gt; clienttranslate(&amp;quot;Title of the scoring dialog&amp;quot;),&lt;br /&gt;
            &amp;quot;table&amp;quot; =&amp;gt; $table&lt;br /&gt;
        ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;table&amp;quot; argument is a 2 dimensional PHP array that describe the table you want to display, line by line and column by column.&lt;br /&gt;
&lt;br /&gt;
Example: display an 3x3 array of strings&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   $table = array(&lt;br /&gt;
      array( &amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, &amp;quot;three&amp;quot; ),    // This is my first line&lt;br /&gt;
      array( &amp;quot;four&amp;quot;, &amp;quot;five&amp;quot;, &amp;quot;six&amp;quot; ),    // This is my second line&lt;br /&gt;
      array( &amp;quot;seven&amp;quot;, &amp;quot;height&amp;quot;, &amp;quot;nine&amp;quot; )    // This is my third line&lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see above, in each &amp;quot;cell&amp;quot; of your array you can display a simple string value. But you can also display a complex value with a template and associated arguments like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   $table = array(&lt;br /&gt;
      array( &amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, array( &amp;quot;str&amp;quot; =&amp;gt; &amp;quot;a string with an ${argument}&amp;quot;, &amp;quot;args&amp;quot; =&amp;gt; array( &#039;argument&#039; =&amp;gt; &#039;argument_value&#039; )  ) ),&lt;br /&gt;
      array( &amp;quot;four&amp;quot;, &amp;quot;five&amp;quot;, &amp;quot;six&amp;quot; ), &lt;br /&gt;
      array( &amp;quot;seven&amp;quot;, &amp;quot;height&amp;quot;, &amp;quot;nine&amp;quot; )&lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is especially useful when you want to display player names with colors. Example from &amp;quot;Hearts&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $firstRow = array( &#039;&#039; );&lt;br /&gt;
        foreach( $players as $player_id =&amp;gt; $player )&lt;br /&gt;
        {&lt;br /&gt;
            $firstRow[] = array( &#039;str&#039; =&amp;gt; &#039;${player_name}&#039;,&lt;br /&gt;
                                 &#039;args&#039; =&amp;gt; array( &#039;player_name&#039; =&amp;gt; $player[&#039;player_name&#039;] ),&lt;br /&gt;
                                 &#039;type&#039; =&amp;gt; &#039;header&#039;&lt;br /&gt;
                               );&lt;br /&gt;
        }&lt;br /&gt;
        $table[] = $firstRow;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use three extra attributes in the parameter array for the notification:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   $this-&amp;gt;notifyAllPlayers( &amp;quot;tableWindow&amp;quot;, &#039;&#039;, array(&lt;br /&gt;
            &amp;quot;id&amp;quot; =&amp;gt; &#039;finalScoring&#039;,&lt;br /&gt;
            &amp;quot;title&amp;quot; =&amp;gt; clienttranslate(&amp;quot;Title of the scoring dialog&amp;quot;),&lt;br /&gt;
            &amp;quot;table&amp;quot; =&amp;gt; $table,&lt;br /&gt;
            &amp;quot;header&amp;quot; =&amp;gt; &#039;&amp;lt;div&amp;gt;Some header&amp;lt;/div&amp;gt;&#039;,&lt;br /&gt;
            &amp;quot;footer&amp;quot; =&amp;gt; &#039;&amp;lt;div&amp;gt;Some footer&amp;lt;/div&amp;gt;&#039;,&lt;br /&gt;
            &amp;quot;closelabel&amp;quot; =&amp;gt; clienttranslate( &amp;quot;Closing button label&amp;quot; )&lt;br /&gt;
        ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;header&#039;&#039;&#039;: the content for this parameter will display before the table (also, the html will be parsed and player names will be colored according to the current game colors)&lt;br /&gt;
*&#039;&#039;&#039;footer&#039;&#039;&#039;: the content for this parameter will display after the table (no parsing for coloring the player names)&lt;br /&gt;
*&#039;&#039;&#039;closelabel&#039;&#039;&#039;: if this parameter is used, a button will be displayed with this label at the bottom of the popup and will allow players to close it (more easily than by clicking the top right &#039;cross&#039; icon). NB: this last parameter is not yet - 24/02/2014 - deployed on the studio, but can be used already and will take effect immediately with the next update.&lt;br /&gt;
&lt;br /&gt;
== Update players score ==&lt;br /&gt;
&lt;br /&gt;
Increase a player score (with a positive or negative number):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  this.scoreCtrl[ player_id ].incValue( score_delta );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set a player score to a specific value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  this.scoreCtrl[ player_id ].setValue( new_score );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Players panels ==&lt;br /&gt;
&lt;br /&gt;
=== Adding stuff to player&#039;s panel ===&lt;br /&gt;
&lt;br /&gt;
At first, create a new &amp;quot;JS template&amp;quot; string in your template (tpl) file:&lt;br /&gt;
&lt;br /&gt;
(from Reversi example)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var jstpl_player_board = &#039;\&amp;lt;div class=&amp;quot;cp_board&amp;quot;&amp;gt;\&lt;br /&gt;
    &amp;lt;div id=&amp;quot;stoneicon_p${id}&amp;quot; class=&amp;quot;gmk_stoneicon gmk_stoneicon_${color}&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;span id=&amp;quot;stonecount_p${id}&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;\&lt;br /&gt;
&amp;lt;/div&amp;gt;&#039;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, you add this piece of code in your JS file to add this template to each player panel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            // Setting up player boards&lt;br /&gt;
            for( var player_id in gamedatas.players )&lt;br /&gt;
            {&lt;br /&gt;
                var player = gamedatas.players[player_id];&lt;br /&gt;
                         &lt;br /&gt;
                // Setting up players boards if needed&lt;br /&gt;
                var player_board_div = $(&#039;player_board_&#039;+player_id);&lt;br /&gt;
                dojo.place( this.format_block(&#039;jstpl_player_board&#039;, player ), player_board_div );&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note: the code above is of course from your &amp;quot;setup&amp;quot; function in your Javascript).&lt;br /&gt;
&lt;br /&gt;
Very often, you have to distinguish current player and others players. In this case, you just have to create another JS template (ex: jstpl_otherplayer_board) and use it when &amp;quot;player_id&amp;quot; is different than &amp;quot;this.player_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Player&#039;s panel disabling/enabling ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.disablePlayerPanel( player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Disable given player panel (the panel background become gray).&lt;br /&gt;
&lt;br /&gt;
Usually, this is used to signal that this played passes, or will be inactive during a while.&lt;br /&gt;
&lt;br /&gt;
Note that the only effect of this is visual. There are no consequences on the behaviour of the panel itself.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.enablePlayerPanel( player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Enable a player panel that has been disabled before.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.enableAllPlayerPanels()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Enable all player panels that has been disabled before.&lt;br /&gt;
&lt;br /&gt;
== Image loading ==&lt;br /&gt;
&lt;br /&gt;
See also [[Game_art:_img_directory]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be careful&#039;&#039;&#039;: by default, ALL images of your img directory are loaded on a player&#039;s browser when he loads the game. For this reason, don&#039;t let in your img directory images that are not useful, otherwise it&#039;s going to slowdown the game load.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dontPreloadImage( image_file_name )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using dontPreloadImage, you tell the interface to not preload a specific image in your img directory.&lt;br /&gt;
&lt;br /&gt;
Example of use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.dontPreloadImage( &#039;cards.png&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is particularly useful if for example you have 2 different themes for a game. To accelerate the loading of the game, you can specify to not preload images corresponding to the other theme.&lt;br /&gt;
&lt;br /&gt;
Another example of use: in &amp;quot;Gosu&amp;quot; game with Kamakor extension, you play with 5 sets of cards among 10 available. Cards images are organized by sets, and we only preload the images corresponding to the 5 current sets.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You don&#039;t need to specify to not preload game box images (game_box.png, game_box75.png...) since they are not preloaded by default.&lt;br /&gt;
&lt;br /&gt;
== Other useful stuff ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.hitch&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With dojo.hitch, you can create a callback function that will run with your game object context whatever happen.&lt;br /&gt;
&lt;br /&gt;
Typical example: display a BGA confirmation dialog with a callback function created with dojo.hitch:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        this.confirmationDialog( _(&#039;Are you sure you want to make this?&#039;), dojo.hitch( this, function() {&lt;br /&gt;
            this.ajaxcall( &#039;/mygame/mygame/makeThis.html&#039;, { lock:true }, this, function( result ) {} );&lt;br /&gt;
        } ) );   &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, using dojo.hitch, we are sure that the &amp;quot;this&amp;quot; object will be set when the callback is called.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; updateCounters(counters)&lt;br /&gt;
: Useful for updating game counters in the player panel (such as resources). &lt;br /&gt;
: &#039;counters&#039; arg is an associative array [counter_name_value =&amp;gt; [ &#039;counter_name&#039; =&amp;gt; counter_name_value, &#039;counter_value&#039; =&amp;gt; counter_value_value], ... ]&lt;br /&gt;
: All counters must be referenced in this.gamedatas.counters and will be updated.&lt;br /&gt;
: DOM objects referenced by &#039;counter_name&#039; will have their innerHTML updated with &#039;counter_value&#039;.&lt;br /&gt;
&lt;br /&gt;
== BGA GUI components ==&lt;br /&gt;
&lt;br /&gt;
BGA framework provides some useful ready-to-use components for the game interface:&lt;br /&gt;
&lt;br /&gt;
[[Studio#BGA_Studio_game_components_reference]]&lt;br /&gt;
&lt;br /&gt;
Note that each time you are using an additional component, you must declare it at the top of your Javascript file in the list of modules used.&lt;br /&gt;
&lt;br /&gt;
Example if you are using &amp;quot;ebg.stock&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define([&lt;br /&gt;
    &amp;quot;dojo&amp;quot;,&amp;quot;dojo/_base/declare&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/core/gamegui&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/counter&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/stock&amp;quot;  /// &amp;lt;=== we are using ebg.stock module&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1078</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1078"/>
		<updated>2014-02-22T19:51:24Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Help]]&lt;br /&gt;
&lt;br /&gt;
== General questions ==&lt;br /&gt;
&lt;br /&gt;
===What is Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena (BGA) is an online board game platform. With BGA, you can play online and in real time against players from the whole world. A selection of various board games and card games is available. In order to play, the only thing you need is your browser!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What do you mean by &amp;quot;real time play&amp;quot;?===&lt;br /&gt;
&lt;br /&gt;
You can find many websites where you can play board games with a &amp;quot;turn based&amp;quot; approach: after each move, you have to wait for your opponents to connect to the website and play their own move. Most of the time, you have to wait a long time between each move, and games take a long time to finish (if they ever do).&lt;br /&gt;
&lt;br /&gt;
On Board Game Arena, your opponents are connected to the game platform all along the game, and they can see your moves and react to them immediately - as is the case in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What do I need to play?===&lt;br /&gt;
&lt;br /&gt;
Your browser ... and that&#039;s it!&lt;br /&gt;
&lt;br /&gt;
Board Game Arena does not require anything else on your computer. Thus, you can play from any computer, anywhere, anytime!&lt;br /&gt;
&lt;br /&gt;
In order to make this thing possible, we are using the very latest technologies available for the web. This is the reason you should play with the most up to date web browsers to enjoy an optimal BGA experience (read more about our [[Browser_support|browser policy]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How much does it cost to play on BGA?===&lt;br /&gt;
&lt;br /&gt;
Playing on BGA is free.&lt;br /&gt;
&lt;br /&gt;
You can also choose to help us by making a donation and becoming a [http://en.boardgamearena.com/#!club Board Game Arena club] member.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What are the games available on BGA?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena proposes a various selection of board and card games, but is specialized in modern (&amp;quot;European style&amp;quot;) adult games.&lt;br /&gt;
&lt;br /&gt;
[http://en.boardgamearena.com/#!gamelist See available games].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What can I do if I have an issue with the website?===&lt;br /&gt;
&lt;br /&gt;
Most of the issues one can encounter on this website should be solved with a simple web page refresh (or &amp;quot;F5&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you experience persistent issues, you can browse the [http://forum.boardgamearena.com/viewforum.php?f=4 bug section in the forum], see if someone already reported the issue, and add a new bug report if that&#039;s not the case. Please take some time to describe the bug you are reporting in detail so that we can quickly reproduce and fix it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is the legal status of this website?===&lt;br /&gt;
&lt;br /&gt;
All the games currently available on this site have been licensed or otherwise authorized by copyright holders. Please be aware that games available on BGA can be removed at the copyright holders demand (for example: if they publish their own adaptation of the game).&lt;br /&gt;
&lt;br /&gt;
Board Game Arena would like to thank all game publishers and game designers who allow us to have their games here, thus making it possible for this website to exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===I&#039;m a game publisher: why would I like to have my game on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
The main goal of Board Game Arena is to make it easy for people to discover and love new games. We think that there is only two kinds of players on Board Game Arena: those who already bought the games they are playing online, and those who dream to buy them soon!&lt;br /&gt;
&lt;br /&gt;
As the activity of this website contributes to increasing a game&#039;s popularity and thus generates game boxes sales in the &amp;quot;real world&amp;quot;, we think it is beneficial to the boardgame community: people from all over the world can play online, we can have fun developing this game platform to the best of our ability, and game publishers get money from the box sales and build a special relationship with their players community.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Meeting players and starting games ==&lt;br /&gt;
&lt;br /&gt;
===I launched a new table but nobody is joining?===&lt;br /&gt;
&lt;br /&gt;
Although Board Game Arena has been enjoying a growing popularity, it is still a young website. For the most popular games, you can find players at any time of the day. For other games, we advise you to come back at peak hour (around 22:00 CEST) if you can&#039;t find opponents at the moment.&lt;br /&gt;
&lt;br /&gt;
Tip: check the number of online/available players for a game before launching the table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===I joined a game. When does the game start?===&lt;br /&gt;
&lt;br /&gt;
Each table has an administrator, which is the table creator. It is the responsibility of the table administrator to start the game when he is satisfied with the number of players having joined the table.&lt;br /&gt;
&lt;br /&gt;
If you are the table administrator and can&#039;t launch the game, most of the time it&#039;s because there is not yet enough players joined the table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the small color circle next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/online_.png : this player is active. He completed an action very recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/inactive_.png : this player is inactive. He is connected to the website but did not perform any action recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/offline_.png : this player is offline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What does the &#039;% hits&#039; statistic mean?===&lt;br /&gt;
% hits = number of victory points / number of games played&lt;br /&gt;
&lt;br /&gt;
Where number of victory points is the following:&lt;br /&gt;
* When you win a 2 players game: 1 point.&lt;br /&gt;
* When you win a 3 players game: 1.5 points.&lt;br /&gt;
* When you win a 4 players game: 2 points.&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
This way, &amp;quot;50%&amp;quot; means that you win 50% of 2 players game, or 33% of 3 players game, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== During the game ==&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the icons next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player.gif : this player must make a move now.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_clockalert.gif : this player must make a move now, and he has spent his reflexion time. Can someone wake him up? ;)&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_nonack.gif : this player must make a move now, but is probably not aware of the fact. If the situation does not evolve, it might be that this player has some connection issue.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/common/zombie.png : this player is a &amp;quot;zombie&amp;quot; (he left the game or has been fired from the game). The game goes on without this player.&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;normal&amp;quot; avatar of a player is displayed, it means that this player is waiting for his turn to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A player has to make a move but he/she doesn&#039;t. What can I do?===&lt;br /&gt;
&lt;br /&gt;
* First, please remember that this player has the right to think as long as he needs to about is next move...  well as long as he still has some time left on the game clock, that is.&lt;br /&gt;
* Then you can ask this player to confirm that he is still thinking about how to play.&lt;br /&gt;
* If this player seems to be away, we advise you to wait a few  minutes: this player may be experiencing some network problems or have left his computer temporarily.&lt;br /&gt;
* If the player is not coming back, you can expel him from the game as soon as he is running out of time on the game clock for the current move (red bar) or if he goes over his alloted time to think by more than 3/4/5 minutes (depending on game speed). See Clock section for details.  Important: in this case, no ELO points will be won by anybody for this game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is the current progression of the game I&#039;m playing?===&lt;br /&gt;
&lt;br /&gt;
A percentage of progression is displayed on the top of the web page.&lt;br /&gt;
There is also a progress bar at the bottom of the web page shows you the current progression of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is forbidden on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Leaving a game in progress on purpose.&lt;br /&gt;
* Taking an unnecessary and unreasonable amount of time at the end of game in an obvious losing situation.&lt;br /&gt;
* Kingmaking: enabling another player to win on purpose while there is a better move to make for yourself.&lt;br /&gt;
* Running out of time on the game clock.&lt;br /&gt;
* Giving some piece of information about the current game situation that corrupts the normal game flow.&lt;br /&gt;
* Communicating with another player about the game privately (ex: with MSN).&lt;br /&gt;
* Provocation / triumphalism / defeatism ... anything which is not fair play.&lt;br /&gt;
* Having a shocking avatar (no advertisement, no politics, ...)&lt;br /&gt;
&lt;br /&gt;
Going against these rules will affect your reputation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is absolutely forbidden in Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Creating multiple accounts and playing against oneself.&lt;br /&gt;
* Insulting other players in any manner.&lt;br /&gt;
&lt;br /&gt;
Going against these rules can lead to the removal of your account and/or to the blacklisting of your IP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What if some player does something wrong?===&lt;br /&gt;
&lt;br /&gt;
The Board Game Arena platform has been designed to encourage players to maintain good behavior. The reputation system allows you to distinguish between good and bad players. Then, it is up to you to decide whether to start a game with them or not.&lt;br /&gt;
&lt;br /&gt;
If you think some player has had bad behavior during a game, you can give him a at the end of the game.&lt;br /&gt;
&lt;br /&gt;
If you think some player committed some serious wrongdoing during a game (ex: insult), please report this player to us (&amp;quot;report this player&amp;quot; link from his profile or game result page) so that we can take appropriate measures.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Contact_us&amp;diff=1021</id>
		<title>Contact us</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Contact_us&amp;diff=1021"/>
		<updated>2013-12-18T21:14:23Z</updated>

		<summary type="html">&lt;p&gt;Een: Reverted edits by Januszk0 (talk) to last revision by Sourisdudesert&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Board Game Arena&#039;&#039;&#039; is located in France.&lt;br /&gt;
&lt;br /&gt;
== Contact e-mail ==&lt;br /&gt;
&lt;br /&gt;
contact(at)boardgamearena.com&lt;br /&gt;
&lt;br /&gt;
We receive &#039;&#039;&#039;a lot&#039;&#039;&#039; of e-mails. Please do not send us an e-mail in any of these two cases:&lt;br /&gt;
&lt;br /&gt;
* If you want to report a bug, please do it in the [http://boardgamearena.com/#!bugs bug reporting system]&lt;br /&gt;
* If you want to report a player for violation of BGA policy, use the &amp;quot;report this player&amp;quot; button on his/her profile.&lt;br /&gt;
&lt;br /&gt;
== Postal address ==&lt;br /&gt;
&lt;br /&gt;
G. Isabelli&lt;br /&gt;
&lt;br /&gt;
19 bd république&lt;br /&gt;
&lt;br /&gt;
92 260 Fontenay-aux-Roses&lt;br /&gt;
&lt;br /&gt;
FRANCE&lt;br /&gt;
&lt;br /&gt;
+33 6 17 25 80 34&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=BGA_Game_licences&amp;diff=973</id>
		<title>BGA Game licences</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=BGA_Game_licences&amp;diff=973"/>
		<updated>2013-10-01T20:56:18Z</updated>

		<summary type="html">&lt;p&gt;Een: moved BGA Game licences to BGA Game licenses: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[BGA Game licenses]]&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=BGA_Game_licenses&amp;diff=972</id>
		<title>BGA Game licenses</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=BGA_Game_licenses&amp;diff=972"/>
		<updated>2013-10-01T20:56:18Z</updated>

		<summary type="html">&lt;p&gt;Een: moved BGA Game licences to BGA Game licenses: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== What is a &amp;quot;license&amp;quot; exactly? ==&lt;br /&gt;
&lt;br /&gt;
Almost all games on the Board Game Arena platform are adaptations of existing commercial &amp;quot;real&amp;quot; board games. In order to host an adaptation of one of these board games on a website, the copyright owners must first grant a license/authorisation to this website.&lt;br /&gt;
&lt;br /&gt;
== Are all games on BGA licensed by their respective copyright owners? ==&lt;br /&gt;
&lt;br /&gt;
Yes, for all games that are not in the public domain, BGA has been granted an authorisation to create and host an online version.&lt;br /&gt;
&lt;br /&gt;
== Where can I find a list of games for which a license has already been granted? ==&lt;br /&gt;
&lt;br /&gt;
[http://en.studio.boardgamearena.com/#!page/availablelicences Check the list of available licenses]&lt;br /&gt;
&lt;br /&gt;
(NB: this page is restricted to developers registered in BGA studio. You&#039;ll need to enter your BGA studio credentials to access it)&lt;br /&gt;
&lt;br /&gt;
== What if I start developing a game that is not on the &amp;quot;Available licences&amp;quot; list? ==&lt;br /&gt;
&lt;br /&gt;
We allow developers to start any project in the Studio. But when you submit your project to go live on BGA, it will be rejected during the review process if BGA doesn&#039;t hold a proper license for the game.&lt;br /&gt;
&lt;br /&gt;
Exception: games in the public domain are of course not concerned.&lt;br /&gt;
&lt;br /&gt;
== Wow, I WANT to develop a game on this list! ==&lt;br /&gt;
&lt;br /&gt;
Great! :)&lt;br /&gt;
&lt;br /&gt;
But before creating a new project, please takes some seconds to check that someone is not already developing this game. If it is the case, maybe you can propose to join the project?&lt;br /&gt;
&lt;br /&gt;
[http://en.studio.boardgamearena.com/#!projects Check the list of current projects]&lt;br /&gt;
&lt;br /&gt;
== What needs to be done to add a game on this list? ==&lt;br /&gt;
&lt;br /&gt;
The copyright owners have to give an license/authorisation to BGA.&lt;br /&gt;
&lt;br /&gt;
Publishers do not have to pay anything to BGA for this, they just need to give their &amp;quot;go&amp;quot;. Most of the time, publishers want to have a formal agreement and we sign a contract with them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: you CAN&#039;T take the initiative to ask a license authorization on behalf of BGA, because the authorisation has to be granted to BGA (read more below).&lt;br /&gt;
&lt;br /&gt;
== Why aren&#039;t all the best-selling games that I love on that list? ==&lt;br /&gt;
&lt;br /&gt;
As you can imagine, the more popular a game is, the most difficult it can be to get an agreement to host this game on BGA.&lt;br /&gt;
&lt;br /&gt;
So if you are thinking about a very popular game that is not on this list, the reason is most likely &amp;quot;we asked but it was not possible&amp;quot; and not &amp;quot;we didn&#039;t think of it&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We are really happy to have been able to build a very nice platform that managed to convince some of the most prestigious publishers to host their games here, but of course we can&#039;t convince -everyone-.&lt;br /&gt;
&lt;br /&gt;
== I want to make my prototype/unpublished game available on BGA ==&lt;br /&gt;
&lt;br /&gt;
This is possible, BUT most of the time, we consider this is a bad idea for the following reasons:&lt;br /&gt;
* if your game has not been published yet, there is certainly a good reason - most of the time there is still some more work to do on the game itself. Publishing a game on BGA that is not 100% finalized won&#039;t help you to finalize it.&lt;br /&gt;
* as a rule of thumb, popular board games on BGA are games that are popular in the real world. As a consequence prototypes most likely won&#039;t get a big audience on BGA.&lt;br /&gt;
* we also advise you against developing your own game: games adaptation are better when there is a designer whose focus is on the gameplay and a developer whose focus is on the implementation.&lt;br /&gt;
&lt;br /&gt;
So you definitely can develop your prototype/unpublished game on BGA, but we encourage you to think twice about it and do it only if you are in one/several of the situations below:&lt;br /&gt;
* the game is going to be published in the near future&lt;br /&gt;
* the game design process is really 100% done: the game is ready to be published in its current shape (ex: self-publishing game, game in a crowdfunding process...)&lt;br /&gt;
* you want to test your game with a big number of players to fine-tune some minor things (&amp;quot;balance&amp;quot; of the game).&lt;br /&gt;
&lt;br /&gt;
== What if I really want to develop a particular game that is NOT on the list below? ==&lt;br /&gt;
&lt;br /&gt;
This is the most frequently asked question, so for a detailed answer please follow the white rabbit down these numbered instructions:&lt;br /&gt;
&lt;br /&gt;
=== 0: ===&lt;br /&gt;
&lt;br /&gt;
In any case: please, do not contact publishers without asking us before. Just put yourself in the shoes of a game publisher who just published a popular game: what would you think if you received 40 emails from 40 developers speaking about some &amp;quot;BGA platform&amp;quot; and wanting to build an adaptation on it?&lt;br /&gt;
&lt;br /&gt;
Proceed to 1.&lt;br /&gt;
&lt;br /&gt;
=== 1: ===&lt;br /&gt;
&lt;br /&gt;
First, you should determine who is the owner of the digital rights of the game. Most of the time, this is the original publisher of the game. The original publisher is not always easy to find, because very often board games are translated and published in different countries by a local publisher.&lt;br /&gt;
&lt;br /&gt;
To find the original publisher:&lt;br /&gt;
* check in which country the game has been published first (ex: If it&#039;s in Poland, the original publisher is probably Polish).&lt;br /&gt;
* check the copyright notice at the end of the rules, where the original publisher is mentioned almost every time.&lt;br /&gt;
* very often, if two publishers are mentioned on a gamebox, the well-known publisher is the local publisher from your country and the other one is the original publisher.&lt;br /&gt;
&lt;br /&gt;
Special case: if the game is themed with a prestigious licence (Star Wars, Lord of the Rings, some TV show, some well known novel...), you can stop here immediately: contracts between game publishers and prestigious licenses owners are very restrictive, and there is 99% chance that an online adaptation on BGA would be impossible to manage.&lt;br /&gt;
&lt;br /&gt;
Continue to 2.&lt;br /&gt;
&lt;br /&gt;
=== 2: ===&lt;br /&gt;
&lt;br /&gt;
Read the list of publishers from the &amp;quot;available licenses&amp;quot; page to check if BGA is already working with this publisher.&lt;br /&gt;
&lt;br /&gt;
If YES, proceed to 3.&lt;br /&gt;
If NO, jump to 4.&lt;br /&gt;
&lt;br /&gt;
However, if the publisher is listed as &amp;quot;not working with BGA&amp;quot;, you can stop here immediately. It happens that some publishers are not convinced or interested by online boardgaming and it is their right to think so. The BGA team regularly meets new publishers during board games events to show them the platform, so we&#039;re working on this but -again- we cannot convince everyone.&lt;br /&gt;
&lt;br /&gt;
=== 3: ===&lt;br /&gt;
&lt;br /&gt;
Is there already in the list a game licensed by this publisher that is available to be developed or under development?&lt;br /&gt;
&lt;br /&gt;
If YES: as a rule of thumb, we do not ask more than one game to a publisher at a time. When we ask a license for a game, the publisher naturally expects that this game will be developed and published online. So we develop and publish a game before asking for another.&lt;br /&gt;
If you really want to develop another game from this particular publisher, the best option for you is to help develop the game that is currently licensed and then ask us to request the game you&#039;d like to develop.&lt;br /&gt;
&lt;br /&gt;
If NO: just ask us which game you want to develop and we will be happy to ask the publisher for his authorisation.&lt;br /&gt;
&lt;br /&gt;
=== 4: ===&lt;br /&gt;
&lt;br /&gt;
We have never worked with this publisher before.&lt;br /&gt;
&lt;br /&gt;
If you have already developed a game on BGA, we will be happy to contact the publisher to ask for an authorisation :)&lt;br /&gt;
&lt;br /&gt;
If this is your first game on BGA, we advise you to start with a game already on the list. Why? Because unfortunately, some developers ask us to request a license, and then don&#039;t finish the development. When we ask for a license, we are more comfortable if you have already shown your ability to realise an adaptation.&lt;br /&gt;
&lt;br /&gt;
Special case: if you know the publisher PERSONALLY, or have some contact there, please tell us so we can help you setup a contract allowing us to host a game adaptation on BGA.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=BGA_Game_licenses&amp;diff=971</id>
		<title>BGA Game licenses</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=BGA_Game_licenses&amp;diff=971"/>
		<updated>2013-10-01T20:54:58Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== What is a &amp;quot;license&amp;quot; exactly? ==&lt;br /&gt;
&lt;br /&gt;
Almost all games on the Board Game Arena platform are adaptations of existing commercial &amp;quot;real&amp;quot; board games. In order to host an adaptation of one of these board games on a website, the copyright owners must first grant a license/authorisation to this website.&lt;br /&gt;
&lt;br /&gt;
== Are all games on BGA licensed by their respective copyright owners? ==&lt;br /&gt;
&lt;br /&gt;
Yes, for all games that are not in the public domain, BGA has been granted an authorisation to create and host an online version.&lt;br /&gt;
&lt;br /&gt;
== Where can I find a list of games for which a license has already been granted? ==&lt;br /&gt;
&lt;br /&gt;
[http://en.studio.boardgamearena.com/#!page/availablelicences Check the list of available licenses]&lt;br /&gt;
&lt;br /&gt;
(NB: this page is restricted to developers registered in BGA studio. You&#039;ll need to enter your BGA studio credentials to access it)&lt;br /&gt;
&lt;br /&gt;
== What if I start developing a game that is not on the &amp;quot;Available licences&amp;quot; list? ==&lt;br /&gt;
&lt;br /&gt;
We allow developers to start any project in the Studio. But when you submit your project to go live on BGA, it will be rejected during the review process if BGA doesn&#039;t hold a proper license for the game.&lt;br /&gt;
&lt;br /&gt;
Exception: games in the public domain are of course not concerned.&lt;br /&gt;
&lt;br /&gt;
== Wow, I WANT to develop a game on this list! ==&lt;br /&gt;
&lt;br /&gt;
Great! :)&lt;br /&gt;
&lt;br /&gt;
But before creating a new project, please takes some seconds to check that someone is not already developing this game. If it is the case, maybe you can propose to join the project?&lt;br /&gt;
&lt;br /&gt;
[http://en.studio.boardgamearena.com/#!projects Check the list of current projects]&lt;br /&gt;
&lt;br /&gt;
== What needs to be done to add a game on this list? ==&lt;br /&gt;
&lt;br /&gt;
The copyright owners have to give an license/authorisation to BGA.&lt;br /&gt;
&lt;br /&gt;
Publishers do not have to pay anything to BGA for this, they just need to give their &amp;quot;go&amp;quot;. Most of the time, publishers want to have a formal agreement and we sign a contract with them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: you CAN&#039;T take the initiative to ask a license authorization on behalf of BGA, because the authorisation has to be granted to BGA (read more below).&lt;br /&gt;
&lt;br /&gt;
== Why aren&#039;t all the best-selling games that I love on that list? ==&lt;br /&gt;
&lt;br /&gt;
As you can imagine, the more popular a game is, the most difficult it can be to get an agreement to host this game on BGA.&lt;br /&gt;
&lt;br /&gt;
So if you are thinking about a very popular game that is not on this list, the reason is most likely &amp;quot;we asked but it was not possible&amp;quot; and not &amp;quot;we didn&#039;t think of it&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We are really happy to have been able to build a very nice platform that managed to convince some of the most prestigious publishers to host their games here, but of course we can&#039;t convince -everyone-.&lt;br /&gt;
&lt;br /&gt;
== I want to make my prototype/unpublished game available on BGA ==&lt;br /&gt;
&lt;br /&gt;
This is possible, BUT most of the time, we consider this is a bad idea for the following reasons:&lt;br /&gt;
* if your game has not been published yet, there is certainly a good reason - most of the time there is still some more work to do on the game itself. Publishing a game on BGA that is not 100% finalized won&#039;t help you to finalize it.&lt;br /&gt;
* as a rule of thumb, popular board games on BGA are games that are popular in the real world. As a consequence prototypes most likely won&#039;t get a big audience on BGA.&lt;br /&gt;
* we also advise you against developing your own game: games adaptation are better when there is a designer whose focus is on the gameplay and a developer whose focus is on the implementation.&lt;br /&gt;
&lt;br /&gt;
So you definitely can develop your prototype/unpublished game on BGA, but we encourage you to think twice about it and do it only if you are in one/several of the situations below:&lt;br /&gt;
* the game is going to be published in the near future&lt;br /&gt;
* the game design process is really 100% done: the game is ready to be published in its current shape (ex: self-publishing game, game in a crowdfunding process...)&lt;br /&gt;
* you want to test your game with a big number of players to fine-tune some minor things (&amp;quot;balance&amp;quot; of the game).&lt;br /&gt;
&lt;br /&gt;
== What if I really want to develop a particular game that is NOT on the list below? ==&lt;br /&gt;
&lt;br /&gt;
This is the most frequently asked question, so for a detailed answer please follow the white rabbit down these numbered instructions:&lt;br /&gt;
&lt;br /&gt;
=== 0: ===&lt;br /&gt;
&lt;br /&gt;
In any case: please, do not contact publishers without asking us before. Just put yourself in the shoes of a game publisher who just published a popular game: what would you think if you received 40 emails from 40 developers speaking about some &amp;quot;BGA platform&amp;quot; and wanting to build an adaptation on it?&lt;br /&gt;
&lt;br /&gt;
Proceed to 1.&lt;br /&gt;
&lt;br /&gt;
=== 1: ===&lt;br /&gt;
&lt;br /&gt;
First, you should determine who is the owner of the digital rights of the game. Most of the time, this is the original publisher of the game. The original publisher is not always easy to find, because very often board games are translated and published in different countries by a local publisher.&lt;br /&gt;
&lt;br /&gt;
To find the original publisher:&lt;br /&gt;
* check in which country the game has been published first (ex: If it&#039;s in Poland, the original publisher is probably Polish).&lt;br /&gt;
* check the copyright notice at the end of the rules, where the original publisher is mentioned almost every time.&lt;br /&gt;
* very often, if two publishers are mentioned on a gamebox, the well-known publisher is the local publisher from your country and the other one is the original publisher.&lt;br /&gt;
&lt;br /&gt;
Special case: if the game is themed with a prestigious licence (Star Wars, Lord of the Rings, some TV show, some well known novel...), you can stop here immediately: contracts between game publishers and prestigious licenses owners are very restrictive, and there is 99% chance that an online adaptation on BGA would be impossible to manage.&lt;br /&gt;
&lt;br /&gt;
Continue to 2.&lt;br /&gt;
&lt;br /&gt;
=== 2: ===&lt;br /&gt;
&lt;br /&gt;
Read the list of publishers from the &amp;quot;available licenses&amp;quot; page to check if BGA is already working with this publisher.&lt;br /&gt;
&lt;br /&gt;
If YES, proceed to 3.&lt;br /&gt;
If NO, jump to 4.&lt;br /&gt;
&lt;br /&gt;
However, if the publisher is listed as &amp;quot;not working with BGA&amp;quot;, you can stop here immediately. It happens that some publishers are not convinced or interested by online boardgaming and it is their right to think so. The BGA team regularly meets new publishers during board games events to show them the platform, so we&#039;re working on this but -again- we cannot convince everyone.&lt;br /&gt;
&lt;br /&gt;
=== 3: ===&lt;br /&gt;
&lt;br /&gt;
Is there already in the list a game licensed by this publisher that is available to be developed or under development?&lt;br /&gt;
&lt;br /&gt;
If YES: as a rule of thumb, we do not ask more than one game to a publisher at a time. When we ask a license for a game, the publisher naturally expects that this game will be developed and published online. So we develop and publish a game before asking for another.&lt;br /&gt;
If you really want to develop another game from this particular publisher, the best option for you is to help develop the game that is currently licensed and then ask us to request the game you&#039;d like to develop.&lt;br /&gt;
&lt;br /&gt;
If NO: just ask us which game you want to develop and we will be happy to ask the publisher for his authorisation.&lt;br /&gt;
&lt;br /&gt;
=== 4: ===&lt;br /&gt;
&lt;br /&gt;
We have never worked with this publisher before.&lt;br /&gt;
&lt;br /&gt;
If you have already developed a game on BGA, we will be happy to contact the publisher to ask for an authorisation :)&lt;br /&gt;
&lt;br /&gt;
If this is your first game on BGA, we advise you to start with a game already on the list. Why? Because unfortunately, some developers ask us to request a license, and then don&#039;t finish the development. When we ask for a license, we are more comfortable if you have already shown your ability to realise an adaptation.&lt;br /&gt;
&lt;br /&gt;
Special case: if you know the publisher PERSONALLY, or have some contact there, please tell us so we can help you setup a contract allowing us to host a game adaptation on BGA.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=BGA_Game_licenses&amp;diff=970</id>
		<title>BGA Game licenses</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=BGA_Game_licenses&amp;diff=970"/>
		<updated>2013-10-01T20:52:40Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== What&#039;s a &amp;quot;license&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Almost all games on the Board Game Arena platform are adaptations of existing commercial &amp;quot;real&amp;quot; board games. In order to host an adaptation of one of these board games on a website, the copyright owners must first grant a license/authorisation to this website.&lt;br /&gt;
&lt;br /&gt;
== Are all games on BGA licensed by their respective copyright owners? ==&lt;br /&gt;
&lt;br /&gt;
Yes, for all games that are not in the public domain, BGA has been granted an authorisation to create and host an online version.&lt;br /&gt;
&lt;br /&gt;
== Where can I find a list of games for which a license has already been granted? ==&lt;br /&gt;
&lt;br /&gt;
[http://en.studio.boardgamearena.com/#!page/availablelicences Check the list of available licenses]&lt;br /&gt;
&lt;br /&gt;
(NB: this page is restricted to developers registered in BGA studio. You&#039;ll need to enter your BGA studio credentials to access it)&lt;br /&gt;
&lt;br /&gt;
== What if I start developing a game that is not on the &amp;quot;Available licences&amp;quot; list? ==&lt;br /&gt;
&lt;br /&gt;
We allow developers to start any project in the Studio. But when you submit your project to go live on BGA, it will be rejected during the review process if BGA doesn&#039;t hold a proper license for the game.&lt;br /&gt;
&lt;br /&gt;
Exception: games in the public domain are of course not concerned.&lt;br /&gt;
&lt;br /&gt;
== Wow, I WANT to develop a game on this list! ==&lt;br /&gt;
&lt;br /&gt;
Great! :)&lt;br /&gt;
&lt;br /&gt;
But before creating a new project, please takes some seconds to check that someone is not already developing this game. If it is the case, maybe you can propose to join the project?&lt;br /&gt;
&lt;br /&gt;
[http://en.studio.boardgamearena.com/#!projects Check the list of current projects]&lt;br /&gt;
&lt;br /&gt;
== What needs to be done to add a game on this list? ==&lt;br /&gt;
&lt;br /&gt;
The copyright owners have to give an license/authorisation to BGA.&lt;br /&gt;
&lt;br /&gt;
Publishers do not have to pay anything to BGA for this, they just need to give their &amp;quot;go&amp;quot;. Most of the time, publishers want to have a formal agreement and we sign a contract with them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: you CAN&#039;T take the initiative to ask a license authorization on behalf of BGA, because the authorisation has to be granted to BGA (read more below).&lt;br /&gt;
&lt;br /&gt;
== Why aren&#039;t all the best-selling games that I love on that list? ==&lt;br /&gt;
&lt;br /&gt;
As you can imagine, the more popular a game is, the most difficult it can be to get an agreement to host this game on BGA.&lt;br /&gt;
&lt;br /&gt;
So if you are thinking about a very popular game that is not on this list, the reason is most likely &amp;quot;we asked but it was not possible&amp;quot; and not &amp;quot;we didn&#039;t think of it&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We are really happy to have been able to build a very nice platform that managed to convince some of the most prestigious publishers to host their games here, but of course we can&#039;t convince -everyone-.&lt;br /&gt;
&lt;br /&gt;
== I want to make my prototype/unpublished game available on BGA ==&lt;br /&gt;
&lt;br /&gt;
This is possible, BUT most of the time, we consider this is a bad idea for the following reasons:&lt;br /&gt;
* if your game has not been published yet, there is certainly a good reason - most of the time there is still some more work to do on the game itself. Publishing a game on BGA that is not 100% finalized won&#039;t help you to finalize it.&lt;br /&gt;
* as a rule of thumb, popular board games on BGA are games that are popular in the real world. As a consequence prototypes most likely won&#039;t get a big audience on BGA.&lt;br /&gt;
* we also advise you against developing your own game: games adaptation are better when there is a designer whose focus is on the gameplay and a developer whose focus is on the implementation.&lt;br /&gt;
&lt;br /&gt;
So you definitely can develop your prototype/unpublished game on BGA, but we encourage you to think twice about it and do it only if you are in one/several of the situations below:&lt;br /&gt;
* the game is going to be published in the near future&lt;br /&gt;
* the game design process is really 100% done: the game is ready to be published in its current shape (ex: self-publishing game, game in a crowdfunding process...)&lt;br /&gt;
* you want to test your game with a big number of players to fine-tune some minor things (&amp;quot;balance&amp;quot; of the game).&lt;br /&gt;
&lt;br /&gt;
== What if I really want to develop a particular game that is NOT on the list below? ==&lt;br /&gt;
&lt;br /&gt;
This is the most frequently asked question, so for a detailed answer please follow the white rabbit down these numbered instructions:&lt;br /&gt;
&lt;br /&gt;
=== 0: ===&lt;br /&gt;
&lt;br /&gt;
In any case: please, do not contact publishers without asking us before. Just put yourself in the shoes of a game publisher who just published a popular game: what would you think if you received 40 emails from 40 developers speaking about some &amp;quot;BGA platform&amp;quot; and wanting to build an adaptation on it?&lt;br /&gt;
&lt;br /&gt;
Proceed to 1.&lt;br /&gt;
&lt;br /&gt;
=== 1: ===&lt;br /&gt;
&lt;br /&gt;
First, you should determine who is the owner of the digital rights of the game. Most of the time, this is the original publisher of the game. The original publisher is not always easy to find, because very often board games are translated and published in different countries by a local publisher.&lt;br /&gt;
&lt;br /&gt;
To find the original publisher:&lt;br /&gt;
* check in which country the game has been published first (ex: If it&#039;s in Poland, the original publisher is probably Polish).&lt;br /&gt;
* check the copyright notice at the end of the rules, where the original publisher is mentioned almost every time.&lt;br /&gt;
* very often, if two publishers are mentioned on a gamebox, the well-known publisher is the local publisher from your country and the other one is the original publisher.&lt;br /&gt;
&lt;br /&gt;
Special case: if the game is themed with a prestigious licence (Star Wars, Lord of the Rings, some TV show, some well known novel...), you can stop here immediately: contracts between game publishers and prestigious licenses owners are very restrictive, and there is 99% chance that an online adaptation on BGA would be impossible to manage.&lt;br /&gt;
&lt;br /&gt;
Continue to 2.&lt;br /&gt;
&lt;br /&gt;
=== 2: ===&lt;br /&gt;
&lt;br /&gt;
Read the list of publishers from the &amp;quot;available licenses&amp;quot; page to check if BGA is already working with this publisher.&lt;br /&gt;
&lt;br /&gt;
If YES, proceed to 3.&lt;br /&gt;
If NO, jump to 4.&lt;br /&gt;
&lt;br /&gt;
However, if the publisher is listed as &amp;quot;not working with BGA&amp;quot;, you can stop here immediately. It happens that some publishers are not convinced or interested by online boardgaming and it is their right to think so. The BGA team regularly meets new publishers during board games events to show them the platform, so we&#039;re working on this but -again- we cannot convince everyone.&lt;br /&gt;
&lt;br /&gt;
=== 3: ===&lt;br /&gt;
&lt;br /&gt;
Is there already in the list a game licensed by this publisher that is available to be developed or under development?&lt;br /&gt;
&lt;br /&gt;
If YES: as a rule of thumb, we do not ask more than one game to a publisher at a time. When we ask a license for a game, the publisher naturally expects that this game will be developed and published online. So we develop and publish a game before asking for another.&lt;br /&gt;
If you really want to develop another game from this particular publisher, the best option for you is to help develop the game that is currently licensed and then ask us to request the game you&#039;d like to develop.&lt;br /&gt;
&lt;br /&gt;
If NO: just ask us which game you want to develop and we will be happy to ask the publisher for his authorisation.&lt;br /&gt;
&lt;br /&gt;
=== 4: ===&lt;br /&gt;
&lt;br /&gt;
We have never worked with this publisher before.&lt;br /&gt;
&lt;br /&gt;
If you have already developed a game on BGA, we will be happy to contact the publisher to ask for an authorisation :)&lt;br /&gt;
&lt;br /&gt;
If this is your first game on BGA, we advise you to start with a game already on the list. Why? Because unfortunately, some developers ask us to request a license, and then don&#039;t finish the development. When we ask for a license, we are more comfortable if you have already shown your ability to realise an adaptation.&lt;br /&gt;
&lt;br /&gt;
Special case: if you know the publisher PERSONALLY, or have some contact there, please tell us so we can help you setup a contract allowing us to host a game adaptation on BGA.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Browser_support&amp;diff=969</id>
		<title>Browser support</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Browser_support&amp;diff=969"/>
		<updated>2013-10-01T19:11:36Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;For the best experience, we recommend:&amp;lt;/h3&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Google Chrome 10+&#039;&#039;&#039; [http://www.google.com/chrome Windows] [http://www.google.com/chrome?platform=mac Mac] [http://www.google.com/chrome?platform=linux Linux]&lt;br /&gt;
* &#039;&#039;&#039;Mozilla Firefox 4+&#039;&#039;&#039; [http://www.mozilla.org/products/firefox/ Windows] [http://www.mozilla.org/products/firefox/ Mac] [http://www.mozilla.org/products/firefox/ Linux]&lt;br /&gt;
&lt;br /&gt;
Board Game Arena takes advantage of the most recent web technology to make it possible for you to play without installing anything on your computer: no software to download or update, no plugins to install, etc. &lt;br /&gt;
Consequently, to play you need to use a modern web browser. Generally speaking, the more recent your web browser is, the more pleasant your game experience on Board Game Arena will be. &lt;br /&gt;
&lt;br /&gt;
This website makes intensive use of Javascript and your browser&#039;s graphics capabilities. Thus, if you want to have the best gaming experience with Board Game Arena, you should use one of the browsers listed above. However, we officially support the following browsers:&lt;br /&gt;
&lt;br /&gt;
* Google Chrome 4+&lt;br /&gt;
* Mozilla Firefox 3.5+&lt;br /&gt;
* Internet Explorer 9+&lt;br /&gt;
* Safari 4+&lt;br /&gt;
&lt;br /&gt;
(Note: We do NOT support playing on iPads or similar tablets.)&lt;br /&gt;
&lt;br /&gt;
[[Category:Help]]&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=968</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Faq&amp;diff=968"/>
		<updated>2013-10-01T19:06:03Z</updated>

		<summary type="html">&lt;p&gt;Een: /* What do I need to play? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Help]]&lt;br /&gt;
&lt;br /&gt;
== General questions ==&lt;br /&gt;
&lt;br /&gt;
===What is Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena (BGA) is an online board game platform. With BGA, you can play online and in real time against players from the whole world. A selection of various board games and card games is available. In order to play, the only thing you need is your browser!&lt;br /&gt;
&lt;br /&gt;
===What do you mean by &amp;quot;real time play&amp;quot;?===&lt;br /&gt;
&lt;br /&gt;
You can find many websites where you can play board games with a &amp;quot;turn based&amp;quot; approach: after each move, you have to wait for your opponents to connect to the website and play their own move. Most of the time, you have to wait a long time between each move, and games take a long time to finish (if they ever do).&lt;br /&gt;
&lt;br /&gt;
On Board Game Arena, your opponents are connected to the game platform all along the game, and they can see your moves and react to them immediately - as is the case in the real world.&lt;br /&gt;
&lt;br /&gt;
===What do I need to play?===&lt;br /&gt;
&lt;br /&gt;
Your browser ... and that&#039;s it!&lt;br /&gt;
&lt;br /&gt;
Board Game Arena does not require anything else on your computer. Thus, you can play from any computer, anywhere, anytime!&lt;br /&gt;
&lt;br /&gt;
In order to make this thing possible, we are using the very latest technologies available for the web. This is the reason you should play with the most up to date web browsers to enjoy an optimal BGA experience (read more about our [[Browser_support|browser policy]]).&lt;br /&gt;
&lt;br /&gt;
===How much does it cost to play on BGA?===&lt;br /&gt;
&lt;br /&gt;
Playing on BGA is free.&lt;br /&gt;
&lt;br /&gt;
You can also choose to help us by making a donation and becoming a [http://en.boardgamearena.com/#!club Board Game Arena club] member.&lt;br /&gt;
&lt;br /&gt;
===What are the games available on BGA?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena proposes a various selection of board and card games, but is specialized in modern (&amp;quot;European style&amp;quot;) adult games.&lt;br /&gt;
&lt;br /&gt;
[http://en.boardgamearena.com/#!gamelist See available games].&lt;br /&gt;
&lt;br /&gt;
===What can I do if I have an issue with the website?===&lt;br /&gt;
&lt;br /&gt;
Most of the issues one can encounter on this website should be solved with a simple web page refresh (or &amp;quot;F5&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you experience persistent issues, you can browse the [http://forum.boardgamearena.com/viewforum.php?f=4 bug section in the forum], see if someone already reported the issue, and add a new bug report if that&#039;s not the case. Please take some time to describe the bug you are reporting in detail so that we can quickly reproduce and fix it.&lt;br /&gt;
&lt;br /&gt;
===What is the legal status of this website?===&lt;br /&gt;
&lt;br /&gt;
All the games currently available on this site have been licensed or otherwise authorized by copyright holders. Please be aware that games available on BGA can be removed at the copyright holders demand (for example: if they publish their own adaptation of the game).&lt;br /&gt;
&lt;br /&gt;
Board Game Arena would like to thank all game publishers and game designers who allow us to have their games here, thus making it possible for this website to exist.&lt;br /&gt;
&lt;br /&gt;
===I&#039;m a game publisher: why would I like to have my game on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
The main goal of Board Game Arena is to make it easy for people to discover and love new games. We think that there is only two kinds of players on Board Game Arena: those who already bought the games they are playing online, and those who dream to buy them soon!&lt;br /&gt;
&lt;br /&gt;
As the activity of this website contributes to increasing a game&#039;s popularity and thus generates game boxes sales in the &amp;quot;real world&amp;quot;, we think it is beneficial to the boardgame community: people from all over the world can play online, we can have fun developing this game platform to the best of our ability, and game publishers get money from the box sales and build a special relationship with their players community.&lt;br /&gt;
&lt;br /&gt;
== Meeting players and starting games ==&lt;br /&gt;
&lt;br /&gt;
===I launched a new table but nobody is joining?===&lt;br /&gt;
&lt;br /&gt;
Although Board Game Arena has been enjoying a growing popularity, it is still a young website. For the most popular games, you can find players at any time of the day. For other games, we advise you to come back at peak hour (around 22:00 CEST) if you can&#039;t find opponents at the moment.&lt;br /&gt;
&lt;br /&gt;
Tip: check the number of online/available players for a game before launching the table.&lt;br /&gt;
&lt;br /&gt;
===I joined a game. When does the game start?===&lt;br /&gt;
&lt;br /&gt;
Each table has an administrator, which is the table creator. It is the responsibility of the table administrator to start the game when he is satisfied with the number of players having joined the table.&lt;br /&gt;
&lt;br /&gt;
If you are the table administrator and can&#039;t launch the game, most of the time it&#039;s because there is not yet enough players joined the table.&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the small color circle next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/online_.png : this player is active. He completed an action very recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/inactive_.png : this player is inactive. He is connected to the website but did not perform any action recently.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/status/offline_.png : this player is offline.&lt;br /&gt;
&lt;br /&gt;
===What does the &#039;% hits&#039; statistic mean?===&lt;br /&gt;
% hits = number of victory points / number of games played&lt;br /&gt;
&lt;br /&gt;
Where number of victory points is the following:&lt;br /&gt;
* When you win a 2 players game: 1 point.&lt;br /&gt;
* When you win a 3 players game: 1.5 points.&lt;br /&gt;
* When you win a 4 players game: 2 points.&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
This way, &amp;quot;50%&amp;quot; means that you win 50% of 2 players game, or 33% of 3 players game, etc.&lt;br /&gt;
&lt;br /&gt;
== During the game ==&lt;br /&gt;
&lt;br /&gt;
===What is the meaning of the icons next to players names?===&lt;br /&gt;
&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player.gif : this player must make a move now.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_clockalert.gif : this player must make a move now, and he has spent his reflexion time. Can someone wake him up? ;)&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/layout/active_player_nonack.gif : this player must make a move now, but is probably not aware of the fact. If the situation does not evolve, it might be that this player has some connection issue.&lt;br /&gt;
* http://fr.boardgamearena.com/theme/img/common/zombie.png : this player is a &amp;quot;zombie&amp;quot; (he left the game or has been fired from the game). The game goes on without this player.&lt;br /&gt;
&lt;br /&gt;
When the &amp;quot;normal&amp;quot; avatar of a player is displayed, it means that this player is waiting for his turn to play.&lt;br /&gt;
&lt;br /&gt;
===A player has to make a move but he/she doesn&#039;t. What can I do?===&lt;br /&gt;
&lt;br /&gt;
* First, please remember that this player has the right to think as long as he needs to about is next move...  well as long as he still has some time left on the game clock, that is.&lt;br /&gt;
* Then you can ask this player to confirm that he is still thinking about how to play.&lt;br /&gt;
* If this player seems to be away, we advise you to wait a few  minutes: this player may be experiencing some network problems or have left his computer temporarily.&lt;br /&gt;
* If the player is not coming back, you can expel him from the game as soon as he is running out of time on the game clock for the current move (red bar) or if he goes over his alloted time to think by more than 3/4/5 minutes (depending on game speed). See Clock section for details.  Important: in this case, no ELO points will be won by anybody for this game.&lt;br /&gt;
&lt;br /&gt;
===What is the current progression of the game I&#039;m playing?===&lt;br /&gt;
&lt;br /&gt;
A percentage of progression is displayed on the top of the web page.&lt;br /&gt;
There is also a progress bar at the bottom of the web page shows you the current progression of the game.&lt;br /&gt;
&lt;br /&gt;
===What is forbidden on Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Leaving a game in progress on purpose.&lt;br /&gt;
* Thinking an unnecessary and unreasonable amount of time at the end of game in an obvious losing situation.&lt;br /&gt;
* Kingmaking: enabling another player to win on purpose while there is a better move to make for yourself.&lt;br /&gt;
* Running out of time on the game clock.&lt;br /&gt;
* Giving some piece of information about the current game situation that corrupts the normal game flow.&lt;br /&gt;
* Communicating with another player about the game privately (ex: with MSN).&lt;br /&gt;
* Provocation / triumphalism / defeatism ... anything which is not fair play.&lt;br /&gt;
* Having a shocking avatar (no advertisement, no politics, ...)&lt;br /&gt;
&lt;br /&gt;
Going against these rules will affect your reputation.&lt;br /&gt;
&lt;br /&gt;
===What is absolutely forbidden in Board Game Arena?===&lt;br /&gt;
&lt;br /&gt;
* Creating multiple account and playing against oneself.&lt;br /&gt;
* Insulting other players in any manner.&lt;br /&gt;
&lt;br /&gt;
Going against these rules can lead to the removal of your account and/or to the blacklisting of your IP.&lt;br /&gt;
&lt;br /&gt;
===What if some player does something wrong?===&lt;br /&gt;
&lt;br /&gt;
Board Game Arena platform has been designed to encourage players to maintain a good behaviour. The reputation system allows you to distinguish between good and bad players. Then, it is up to you to decide whether to start a game with them or not.&lt;br /&gt;
&lt;br /&gt;
If you think some player has had a bad behavior during a game, you can give him a at the end of the game.&lt;br /&gt;
&lt;br /&gt;
If you think some player committed some serious wrongdoing during a game (ex: insult), please report this player to us (&amp;quot;report this player&amp;quot; link from his profile or game result page) so that we can take appropriate measures.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Privacy&amp;diff=905</id>
		<title>Privacy</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Privacy&amp;diff=905"/>
		<updated>2013-07-09T06:22:06Z</updated>

		<summary type="html">&lt;p&gt;Een: Created page with &amp;quot;To create an account, you need to provide an email, user name and password. You can also complete your player profile with some other data.  We store this data. Yep. It would ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To create an account, you need to provide an email, user name and password.&lt;br /&gt;
You can also complete your player profile with some other data.&lt;br /&gt;
&lt;br /&gt;
We store this data. Yep. It would be pretty annoying for you to enter it each time you visit ;)&lt;br /&gt;
&lt;br /&gt;
If you are &#039;internet paranoid&#039; and you never provide any website with accurate personal information, congratulations! You can skip this section.&lt;br /&gt;
&lt;br /&gt;
If you are not, congratulations! You can also skip this section which is intended only for &#039;internet paranoid&#039; people anyway... It has been written for compliance with some social network authentication policy (take your bet, there is only two - oh, wait, if you are reading this you probably know). Well, to be fair, I could have left it empty too, the only check made by said social network being that the page exists. But, what would have been the fun in that?&lt;br /&gt;
&lt;br /&gt;
If you are still interested to read on some stuff instead of going straight to playing:&lt;br /&gt;
* Your password is stored encrypted, but the usual precautionary measures apply. You should use a strong password and not use the same one that for sensitive websites. Some people would say never to use the same password, but this looks like excessive blunt force to the head, except for websites with very sensitive information. Shouldn&#039;t be the case on a gaming website, but hey, do as you please.&lt;br /&gt;
* We don&#039;t share your email with third parties without your consent. Your consent may be implicit in some obvious cases (such as if you take part in a contest with prizes from a publisher, as it will be needed for the publisher to contact you to redeem the prize).&lt;br /&gt;
* Your profile information is visible to other players, as well as your gaming history on the website. So, since anyone can create an account on the site, it should be considered public information. But if you use a pseudonym for your username, it shouldn&#039;t be easy to link it to your real identity (in case you would be worried about that).&lt;br /&gt;
&lt;br /&gt;
Hope this all sounds reasonable to you, and that you can now enjoy Board Game Arena without second thoughts!&lt;br /&gt;
&lt;br /&gt;
Cheers and doughnuts,&lt;br /&gt;
&lt;br /&gt;
The admins.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Game_interface_logic:_yourgamename.js&amp;diff=902</id>
		<title>Game interface logic: yourgamename.js</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Game_interface_logic:_yourgamename.js&amp;diff=902"/>
		<updated>2013-06-30T13:35:10Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Animations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This is the main file for your game interface. Here you will define:&lt;br /&gt;
&lt;br /&gt;
* which actions on the page will generate calls to the server&lt;br /&gt;
* what happens when you get a notification for change from the server and how it will show in the browser. &lt;br /&gt;
&lt;br /&gt;
== File structure ==&lt;br /&gt;
&lt;br /&gt;
The details on how the file is structured is described directly with comments on the code skeleton provided to you.&lt;br /&gt;
&lt;br /&gt;
Basically, here&#039;s this structure:&lt;br /&gt;
* constructor: here you can define variable global to your whole interface.&lt;br /&gt;
* setup: this method is called when the page is refreshed, in order you can setup the game interface.&lt;br /&gt;
* onEnteringState: the method is called when entering in a new game state. This way you can customize the view for this game state.&lt;br /&gt;
* onLeavingState: the method is called when leaving a game state.&lt;br /&gt;
* onUpdateActionButtons: called when entering in a new state, in order you can add action buttons in status bar.&lt;br /&gt;
* (utility methods): at this place you can define your utility methods&lt;br /&gt;
* (player&#039;s actions): at this place you can write your handlers for player&#039;s action on the interface (ex: click on an item).&lt;br /&gt;
* setupNotifications: in this method you associate notifications with notification handlers. This way, for each game notification, you trigger a javascript method to handle it and update the game interface.&lt;br /&gt;
* (notification handlers): at this place you can define your notifications handlers.&lt;br /&gt;
&lt;br /&gt;
== General tips ==&lt;br /&gt;
&lt;br /&gt;
; this.player_id&lt;br /&gt;
: Id of the player on whose browser the code is running.&lt;br /&gt;
&lt;br /&gt;
; this.isSpectator&lt;br /&gt;
: Flag set to true if the user at the table is a spectator (not a player).&lt;br /&gt;
: Note: if you want to hide some element for spectators, you&#039;d better use [[Game_interface_stylesheet:_yourgamename.css#spectatorMode|CSS &#039;spectatorMode&#039; class]].&lt;br /&gt;
&lt;br /&gt;
; this.gamedatas&lt;br /&gt;
: Contains your initial set of datas to init the game, created at game start or game refresh (F5)&lt;br /&gt;
: You can update it as needed to keep an up to date reference of the game on the client side if you need it (most of the time you don&#039;t).&lt;br /&gt;
&lt;br /&gt;
; isCurrentPlayerActive()&lt;br /&gt;
: Returns true if the player on whose browser the code is running is currently active (it&#039;s his turn to play)&lt;br /&gt;
&lt;br /&gt;
; this.getActivePlayerId()&lt;br /&gt;
: Return the ID of active player, or null if we are not in a &amp;quot;activeplayer&amp;quot; type state.&lt;br /&gt;
&lt;br /&gt;
; this.getActivePlayers()&lt;br /&gt;
: Return an array with the IDs of players that are currently active (or an empty array if there is not).&lt;br /&gt;
&lt;br /&gt;
== Dojo framework ==&lt;br /&gt;
&lt;br /&gt;
BGA is using the [http://dojotoolkit.org/ Dojo Javascript framework].&lt;br /&gt;
&lt;br /&gt;
The Dojo framework allows us to do complex things easier, and the BGA framework is using Dojo framework a lot.&lt;br /&gt;
&lt;br /&gt;
To realize game although, you only need to use a few part of the Dojo framework. All the Dojo methods you need to use are describe on this page.&lt;br /&gt;
&lt;br /&gt;
== Access and manipulate the DOM ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$(&#039;some_html_element_id&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The $() function is used to get some HTML element using its &amp;quot;id&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
Example 1: modify the content of a &amp;quot;span&amp;quot; element:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In your HTML code:&lt;br /&gt;
   &amp;lt;span id=&amp;quot;a_value_in_the_game_interface&amp;quot;&amp;gt;1234&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your Javascript code:&lt;br /&gt;
   $(&#039;a_value_in_the_game_interface&#039;).innerHTML = &amp;quot;9999&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: $() is the standard method to access some HTML element with BGA Framework. You must not use &amp;quot;getElementById&amp;quot; function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.style&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With dojo.style you can modify a CSS property of any HTML element of your interface.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // Make an element disappear&lt;br /&gt;
     dojo.style( &#039;my_element&#039;, &#039;display&#039;, &#039;none&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Give an element a 2px border&lt;br /&gt;
     dojo.style( &#039;my_element&#039;, &#039;borderWidth&#039;, &#039;2px&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Change the background position of an element&lt;br /&gt;
     // (very practical when you are using CSS sprite to transform an element to another)&lt;br /&gt;
     dojo.style( &#039;my_element&#039;, &#039;backgroundPosition&#039;, &#039;-20px -50px&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: you must always use dojo.style to modify CSS properties of HTML elements.&lt;br /&gt;
&lt;br /&gt;
Note²: if you have to modify several CSS properties of an element, or if you have some complex CSS transformation to do, you should consider using dojo.addClass/dojo.removeClass (see below).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo CSS classes manipulation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In many situation, a bunch of many small CSS property update can be replaced by a CSS class change (ie: you add a CSS class to your element instead of applying all modification manually).&lt;br /&gt;
&lt;br /&gt;
Advantages are:&lt;br /&gt;
* All your CSS stuff remains in your CSS file.&lt;br /&gt;
* You can add/remove a list of CSS modifications with a simple function and whithout error.&lt;br /&gt;
* You can test if you applied the stuff to an element with &amp;quot;dojo.hasClass&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
Example from &amp;quot;Reversi&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // We add &amp;quot;possibleMove&amp;quot; to an element&lt;br /&gt;
    dojo.addClass( &#039;square_&#039;+x+&#039;_&#039;+y, &#039;possibleMove&#039; );&lt;br /&gt;
&lt;br /&gt;
    // In our CSS file, the class is defined as:&lt;br /&gt;
    .possibleMove {&lt;br /&gt;
      background-color: white;&lt;br /&gt;
      opacity: 0.2;&lt;br /&gt;
      filter:alpha(opacity=20); /* For IE8 and earlier */  &lt;br /&gt;
      cursor: pointer;  &lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     // So we&#039;ve applied 4 CSS property change in one line of code.&lt;br /&gt;
&lt;br /&gt;
     // ... and when we need to check if a square is a possible move on client side:&lt;br /&gt;
     if( dojo.hasClass( &#039;square_&#039;+x+&#039;_&#039;+y, &#039;possibleMove&#039; ) )&lt;br /&gt;
     { ... }&lt;br /&gt;
&lt;br /&gt;
     // ... and if we want to remove all possible moves in one line of code (see &amp;quot;dojo.query&amp;quot; method):&lt;br /&gt;
     dojo.query( &#039;.possibleMove&#039; ).removeClass( &#039;possibleMove&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conclusion: we encourage you to use dojo.addClass, dojo.removeClass and dojo.hasClass to make your life easier :)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.query&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With dojo.query, you can query a bunch of HTML elements with a single function, with a &amp;quot;CSS selector&amp;quot; style.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // All elements with class &amp;quot;possibleMove&amp;quot;:&lt;br /&gt;
     var elements = dojo.query( &#039;.possibleMove&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Count number of tokens (ie: elements with class &amp;quot;token&amp;quot;) on the board (ie: element with id &amp;quot;board&amp;quot;):&lt;br /&gt;
     dojo.query( &#039;#board .token&#039; ).length;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But what is really cool with dojo.query is that you can combine it with almost all methods above.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // Trigger a method when the mouse enter in any element with class &amp;quot;meeple&amp;quot;:&lt;br /&gt;
     dojo.query( &#039;.meeple&#039; ).connect( &#039;onmouseenter&#039;, this, &#039;myMethodToTrigger&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Hide all meeples who are on the board&lt;br /&gt;
     dojo.query( &#039;#board .meeple&#039; ).style( &#039;display&#039;, &#039;none&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.place&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
dojo.place is the best function to insert some HTML code somewhere in your game interface without breaking something. It is much better to use that &amp;quot;innerHTML=&#039;&#039;&amp;quot; method as soon as you must insert HTML tags and not only values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // Insert your HTML code as a child of a container element&lt;br /&gt;
     dojo.place( &amp;quot;&amp;lt;your html code&amp;gt;&amp;quot;, &amp;quot;your_container_element_id&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
     // Replace the container element with your new html&lt;br /&gt;
     dojo.place( &amp;quot;&amp;lt;your html code&amp;gt;&amp;quot;, &amp;quot;your_container_element_id&amp;quot;, &amp;quot;replace&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: the third parameter of dojo.place can take various interesting value: &amp;quot;first&amp;quot;, &amp;quot;after&amp;quot;, ... [http://dojotoolkit.org/reference-guide/1.7/dojo/place.html See full doc on dojo.place].&lt;br /&gt;
&lt;br /&gt;
Usually, when you want to insert some piece of HTML in your game interface, you should use &amp;quot;[[Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl#Javascript_templates|Javascript templates]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addStyleToClass: function( cssClassName, cssProperty, propertyValue )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as dojo.style(), but for all the nodes set with the specified cssClassName&lt;br /&gt;
&lt;br /&gt;
=== Animations ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dojo Animations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BGA animations is based on Dojo Animation ([http://dojotoolkit.org/documentation/tutorials/1.8/animation/ see tutorial here]).&lt;br /&gt;
&lt;br /&gt;
However, most of the time, you can just use methods below, which are built on top of Dojo Animation.&lt;br /&gt;
&lt;br /&gt;
Note: one interesting method from Dojo that could be useful from time to time is &amp;quot;Dojo.Animation&amp;quot;. It allows you to make any CSS property &amp;quot;slide&amp;quot; from one value to another.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideToObject( mobile_obj, target_obj, duration, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use slideToObject to &amp;quot;slide&amp;quot; an element to a target position.&lt;br /&gt;
&lt;br /&gt;
Sliding element on the game area is the recommended and the most used way to animate your game interface. Using slides allow players to figure out what is happening on the game, as if they were playing with the real boardgame.&lt;br /&gt;
&lt;br /&gt;
The parameters are:&lt;br /&gt;
* mobile_obj: the ID of the object to move. This object must be &amp;quot;relative&amp;quot; or &amp;quot;absolute&amp;quot; positioned.&lt;br /&gt;
* target_obj: the ID of the target object. This object must be &amp;quot;relative&amp;quot; or &amp;quot;absolute&amp;quot; positioned. Note that it is not mandatory that mobile_obj and target_obj have the same size. If their size are different, the system slides the center of mobile_obj to the center of target_obj.&lt;br /&gt;
* duration: (optional) defines the duration in millisecond of the slide. The default is 500 milliseconds.&lt;br /&gt;
* delay: (optional). If you defines a delay, the slide will start only after this delay. This is particularly useful when you want to slide several object from the same position to the same position: you can give a 0ms delay to the first object, a 100ms delay to the second one, a 200ms delay to the third one, ... this way they won&#039;t be superposed during the slide.&lt;br /&gt;
&lt;br /&gt;
BE CAREFUL: The method returns an dojo.fx animation, so you can combine it with other animation if you want to. It means that you have to call the &amp;quot;play()&amp;quot; method, otherwise the animation WON&#039;T START.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.slideToObject( &amp;quot;some_token&amp;quot;, &amp;quot;some_place_on_board&amp;quot; ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideToObjectPos( mobile_obj, target_obj, target_x, target_y, duration, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method does exactly the same than &amp;quot;slideToObjectPos&amp;quot;, except than you can specify some (x,y) coordinates. This way, &amp;quot;mobile_obj&amp;quot; will slide to the specified x,y position relatively to &amp;quot;target_obj&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example: slide a token to some place on the board, 10 pixels to the bottom:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.slideToObjectPos( &amp;quot;some_token&amp;quot;, &amp;quot;some_place_on_board&amp;quot;, 0, 10 ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideTemporaryObject( mobile_obj_html, mobile_obj_parent, from, to, duration, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method is useful when you want to slide a temporary HTML object from one place to another. As this object does not exists before the animation and won&#039;t remain after, it could be complex to create this object (with dojo.place), to place it at its origin (with placeOnObject) to slide it (with slideToObject) and to make it disappear at the end.&lt;br /&gt;
&lt;br /&gt;
slideTemporaryObject does all of this for you:&lt;br /&gt;
* mobile_obj_html is a piece of HTML code that represent the object to slide.&lt;br /&gt;
* mobile_obj_parent is the ID of an HTML element of your interface that will be the parent of this temporary HTML object.&lt;br /&gt;
* from is the ID of the origin of the slide.&lt;br /&gt;
* to is the ID of the target of the slide.&lt;br /&gt;
* duration/delay works exactly like in &amp;quot;slideToObject&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.slideTemporaryObject( &#039;&amp;lt;div class=&amp;quot;token_icon&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;, &#039;tokens&#039;, &#039;my_origin_div&#039;, &#039;my_target_div&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideToObjectAndDestroy: function( node, to, time, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method is a handy shortcut to slide an existing HTML object to some place then destroy it upon arrival. It can be used for example to move a victory token or a card from the board to the player panel to show that the player earns it, then destroy it when we don&#039;t need to keep it visible on the player panel.&lt;br /&gt;
&lt;br /&gt;
It works the same as this.slideToObject and takes the same arguments. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.slideToObjectAndDestroy( &amp;quot;some_token&amp;quot;, &amp;quot;some_place_on_board&amp;quot;, 1000, 0 ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.fadeOutAndDestroy( node )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function fade out the target HTML node, then destroy it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.fadeOutAndDestroy( &amp;quot;a_card_that_must_disappear&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CAREFUL: the HTML node still exists until during few milliseconds, until the fadeOut has been completed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rotating elements&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can check here [http://jimfulton.info/demos/dojo-animated-rotate.html an example of use] of Dojo to make an element rotate.&lt;br /&gt;
&lt;br /&gt;
This example combines &amp;quot;Dojo.Animation&amp;quot; method and a CSS3 property that allow you to rotate the element.&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: to asses browser compatibility, you must select the CSS property to use just like in the example (see sourcecode below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        var transform;&lt;br /&gt;
        dojo.forEach(&lt;br /&gt;
            [&#039;transform&#039;, &#039;WebkitTransform&#039;, &#039;msTransform&#039;,&lt;br /&gt;
             &#039;MozTransform&#039;, &#039;OTransform&#039;],&lt;br /&gt;
            function (name) {&lt;br /&gt;
                if (typeof dojo.body().style[name] != &#039;undefined&#039;) {&lt;br /&gt;
                    transform = name;&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
        // ... and then use &amp;quot;transform&amp;quot; as the name of your CSS property for rotation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Moving elements ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.placeOnObject( mobile_obj, target_obj )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
placeOnObject works exactly like &amp;quot;slideToObject&amp;quot;, except that the effect is immediate.&lt;br /&gt;
&lt;br /&gt;
This is not really an animation, but placeOnObject is frequently used before starting an animation.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // (We just created an object &amp;quot;my_new_token&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  // Place the new token on current player board&lt;br /&gt;
  this.placeOnObject( &amp;quot;my_new_token&amp;quot;, &amp;quot;overall_player_board_&amp;quot;+this.player_id );&lt;br /&gt;
  &lt;br /&gt;
  // Then slide it to its position on the board&lt;br /&gt;
  this.slideToObject( &amp;quot;my_new_token&amp;quot;, &amp;quot;a_place_on_board&amp;quot; ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.placeOnObjectPos( mobile_obj, target_obj, target_x, target_y )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method works exactly like placeOnObject, except than you can specify some (x,y) coordinates. This way, &amp;quot;mobile_obj&amp;quot; will be placed to the specified x,y position relatively to &amp;quot;target_obj&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.attachToNewParent( mobile_obj, target_obj )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With this method, you change the HTML parent of &amp;quot;mobile_obj&amp;quot; element. &amp;quot;target_obj&amp;quot; is the new parent of this element. The beauty of &lt;br /&gt;
attachToNewParent is that the mobile_obj element DOES NOT MOVE during this process.&lt;br /&gt;
&lt;br /&gt;
Note: what happens is that the method calculate a relative position of mobile_obj to make sure it does not move after the HTML parent changes.&lt;br /&gt;
&lt;br /&gt;
Why using this method?&lt;br /&gt;
&lt;br /&gt;
Changing the HTML parent of an element can be useful for the following reasons:&lt;br /&gt;
* When the HTML parent moves, all its child are moving with them. If some game elements is no more linked with a parent HTML object, you may want to attach it to another place.&lt;br /&gt;
* The z_order (vertical order of display) depends on the position in the DOM, so you may need to change the parent of some game elements when they are moving in your game area.&lt;br /&gt;
&lt;br /&gt;
CAREFUL: when you attach an HTML element with a new parent, you break all references to this HTML element (ex: dojo.connect).&lt;br /&gt;
&lt;br /&gt;
== Players input ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.connect&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to associate a player event with one of your notification method.&lt;br /&gt;
&lt;br /&gt;
Example: associate a click on an element (&amp;quot;my_element&amp;quot;) with one of our method (&amp;quot;onClickOnMyElement&amp;quot;):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      dojo.connect( $(&#039;my_element&#039;), &#039;onClick&#039;, this, &#039;onClickOnMyElement&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: this is the only possible correct way to associate a player input event to your code, and you must not use anything else.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.checkAction( &amp;quot;my_action_name&amp;quot; )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Usage: checkAction: function( action, nomessage )&lt;br /&gt;
&lt;br /&gt;
Check if player can do the specified action by taking into account:&lt;br /&gt;
* current game state&lt;br /&gt;
* interface locking (a player can&#039;t do any action if an action is already in progress)&lt;br /&gt;
&lt;br /&gt;
return true if action is authorized (ie: the action is listed as a &amp;quot;possibleaction&amp;quot; in current game state).&lt;br /&gt;
&lt;br /&gt;
return false and display an error message if not (display no message if nomessage parameter is true). The displayed error message could be either &amp;quot;This move is not allowed at this moment&amp;quot; or &amp;quot;An action is already in progress&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function onClickOnGameElement( evt )&lt;br /&gt;
  {&lt;br /&gt;
     if( this.checkAction( &amp;quot;my_action&amp;quot; ) )&lt;br /&gt;
     {&lt;br /&gt;
        // Do the action&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.ajaxcall( url, parameters, obj_callback, callback, callback_error )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method must be used to send a player input to the game server.&lt;br /&gt;
&lt;br /&gt;
* url: the url of the action to perform. For a game, it must be: &amp;quot;/&amp;lt;mygame&amp;gt;/&amp;lt;mygame&amp;gt;/myAction.html&amp;quot;&lt;br /&gt;
* parameters: an array of parameter to send to the game server. Note that &amp;quot;lock:true&amp;quot; must always be specified in this list of parameter in order the interface can be locked during the server call.&lt;br /&gt;
* obj_callback: must be set to &amp;quot;this&amp;quot;.&lt;br /&gt;
* callback: a function to trigger when the server returns and everything went fine.&lt;br /&gt;
* callback_error: (optional and rarely used) a function to trigger when the server returns an error.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.ajaxcall( &#039;/mygame/mygame/myaction.html&#039;, { lock: true, &lt;br /&gt;
   arg1: myarg1, &lt;br /&gt;
   arg2: myarg2, &lt;br /&gt;
   ...&lt;br /&gt;
}, this, function( result ) {&lt;br /&gt;
   // Do some stuff after a successful call&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restricted arguments names (please don&#039;t use them):&lt;br /&gt;
* &amp;quot;action&amp;quot;&lt;br /&gt;
* &amp;quot;module&amp;quot;&lt;br /&gt;
* &amp;quot;class&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.confirmationDialog()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Display a confirmation dialog with a yes/no choice.&lt;br /&gt;
&lt;br /&gt;
We advice you to NOT use this function unless the player action is really critical and could ruins the game, because it slows down the game and upset players.&lt;br /&gt;
&lt;br /&gt;
Usage: this.confirmationDialog( &amp;quot;Question to displayed&amp;quot;, callback_function_if_click_on_yes );&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.confirmationDialog( _(&#039;Are you sure to use this bonus (points penalty at the end of the game) ?&#039;),&lt;br /&gt;
                         dojo.hitch( this, function() {&lt;br /&gt;
                           this.ajaxcall( &#039;/seasons/seasons/useBonus.html&#039;,&lt;br /&gt;
                                { id:bonus_id, lock:true }, this, function( result ) {} );&lt;br /&gt;
                        } ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; addEventToClass: function( cssClassName, eventName, functionName )&lt;br /&gt;
: Same as dojo.connect(), but for all the nodes set with the specified cssClassName&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addActionButton( id, label, method, (opt)depreciated, (opt)bHighlight )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use this method to add an action button in the main action status bar.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* id: a ID that should be unique in your HTML DOM document.&lt;br /&gt;
* label: the text of the button. Should be translatable (use _() function).&lt;br /&gt;
* method: the name of your method that must be triggered when the player clicks on this button.&lt;br /&gt;
* depreciated (optional): do not use this. Please not specify this argument or use &amp;quot;null&amp;quot;.&lt;br /&gt;
* bHighlight: if set to &amp;quot;true&amp;quot;, the button is going blink to catch player&#039;s attention. Please don&#039;t abuse of blinking button.&lt;br /&gt;
&lt;br /&gt;
You should only use this method in your &amp;quot;onUpdateActionButtons&amp;quot; method. Usually, you use it like this (from Hears example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        onUpdateActionButtons: function( stateName, args )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &#039;onUpdateActionButtons: &#039;+stateName );&lt;br /&gt;
                      &lt;br /&gt;
            if( this.isCurrentPlayerActive() )&lt;br /&gt;
            {            &lt;br /&gt;
                switch( stateName )&lt;br /&gt;
                {&lt;br /&gt;
                case &#039;giveCards&#039;:&lt;br /&gt;
                    this.addActionButton( &#039;giveCards_button&#039;, _(&#039;Give selected cards&#039;), &#039;onGiveCards&#039; ); &lt;br /&gt;
                    break;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        },   &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, we are adding a &amp;quot;Give selected cards&amp;quot; button in the case we are on game state &amp;quot;giveCards&amp;quot;. When player clicks on this button, it triggers our &amp;quot;onGiveCards&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
See [[Translations]]&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
&lt;br /&gt;
When something happens on the server side, your game interface Javascript logic received a notification.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how you can handle these notifications on the client side.&lt;br /&gt;
&lt;br /&gt;
=== Subscribe to notifications ===&lt;br /&gt;
&lt;br /&gt;
Your Javascript &amp;quot;setupNotifications&amp;quot; method is the place where you can subscribe to notifications from your PHP code.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how you associate one of your Javascript method to a notification &amp;quot;playDisc&amp;quot; (from Reversi example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   // In setupNotifications method:&lt;br /&gt;
   dojo.subscribe( &#039;playDisc&#039;, this, &amp;quot;notif_playDisc&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: the &amp;quot;playDisc&amp;quot; corresponds to the name of the notification you define it in your PHP code, in your &amp;quot;notifyAllPlayers&amp;quot; or &amp;quot;notifyPlayer&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
Then, you have to define your &amp;quot;notif_playDisc&amp;quot; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        notif_playDisc: function( notif )&lt;br /&gt;
        {&lt;br /&gt;
            // Remove current possible moves (makes the board more clear)&lt;br /&gt;
            dojo.query( &#039;.possibleMove&#039; ).removeClass( &#039;possibleMove&#039; );        &lt;br /&gt;
        &lt;br /&gt;
            this.addDiscOnBoard( notif.args.x, notif.args.y, notif.args.player_id );&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In a notification handler like our &amp;quot;notif_playDisc&amp;quot; method, you can access to all notifications arguments with &amp;quot;notif.args&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // If you did this on PHP side:&lt;br /&gt;
    self::notifyAllPlayers( &amp;quot;myNotification&amp;quot;, &#039;&#039;, array( &amp;quot;myArgument&amp;quot; =&amp;gt; 3 ) );&lt;br /&gt;
&lt;br /&gt;
    // On Javascript side, you can access the &amp;quot;myArgument&amp;quot; like this:&lt;br /&gt;
    notif_myNotification: function( notif )&lt;br /&gt;
    {&lt;br /&gt;
       alert( &amp;quot;myArgument = &amp;quot; + notif.args.myArgument );&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Synchronous notifications ===&lt;br /&gt;
&lt;br /&gt;
When several notifications are received by your game interface, these notifications are processed immediately, one after the other, in the same exact order they have been generated in your PHP game logic.&lt;br /&gt;
&lt;br /&gt;
However, sometimes, you need to give some time to the players to figure out what happened on the game before jumping to the next notification. Indeed, in many games, they are a lot of automatic actions, and the computer is going to resolve all these actions very fast if you don&#039;t tell it not to do so.&lt;br /&gt;
&lt;br /&gt;
As an example, for Reversi, when someone is playing a disc, we want to wait 500 milliseconds before doing anything else in order the opponent player can figure out what move has been played.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how we do this, right after our subscription:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       dojo.subscribe( &#039;playDisc&#039;, this, &amp;quot;notif_playDisc&amp;quot; );&lt;br /&gt;
       this.notifqueue.setSynchronous( &#039;playDisc&#039;, 500 );   // Wait 500 milliseconds after executing the playDisc handler&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tooltips ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addTooltip( nodeId, _( helpString ), _( actionString ), delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a simple text tooltip to the DOM node.&lt;br /&gt;
&lt;br /&gt;
Specify &#039;helpString&#039; to display some information about &amp;quot;what is this game element?&amp;quot;.&lt;br /&gt;
Specify &#039;actionString&#039; to display some information about &amp;quot;what happens when I click on this element?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You must specify both helpString and actionString. Most of the time, you use only one and specify a void string (&amp;quot;&amp;quot;) for the other one.&lt;br /&gt;
&lt;br /&gt;
Usually, _() must be used for the text to be marked for translation.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Delay&amp;quot; is an optional parameter. Usually, it is primarily used to specify a zero delay for some game element when the tooltip gives really important information for the game - but remember: no essential information must be placed in tooltips as they won&#039;t be displayed in some browser (see Guidelines).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.addTooltip( &#039;cardcount&#039;, _(&#039;Number of cards in hand&#039;), &#039;&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addTooltipHtml( nodeId, html, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add an HTML tooltip to the DOM node (for more elaborate content such as presenting a bigger version of a card).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addTooltipToClass( cssClass, _( helpString ), _( actionString ), delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a simple text tooltip to all the DOM nodes set with this cssClass. &lt;br /&gt;
&lt;br /&gt;
IMPORTANT: all concerned nodes must have IDs to get tooltips.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addTooltipHtmlToClass( cssClass, html, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add an HTML tooltip to to all the DOM nodes set with this cssClass (for more elaborate content such as presenting a bigger version of a card).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: all concerned nodes must have IDs to get tooltips&lt;br /&gt;
&lt;br /&gt;
== Dialogs, warning messages, confirmation dialogs, ... ==&lt;br /&gt;
&lt;br /&gt;
=== Warning messages ===&lt;br /&gt;
&lt;br /&gt;
Sometimes, there is something important that is happening on the game and you have to make sure all players get the message. Most of the time, the evolution of the game situation or the game log is enough, but sometimes you need something more visible.&lt;br /&gt;
&lt;br /&gt;
Ex: someone fulfill one of the end of the game condition, so this is the last turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.showMessage( msg, type )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
showMessage shows a message in a big rectangular area on the top of the screen of current player.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;msg&amp;quot; is the string to display. It should be translated.&lt;br /&gt;
* &amp;quot;type&amp;quot; can be set to &amp;quot;info&amp;quot; or &amp;quot;error&amp;quot;. If set to &amp;quot;info&amp;quot;, the message will be an informative message on a white background. If set to &amp;quot;error&amp;quot;, the message will be an error message on a red background.&lt;br /&gt;
&lt;br /&gt;
Important: the normal way to inform players about the progression of the game is the game log. &amp;quot;showMessage&amp;quot; is intrusive and should not be used often.&lt;br /&gt;
&lt;br /&gt;
=== Confirmation dialog ===&lt;br /&gt;
&lt;br /&gt;
When an important action with a lot of consequences is triggered by the player, you may want to propose a confirmation dialog.&lt;br /&gt;
&lt;br /&gt;
CAREFUL: the general guidelines of BGA is to AVOID the use of confirmation dialog. Confirmation dialogs slow down the game and bother players. The players knows that they have to pay attention about each move when they are playing online.&lt;br /&gt;
&lt;br /&gt;
The situation where you should use a confirmation dialog are the following:&lt;br /&gt;
* It must not happen very often during a game.&lt;br /&gt;
* It must be linked to an action that can really &amp;quot;kill a game&amp;quot; if the player do not pay attention.&lt;br /&gt;
* It must be something that can be done by mistake (ex: a link on the action status bar).&lt;br /&gt;
&lt;br /&gt;
How to display a confirmation dialog:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        this.confirmationDialog( _(&#039;Are you sure you want to make this?&#039;), dojo.hitch( this, function() {&lt;br /&gt;
            this.ajaxcall( &#039;/mygame/mygame/makeThis.html&#039;, { lock:true }, this, function( result ) {} );&lt;br /&gt;
        } ) );   &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Dialogs ===&lt;br /&gt;
&lt;br /&gt;
At first, you shouldn&#039;t use dialogs windows.&lt;br /&gt;
&lt;br /&gt;
BGA guidelines specify that all game elements should be displayed on the main screen. Players can eventually scroll down to see game elements they don&#039;t need to see anytime, and you may eventually create anchors to move between game area section. Of course dialogs windows are very practical, but the thing is: all players know how to scroll down, and not all players know how to show up your dialog window. In addition, when the dialog shows up, players can&#039;t access the other game components.&lt;br /&gt;
&lt;br /&gt;
Sometimes although, you need to display a dialog window. Here is how you do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  // Create the new dialog. You should store the handler in a member variable to access it later&lt;br /&gt;
  this.myDlg = new dijit.Dialog({ title: _(&amp;quot;my dialog title to translate&amp;quot;) });&lt;br /&gt;
&lt;br /&gt;
  // Create the HTML of my dialog. The best practice here is to use [[Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl#Javascript_templates|Javascript templates]]:&lt;br /&gt;
  var html = this.format_block( &#039;jstpl_myDialogTemplate&#039;, { &lt;br /&gt;
                arg1: myArg1,&lt;br /&gt;
                arg2: myArg2,&lt;br /&gt;
                ...&lt;br /&gt;
            } );  &lt;br /&gt;
&lt;br /&gt;
  // Show the dialog&lt;br /&gt;
  this.myDlg.attr(&amp;quot;content&amp;quot;, html );&lt;br /&gt;
  this.myDlg.show(); &lt;br /&gt;
&lt;br /&gt;
  // Now that the dialog has been displayed, you can connect your method to some dialog elements&lt;br /&gt;
  // Example, a &amp;quot;close&amp;quot; button:&lt;br /&gt;
  dojo.connect( $(&#039;closeDlg&#039;), &#039;onclick&#039;, this, function(evt){&lt;br /&gt;
                evt.preventDefault();&lt;br /&gt;
                this.myDlg.hide();&lt;br /&gt;
            } );  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tip: be careful with &amp;quot;hide()&amp;quot; method to close your dialog: the dialog and its content is not completely removed from the DOM. It can cause you problems if you try to display the same dialog several times. A good practice is to wrap all the content of your dialog in a &amp;quot;&amp;lt;div id=&#039;myDlgContent&#039;&amp;gt;&amp;quot; div element, and to call &amp;quot;dojo.destroy(&#039;myDlgContent&#039;)&amp;quot; before displaying your dialog.&lt;br /&gt;
&lt;br /&gt;
=== Scoring dialogs ===&lt;br /&gt;
&lt;br /&gt;
Sometimes at the end of a round you want to display a big table that details the points wins in each section of the game.&lt;br /&gt;
&lt;br /&gt;
Example: in Hearts game, we display at the end of each round the number of &amp;quot;heart&amp;quot; cards collected by each player, the player who collected the Queen of Spades, and the total number of points loose by each player.&lt;br /&gt;
&lt;br /&gt;
Scoring dialogs are managed entirely on &#039;&#039;&#039;PHP side&#039;&#039;&#039;, but they are described here as their effects are visible only on client side.&lt;br /&gt;
&lt;br /&gt;
Displaying a scoring dialog is quite simple and is using a special notification type: &amp;quot;tableWindow&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // on PHP side:&lt;br /&gt;
  $this-&amp;gt;notifyAllPlayers( &amp;quot;tableWindow&amp;quot;, &#039;&#039;, array(&lt;br /&gt;
            &amp;quot;id&amp;quot; =&amp;gt; &#039;finalScoring&#039;,&lt;br /&gt;
            &amp;quot;title&amp;quot; =&amp;gt; clienttranslate(&amp;quot;Title of the scoring dialog&amp;quot;),&lt;br /&gt;
            &amp;quot;table&amp;quot; =&amp;gt; $table&lt;br /&gt;
        ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;table&amp;quot; argument is a 2 dimensional PHP array that describe the table you want to display, line by line and column by column.&lt;br /&gt;
&lt;br /&gt;
Example: display an 3x3 array of strings&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   $table = array(&lt;br /&gt;
      array( &amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, &amp;quot;three&amp;quot; ),    // This is my first line&lt;br /&gt;
      array( &amp;quot;four&amp;quot;, &amp;quot;five&amp;quot;, &amp;quot;six&amp;quot; ),    // This is my second line&lt;br /&gt;
      array( &amp;quot;seven&amp;quot;, &amp;quot;height&amp;quot;, &amp;quot;nine&amp;quot; )    // This is my third line&lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see above, in each &amp;quot;cell&amp;quot; of your array you can display a simple string value. But you can also display a complex value with a template and associated arguments like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   $table = array(&lt;br /&gt;
      array( &amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, array( &amp;quot;str&amp;quot; =&amp;gt; &amp;quot;a string with an ${argument}&amp;quot;, &amp;quot;args&amp;quot; =&amp;gt; array( &#039;argument&#039; =&amp;gt; &#039;argument_value&#039; )  ) ),&lt;br /&gt;
      array( &amp;quot;four&amp;quot;, &amp;quot;five&amp;quot;, &amp;quot;six&amp;quot; ), &lt;br /&gt;
      array( &amp;quot;seven&amp;quot;, &amp;quot;height&amp;quot;, &amp;quot;nine&amp;quot; )&lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is especially useful when you want to display player names with colors. Example from &amp;quot;Hearts&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $firstRow = array( &#039;&#039; );&lt;br /&gt;
        foreach( $players as $player_id =&amp;gt; $player )&lt;br /&gt;
        {&lt;br /&gt;
            $firstRow[] = array( &#039;str&#039; =&amp;gt; &#039;${player_name}&#039;,&lt;br /&gt;
                                 &#039;args&#039; =&amp;gt; array( &#039;player_name&#039; =&amp;gt; $player[&#039;player_name&#039;] ),&lt;br /&gt;
                                 &#039;type&#039; =&amp;gt; &#039;header&#039;&lt;br /&gt;
                               );&lt;br /&gt;
        }&lt;br /&gt;
        $table[] = $firstRow;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update players score ==&lt;br /&gt;
&lt;br /&gt;
Increase a player score (with a positive or negative number):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  this.scoreCtrl[ player_id ].incValue( score_delta );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set a player score to a specific value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  this.scoreCtrl[ player_id ].setValue( new_score );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Players panels ==&lt;br /&gt;
&lt;br /&gt;
=== Adding stuff to player&#039;s panel ===&lt;br /&gt;
&lt;br /&gt;
At first, create a new &amp;quot;JS template&amp;quot; string in your template (tpl) file:&lt;br /&gt;
&lt;br /&gt;
(from Reversi example)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var jstpl_player_board = &#039;\&amp;lt;div class=&amp;quot;cp_board&amp;quot;&amp;gt;\&lt;br /&gt;
    &amp;lt;div id=&amp;quot;stoneicon_p${id}&amp;quot; class=&amp;quot;gmk_stoneicon gmk_stoneicon_${color}&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;span id=&amp;quot;stonecount_p${id}&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;\&lt;br /&gt;
&amp;lt;/div&amp;gt;&#039;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, you add this piece of code in your JS file to add this template to each player panel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            // Setting up player boards&lt;br /&gt;
            for( var player_id in gamedatas.players )&lt;br /&gt;
            {&lt;br /&gt;
                var player = gamedatas.players[player_id];&lt;br /&gt;
                         &lt;br /&gt;
                // Setting up players boards if needed&lt;br /&gt;
                var player_board_div = $(&#039;player_board_&#039;+player_id);&lt;br /&gt;
                dojo.place( this.format_block(&#039;jstpl_player_board&#039;, player ), player_board_div );&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note: the code above is of course from your &amp;quot;setup&amp;quot; function in your Javascript).&lt;br /&gt;
&lt;br /&gt;
Very often, you have to distinguish current player and others players. In this case, you just have to create another JS template (ex: jstpl_otherplayer_board) and use it when &amp;quot;player_id&amp;quot; is different than &amp;quot;this.player_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Player&#039;s panel disabling/enabling ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.disablePlayerPanel( player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Disable given player panel (the panel background become gray).&lt;br /&gt;
&lt;br /&gt;
Usually, this is used to signal that this played passes, or will be inactive during a while.&lt;br /&gt;
&lt;br /&gt;
Note that the only effect of this is visual. There are no consequences on the behaviour of the panel itself.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.enablePlayerPanel( player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Enable a player panel that has been disabled before.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.enableAllPlayerPanels()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Enable all player panels that has been disabled before.&lt;br /&gt;
&lt;br /&gt;
== Image loading ==&lt;br /&gt;
&lt;br /&gt;
See also [[Game_art:_img_directory]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be careful&#039;&#039;&#039;: by default, ALL images of your img directory are loaded on a player&#039;s browser when he loads the game. For this reason, don&#039;t let in your img directory images that are not useful, otherwise it&#039;s going to slowdown the game load.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dontPreloadImage( image_file_name )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using dontPreloadImage, you tell the interface to not preload a specific image in your img directory.&lt;br /&gt;
&lt;br /&gt;
Example of use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.dontPreloadImage( &#039;cards.png&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is particularly useful if for example you have 2 different themes for a game. To accelerate the loading of the game, you can specify to not preload images corresponding to the other theme.&lt;br /&gt;
&lt;br /&gt;
Another example of use: in &amp;quot;Gosu&amp;quot; game with Kamakor extension, you play with 5 sets of cards among 10 available. Cards images are organized by sets, and we only preload the images corresponding to the 5 current sets.&lt;br /&gt;
&lt;br /&gt;
== Other useful stuff ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.hitch&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With dojo.hitch, you can create a callback function that will run with your game object context whatever happen.&lt;br /&gt;
&lt;br /&gt;
Typical example: display a BGA confirmation dialog with a callback function created with dojo.hitch:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        this.confirmationDialog( _(&#039;Are you sure you want to make this?&#039;), dojo.hitch( this, function() {&lt;br /&gt;
            this.ajaxcall( &#039;/mygame/mygame/makeThis.html&#039;, { lock:true }, this, function( result ) {} );&lt;br /&gt;
        } ) );   &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, using dojo.hitch, we are sure that the &amp;quot;this&amp;quot; object will be set when the callback is called.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; updateCounters(counters)&lt;br /&gt;
: Useful for updating game counters in the player panel (such as resources). &lt;br /&gt;
: &#039;counters&#039; arg is an associative array [counter_name_value =&amp;gt; [ &#039;counter_name&#039; =&amp;gt; counter_name_value, &#039;counter_value&#039; =&amp;gt; counter_value_value], ... ]&lt;br /&gt;
: All counters must be referenced in this.gamedatas.counters and will be updated.&lt;br /&gt;
: DOM objects referenced by &#039;counter_name&#039; will have their innerHTML updated with &#039;counter_value&#039;.&lt;br /&gt;
&lt;br /&gt;
== BGA GUI components ==&lt;br /&gt;
&lt;br /&gt;
BGA framework provides some useful ready-to-use components for the game interface:&lt;br /&gt;
&lt;br /&gt;
[[Studio#BGA_Studio_game_components_reference]]&lt;br /&gt;
&lt;br /&gt;
Note that each time you are using an additional component, you must declare it at the top of your Javascript file in the list of modules used.&lt;br /&gt;
&lt;br /&gt;
Example if you are using &amp;quot;ebg.stock&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define([&lt;br /&gt;
    &amp;quot;dojo&amp;quot;,&amp;quot;dojo/_base/declare&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/core/gamegui&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/counter&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/stock&amp;quot;  /// &amp;lt;=== we are using ebg.stock module&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Game_interface_logic:_yourgamename.js&amp;diff=901</id>
		<title>Game interface logic: yourgamename.js</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Game_interface_logic:_yourgamename.js&amp;diff=901"/>
		<updated>2013-06-30T13:34:16Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Animations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This is the main file for your game interface. Here you will define:&lt;br /&gt;
&lt;br /&gt;
* which actions on the page will generate calls to the server&lt;br /&gt;
* what happens when you get a notification for change from the server and how it will show in the browser. &lt;br /&gt;
&lt;br /&gt;
== File structure ==&lt;br /&gt;
&lt;br /&gt;
The details on how the file is structured is described directly with comments on the code skeleton provided to you.&lt;br /&gt;
&lt;br /&gt;
Basically, here&#039;s this structure:&lt;br /&gt;
* constructor: here you can define variable global to your whole interface.&lt;br /&gt;
* setup: this method is called when the page is refreshed, in order you can setup the game interface.&lt;br /&gt;
* onEnteringState: the method is called when entering in a new game state. This way you can customize the view for this game state.&lt;br /&gt;
* onLeavingState: the method is called when leaving a game state.&lt;br /&gt;
* onUpdateActionButtons: called when entering in a new state, in order you can add action buttons in status bar.&lt;br /&gt;
* (utility methods): at this place you can define your utility methods&lt;br /&gt;
* (player&#039;s actions): at this place you can write your handlers for player&#039;s action on the interface (ex: click on an item).&lt;br /&gt;
* setupNotifications: in this method you associate notifications with notification handlers. This way, for each game notification, you trigger a javascript method to handle it and update the game interface.&lt;br /&gt;
* (notification handlers): at this place you can define your notifications handlers.&lt;br /&gt;
&lt;br /&gt;
== General tips ==&lt;br /&gt;
&lt;br /&gt;
; this.player_id&lt;br /&gt;
: Id of the player on whose browser the code is running.&lt;br /&gt;
&lt;br /&gt;
; this.isSpectator&lt;br /&gt;
: Flag set to true if the user at the table is a spectator (not a player).&lt;br /&gt;
: Note: if you want to hide some element for spectators, you&#039;d better use [[Game_interface_stylesheet:_yourgamename.css#spectatorMode|CSS &#039;spectatorMode&#039; class]].&lt;br /&gt;
&lt;br /&gt;
; this.gamedatas&lt;br /&gt;
: Contains your initial set of datas to init the game, created at game start or game refresh (F5)&lt;br /&gt;
: You can update it as needed to keep an up to date reference of the game on the client side if you need it (most of the time you don&#039;t).&lt;br /&gt;
&lt;br /&gt;
; isCurrentPlayerActive()&lt;br /&gt;
: Returns true if the player on whose browser the code is running is currently active (it&#039;s his turn to play)&lt;br /&gt;
&lt;br /&gt;
; this.getActivePlayerId()&lt;br /&gt;
: Return the ID of active player, or null if we are not in a &amp;quot;activeplayer&amp;quot; type state.&lt;br /&gt;
&lt;br /&gt;
; this.getActivePlayers()&lt;br /&gt;
: Return an array with the IDs of players that are currently active (or an empty array if there is not).&lt;br /&gt;
&lt;br /&gt;
== Dojo framework ==&lt;br /&gt;
&lt;br /&gt;
BGA is using the [http://dojotoolkit.org/ Dojo Javascript framework].&lt;br /&gt;
&lt;br /&gt;
The Dojo framework allows us to do complex things easier, and the BGA framework is using Dojo framework a lot.&lt;br /&gt;
&lt;br /&gt;
To realize game although, you only need to use a few part of the Dojo framework. All the Dojo methods you need to use are describe on this page.&lt;br /&gt;
&lt;br /&gt;
== Access and manipulate the DOM ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$(&#039;some_html_element_id&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The $() function is used to get some HTML element using its &amp;quot;id&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
Example 1: modify the content of a &amp;quot;span&amp;quot; element:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In your HTML code:&lt;br /&gt;
   &amp;lt;span id=&amp;quot;a_value_in_the_game_interface&amp;quot;&amp;gt;1234&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your Javascript code:&lt;br /&gt;
   $(&#039;a_value_in_the_game_interface&#039;).innerHTML = &amp;quot;9999&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: $() is the standard method to access some HTML element with BGA Framework. You must not use &amp;quot;getElementById&amp;quot; function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.style&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With dojo.style you can modify a CSS property of any HTML element of your interface.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // Make an element disappear&lt;br /&gt;
     dojo.style( &#039;my_element&#039;, &#039;display&#039;, &#039;none&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Give an element a 2px border&lt;br /&gt;
     dojo.style( &#039;my_element&#039;, &#039;borderWidth&#039;, &#039;2px&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Change the background position of an element&lt;br /&gt;
     // (very practical when you are using CSS sprite to transform an element to another)&lt;br /&gt;
     dojo.style( &#039;my_element&#039;, &#039;backgroundPosition&#039;, &#039;-20px -50px&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: you must always use dojo.style to modify CSS properties of HTML elements.&lt;br /&gt;
&lt;br /&gt;
Note²: if you have to modify several CSS properties of an element, or if you have some complex CSS transformation to do, you should consider using dojo.addClass/dojo.removeClass (see below).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo CSS classes manipulation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In many situation, a bunch of many small CSS property update can be replaced by a CSS class change (ie: you add a CSS class to your element instead of applying all modification manually).&lt;br /&gt;
&lt;br /&gt;
Advantages are:&lt;br /&gt;
* All your CSS stuff remains in your CSS file.&lt;br /&gt;
* You can add/remove a list of CSS modifications with a simple function and whithout error.&lt;br /&gt;
* You can test if you applied the stuff to an element with &amp;quot;dojo.hasClass&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
Example from &amp;quot;Reversi&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // We add &amp;quot;possibleMove&amp;quot; to an element&lt;br /&gt;
    dojo.addClass( &#039;square_&#039;+x+&#039;_&#039;+y, &#039;possibleMove&#039; );&lt;br /&gt;
&lt;br /&gt;
    // In our CSS file, the class is defined as:&lt;br /&gt;
    .possibleMove {&lt;br /&gt;
      background-color: white;&lt;br /&gt;
      opacity: 0.2;&lt;br /&gt;
      filter:alpha(opacity=20); /* For IE8 and earlier */  &lt;br /&gt;
      cursor: pointer;  &lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     // So we&#039;ve applied 4 CSS property change in one line of code.&lt;br /&gt;
&lt;br /&gt;
     // ... and when we need to check if a square is a possible move on client side:&lt;br /&gt;
     if( dojo.hasClass( &#039;square_&#039;+x+&#039;_&#039;+y, &#039;possibleMove&#039; ) )&lt;br /&gt;
     { ... }&lt;br /&gt;
&lt;br /&gt;
     // ... and if we want to remove all possible moves in one line of code (see &amp;quot;dojo.query&amp;quot; method):&lt;br /&gt;
     dojo.query( &#039;.possibleMove&#039; ).removeClass( &#039;possibleMove&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conclusion: we encourage you to use dojo.addClass, dojo.removeClass and dojo.hasClass to make your life easier :)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.query&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With dojo.query, you can query a bunch of HTML elements with a single function, with a &amp;quot;CSS selector&amp;quot; style.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // All elements with class &amp;quot;possibleMove&amp;quot;:&lt;br /&gt;
     var elements = dojo.query( &#039;.possibleMove&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Count number of tokens (ie: elements with class &amp;quot;token&amp;quot;) on the board (ie: element with id &amp;quot;board&amp;quot;):&lt;br /&gt;
     dojo.query( &#039;#board .token&#039; ).length;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But what is really cool with dojo.query is that you can combine it with almost all methods above.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // Trigger a method when the mouse enter in any element with class &amp;quot;meeple&amp;quot;:&lt;br /&gt;
     dojo.query( &#039;.meeple&#039; ).connect( &#039;onmouseenter&#039;, this, &#039;myMethodToTrigger&#039; );&lt;br /&gt;
&lt;br /&gt;
     // Hide all meeples who are on the board&lt;br /&gt;
     dojo.query( &#039;#board .meeple&#039; ).style( &#039;display&#039;, &#039;none&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.place&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
dojo.place is the best function to insert some HTML code somewhere in your game interface without breaking something. It is much better to use that &amp;quot;innerHTML=&#039;&#039;&amp;quot; method as soon as you must insert HTML tags and not only values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // Insert your HTML code as a child of a container element&lt;br /&gt;
     dojo.place( &amp;quot;&amp;lt;your html code&amp;gt;&amp;quot;, &amp;quot;your_container_element_id&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
     // Replace the container element with your new html&lt;br /&gt;
     dojo.place( &amp;quot;&amp;lt;your html code&amp;gt;&amp;quot;, &amp;quot;your_container_element_id&amp;quot;, &amp;quot;replace&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: the third parameter of dojo.place can take various interesting value: &amp;quot;first&amp;quot;, &amp;quot;after&amp;quot;, ... [http://dojotoolkit.org/reference-guide/1.7/dojo/place.html See full doc on dojo.place].&lt;br /&gt;
&lt;br /&gt;
Usually, when you want to insert some piece of HTML in your game interface, you should use &amp;quot;[[Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl#Javascript_templates|Javascript templates]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addStyleToClass: function( cssClassName, cssProperty, propertyValue )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as dojo.style(), but for all the nodes set with the specified cssClassName&lt;br /&gt;
&lt;br /&gt;
=== Animations ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dojo Animations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BGA animations is based on Dojo Animation ([http://dojotoolkit.org/documentation/tutorials/1.8/animation/ see tutorial here]).&lt;br /&gt;
&lt;br /&gt;
However, most of the time, you can just use methods below, which are built on top of Dojo Animation.&lt;br /&gt;
&lt;br /&gt;
Note: one interesting method from Dojo that could be useful from time to time is &amp;quot;Dojo.Animation&amp;quot;. It allows you to make any CSS property &amp;quot;slide&amp;quot; from one value to another.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideToObject( mobile_obj, target_obj, duration, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use slideToObject to &amp;quot;slide&amp;quot; an element to a target position.&lt;br /&gt;
&lt;br /&gt;
Sliding element on the game area is the recommended and the most used way to animate your game interface. Using slides allow players to figure out what is happening on the game, as if they were playing with the real boardgame.&lt;br /&gt;
&lt;br /&gt;
The parameters are:&lt;br /&gt;
* mobile_obj: the ID of the object to move. This object must be &amp;quot;relative&amp;quot; or &amp;quot;absolute&amp;quot; positioned.&lt;br /&gt;
* target_obj: the ID of the target object. This object must be &amp;quot;relative&amp;quot; or &amp;quot;absolute&amp;quot; positioned. Note that it is not mandatory that mobile_obj and target_obj have the same size. If their size are different, the system slides the center of mobile_obj to the center of target_obj.&lt;br /&gt;
* duration: (optional) defines the duration in millisecond of the slide. The default is 500 milliseconds.&lt;br /&gt;
* delay: (optional). If you defines a delay, the slide will start only after this delay. This is particularly useful when you want to slide several object from the same position to the same position: you can give a 0ms delay to the first object, a 100ms delay to the second one, a 200ms delay to the third one, ... this way they won&#039;t be superposed during the slide.&lt;br /&gt;
&lt;br /&gt;
BE CAREFUL: The method returns an dojo.fx animation, so you can combine it with other animation if you want to. It means that you have to call the &amp;quot;play()&amp;quot; method, otherwise the animation WON&#039;T START.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.slideToObject( &amp;quot;some_token&amp;quot;, &amp;quot;some_place_on_board&amp;quot; ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideToObjectPos( mobile_obj, target_obj, target_x, target_y, duration, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method does exactly the same than &amp;quot;slideToObjectPos&amp;quot;, except than you can specify some (x,y) coordinates. This way, &amp;quot;mobile_obj&amp;quot; will slide to the specified x,y position relatively to &amp;quot;target_obj&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example: slide a token to some place on the board, 10 pixels to the bottom:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.slideToObjectPos( &amp;quot;some_token&amp;quot;, &amp;quot;some_place_on_board&amp;quot;, 0, 10 ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideTemporaryObject( mobile_obj_html, mobile_obj_parent, from, to, duration, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method is useful when you want to slide a temporary HTML object from one place to another. As this object does not exists before the animation and won&#039;t remain after, it could be complex to create this object (with dojo.place), to place it at its origin (with placeOnObject) to slide it (with slideToObject) and to make it disappear at the end.&lt;br /&gt;
&lt;br /&gt;
slideTemporaryObject does all of this for you:&lt;br /&gt;
* mobile_obj_html is a piece of HTML code that represent the object to slide.&lt;br /&gt;
* mobile_obj_parent is the ID of an HTML element of your interface that will be the parent of this temporary HTML object.&lt;br /&gt;
* from is the ID of the origin of the slide.&lt;br /&gt;
* to is the ID of the target of the slide.&lt;br /&gt;
* duration/delay works exactly like in &amp;quot;slideToObject&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.slideTemporaryObject( &#039;&amp;lt;div class=&amp;quot;token_icon&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;, &#039;tokens&#039;, &#039;my_origin_div&#039;, &#039;my_target_div&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.slideToObjectAndDestroy: function( node, to, time, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method is a handy shortcut to slide an existing HTML object to some place then destroy it upon arrival. It can be used for example to move a victory token or a card from the board to the player panel to show that the player earns it, then destroy it when we don&#039;t need to keep it visible on the player panel.&lt;br /&gt;
&lt;br /&gt;
It works the same as this.slideToObject and takes the same arguments. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.slideToObjectAndDestroy( &amp;quot;some_token&amp;quot;, &amp;quot;some_place_on_board&amp;quot; ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.fadeOutAndDestroy( node )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function fade out the target HTML node, then destroy it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.fadeOutAndDestroy( &amp;quot;a_card_that_must_disappear&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CAREFUL: the HTML node still exists until during few milliseconds, until the fadeOut has been completed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rotating elements&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can check here [http://jimfulton.info/demos/dojo-animated-rotate.html an example of use] of Dojo to make an element rotate.&lt;br /&gt;
&lt;br /&gt;
This example combines &amp;quot;Dojo.Animation&amp;quot; method and a CSS3 property that allow you to rotate the element.&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: to asses browser compatibility, you must select the CSS property to use just like in the example (see sourcecode below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        var transform;&lt;br /&gt;
        dojo.forEach(&lt;br /&gt;
            [&#039;transform&#039;, &#039;WebkitTransform&#039;, &#039;msTransform&#039;,&lt;br /&gt;
             &#039;MozTransform&#039;, &#039;OTransform&#039;],&lt;br /&gt;
            function (name) {&lt;br /&gt;
                if (typeof dojo.body().style[name] != &#039;undefined&#039;) {&lt;br /&gt;
                    transform = name;&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
        // ... and then use &amp;quot;transform&amp;quot; as the name of your CSS property for rotation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Moving elements ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.placeOnObject( mobile_obj, target_obj )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
placeOnObject works exactly like &amp;quot;slideToObject&amp;quot;, except that the effect is immediate.&lt;br /&gt;
&lt;br /&gt;
This is not really an animation, but placeOnObject is frequently used before starting an animation.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // (We just created an object &amp;quot;my_new_token&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  // Place the new token on current player board&lt;br /&gt;
  this.placeOnObject( &amp;quot;my_new_token&amp;quot;, &amp;quot;overall_player_board_&amp;quot;+this.player_id );&lt;br /&gt;
  &lt;br /&gt;
  // Then slide it to its position on the board&lt;br /&gt;
  this.slideToObject( &amp;quot;my_new_token&amp;quot;, &amp;quot;a_place_on_board&amp;quot; ).play();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.placeOnObjectPos( mobile_obj, target_obj, target_x, target_y )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method works exactly like placeOnObject, except than you can specify some (x,y) coordinates. This way, &amp;quot;mobile_obj&amp;quot; will be placed to the specified x,y position relatively to &amp;quot;target_obj&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.attachToNewParent( mobile_obj, target_obj )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With this method, you change the HTML parent of &amp;quot;mobile_obj&amp;quot; element. &amp;quot;target_obj&amp;quot; is the new parent of this element. The beauty of &lt;br /&gt;
attachToNewParent is that the mobile_obj element DOES NOT MOVE during this process.&lt;br /&gt;
&lt;br /&gt;
Note: what happens is that the method calculate a relative position of mobile_obj to make sure it does not move after the HTML parent changes.&lt;br /&gt;
&lt;br /&gt;
Why using this method?&lt;br /&gt;
&lt;br /&gt;
Changing the HTML parent of an element can be useful for the following reasons:&lt;br /&gt;
* When the HTML parent moves, all its child are moving with them. If some game elements is no more linked with a parent HTML object, you may want to attach it to another place.&lt;br /&gt;
* The z_order (vertical order of display) depends on the position in the DOM, so you may need to change the parent of some game elements when they are moving in your game area.&lt;br /&gt;
&lt;br /&gt;
CAREFUL: when you attach an HTML element with a new parent, you break all references to this HTML element (ex: dojo.connect).&lt;br /&gt;
&lt;br /&gt;
== Players input ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.connect&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to associate a player event with one of your notification method.&lt;br /&gt;
&lt;br /&gt;
Example: associate a click on an element (&amp;quot;my_element&amp;quot;) with one of our method (&amp;quot;onClickOnMyElement&amp;quot;):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      dojo.connect( $(&#039;my_element&#039;), &#039;onClick&#039;, this, &#039;onClickOnMyElement&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: this is the only possible correct way to associate a player input event to your code, and you must not use anything else.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.checkAction( &amp;quot;my_action_name&amp;quot; )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Usage: checkAction: function( action, nomessage )&lt;br /&gt;
&lt;br /&gt;
Check if player can do the specified action by taking into account:&lt;br /&gt;
* current game state&lt;br /&gt;
* interface locking (a player can&#039;t do any action if an action is already in progress)&lt;br /&gt;
&lt;br /&gt;
return true if action is authorized (ie: the action is listed as a &amp;quot;possibleaction&amp;quot; in current game state).&lt;br /&gt;
&lt;br /&gt;
return false and display an error message if not (display no message if nomessage parameter is true). The displayed error message could be either &amp;quot;This move is not allowed at this moment&amp;quot; or &amp;quot;An action is already in progress&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function onClickOnGameElement( evt )&lt;br /&gt;
  {&lt;br /&gt;
     if( this.checkAction( &amp;quot;my_action&amp;quot; ) )&lt;br /&gt;
     {&lt;br /&gt;
        // Do the action&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.ajaxcall( url, parameters, obj_callback, callback, callback_error )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method must be used to send a player input to the game server.&lt;br /&gt;
&lt;br /&gt;
* url: the url of the action to perform. For a game, it must be: &amp;quot;/&amp;lt;mygame&amp;gt;/&amp;lt;mygame&amp;gt;/myAction.html&amp;quot;&lt;br /&gt;
* parameters: an array of parameter to send to the game server. Note that &amp;quot;lock:true&amp;quot; must always be specified in this list of parameter in order the interface can be locked during the server call.&lt;br /&gt;
* obj_callback: must be set to &amp;quot;this&amp;quot;.&lt;br /&gt;
* callback: a function to trigger when the server returns and everything went fine.&lt;br /&gt;
* callback_error: (optional and rarely used) a function to trigger when the server returns an error.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.ajaxcall( &#039;/mygame/mygame/myaction.html&#039;, { lock: true, &lt;br /&gt;
   arg1: myarg1, &lt;br /&gt;
   arg2: myarg2, &lt;br /&gt;
   ...&lt;br /&gt;
}, this, function( result ) {&lt;br /&gt;
   // Do some stuff after a successful call&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restricted arguments names (please don&#039;t use them):&lt;br /&gt;
* &amp;quot;action&amp;quot;&lt;br /&gt;
* &amp;quot;module&amp;quot;&lt;br /&gt;
* &amp;quot;class&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.confirmationDialog()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Display a confirmation dialog with a yes/no choice.&lt;br /&gt;
&lt;br /&gt;
We advice you to NOT use this function unless the player action is really critical and could ruins the game, because it slows down the game and upset players.&lt;br /&gt;
&lt;br /&gt;
Usage: this.confirmationDialog( &amp;quot;Question to displayed&amp;quot;, callback_function_if_click_on_yes );&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.confirmationDialog( _(&#039;Are you sure to use this bonus (points penalty at the end of the game) ?&#039;),&lt;br /&gt;
                         dojo.hitch( this, function() {&lt;br /&gt;
                           this.ajaxcall( &#039;/seasons/seasons/useBonus.html&#039;,&lt;br /&gt;
                                { id:bonus_id, lock:true }, this, function( result ) {} );&lt;br /&gt;
                        } ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; addEventToClass: function( cssClassName, eventName, functionName )&lt;br /&gt;
: Same as dojo.connect(), but for all the nodes set with the specified cssClassName&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addActionButton( id, label, method, (opt)depreciated, (opt)bHighlight )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use this method to add an action button in the main action status bar.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* id: a ID that should be unique in your HTML DOM document.&lt;br /&gt;
* label: the text of the button. Should be translatable (use _() function).&lt;br /&gt;
* method: the name of your method that must be triggered when the player clicks on this button.&lt;br /&gt;
* depreciated (optional): do not use this. Please not specify this argument or use &amp;quot;null&amp;quot;.&lt;br /&gt;
* bHighlight: if set to &amp;quot;true&amp;quot;, the button is going blink to catch player&#039;s attention. Please don&#039;t abuse of blinking button.&lt;br /&gt;
&lt;br /&gt;
You should only use this method in your &amp;quot;onUpdateActionButtons&amp;quot; method. Usually, you use it like this (from Hears example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        onUpdateActionButtons: function( stateName, args )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &#039;onUpdateActionButtons: &#039;+stateName );&lt;br /&gt;
                      &lt;br /&gt;
            if( this.isCurrentPlayerActive() )&lt;br /&gt;
            {            &lt;br /&gt;
                switch( stateName )&lt;br /&gt;
                {&lt;br /&gt;
                case &#039;giveCards&#039;:&lt;br /&gt;
                    this.addActionButton( &#039;giveCards_button&#039;, _(&#039;Give selected cards&#039;), &#039;onGiveCards&#039; ); &lt;br /&gt;
                    break;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        },   &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, we are adding a &amp;quot;Give selected cards&amp;quot; button in the case we are on game state &amp;quot;giveCards&amp;quot;. When player clicks on this button, it triggers our &amp;quot;onGiveCards&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
See [[Translations]]&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
&lt;br /&gt;
When something happens on the server side, your game interface Javascript logic received a notification.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how you can handle these notifications on the client side.&lt;br /&gt;
&lt;br /&gt;
=== Subscribe to notifications ===&lt;br /&gt;
&lt;br /&gt;
Your Javascript &amp;quot;setupNotifications&amp;quot; method is the place where you can subscribe to notifications from your PHP code.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how you associate one of your Javascript method to a notification &amp;quot;playDisc&amp;quot; (from Reversi example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   // In setupNotifications method:&lt;br /&gt;
   dojo.subscribe( &#039;playDisc&#039;, this, &amp;quot;notif_playDisc&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: the &amp;quot;playDisc&amp;quot; corresponds to the name of the notification you define it in your PHP code, in your &amp;quot;notifyAllPlayers&amp;quot; or &amp;quot;notifyPlayer&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
Then, you have to define your &amp;quot;notif_playDisc&amp;quot; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        notif_playDisc: function( notif )&lt;br /&gt;
        {&lt;br /&gt;
            // Remove current possible moves (makes the board more clear)&lt;br /&gt;
            dojo.query( &#039;.possibleMove&#039; ).removeClass( &#039;possibleMove&#039; );        &lt;br /&gt;
        &lt;br /&gt;
            this.addDiscOnBoard( notif.args.x, notif.args.y, notif.args.player_id );&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In a notification handler like our &amp;quot;notif_playDisc&amp;quot; method, you can access to all notifications arguments with &amp;quot;notif.args&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // If you did this on PHP side:&lt;br /&gt;
    self::notifyAllPlayers( &amp;quot;myNotification&amp;quot;, &#039;&#039;, array( &amp;quot;myArgument&amp;quot; =&amp;gt; 3 ) );&lt;br /&gt;
&lt;br /&gt;
    // On Javascript side, you can access the &amp;quot;myArgument&amp;quot; like this:&lt;br /&gt;
    notif_myNotification: function( notif )&lt;br /&gt;
    {&lt;br /&gt;
       alert( &amp;quot;myArgument = &amp;quot; + notif.args.myArgument );&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Synchronous notifications ===&lt;br /&gt;
&lt;br /&gt;
When several notifications are received by your game interface, these notifications are processed immediately, one after the other, in the same exact order they have been generated in your PHP game logic.&lt;br /&gt;
&lt;br /&gt;
However, sometimes, you need to give some time to the players to figure out what happened on the game before jumping to the next notification. Indeed, in many games, they are a lot of automatic actions, and the computer is going to resolve all these actions very fast if you don&#039;t tell it not to do so.&lt;br /&gt;
&lt;br /&gt;
As an example, for Reversi, when someone is playing a disc, we want to wait 500 milliseconds before doing anything else in order the opponent player can figure out what move has been played.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how we do this, right after our subscription:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       dojo.subscribe( &#039;playDisc&#039;, this, &amp;quot;notif_playDisc&amp;quot; );&lt;br /&gt;
       this.notifqueue.setSynchronous( &#039;playDisc&#039;, 500 );   // Wait 500 milliseconds after executing the playDisc handler&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tooltips ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addTooltip( nodeId, _( helpString ), _( actionString ), delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a simple text tooltip to the DOM node.&lt;br /&gt;
&lt;br /&gt;
Specify &#039;helpString&#039; to display some information about &amp;quot;what is this game element?&amp;quot;.&lt;br /&gt;
Specify &#039;actionString&#039; to display some information about &amp;quot;what happens when I click on this element?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You must specify both helpString and actionString. Most of the time, you use only one and specify a void string (&amp;quot;&amp;quot;) for the other one.&lt;br /&gt;
&lt;br /&gt;
Usually, _() must be used for the text to be marked for translation.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Delay&amp;quot; is an optional parameter. Usually, it is primarily used to specify a zero delay for some game element when the tooltip gives really important information for the game - but remember: no essential information must be placed in tooltips as they won&#039;t be displayed in some browser (see Guidelines).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   this.addTooltip( &#039;cardcount&#039;, _(&#039;Number of cards in hand&#039;), &#039;&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addTooltipHtml( nodeId, html, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add an HTML tooltip to the DOM node (for more elaborate content such as presenting a bigger version of a card).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.addTooltipToClass( cssClass, _( helpString ), _( actionString ), delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a simple text tooltip to all the DOM nodes set with this cssClass. &lt;br /&gt;
&lt;br /&gt;
IMPORTANT: all concerned nodes must have IDs to get tooltips.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;addTooltipHtmlToClass( cssClass, html, delay )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add an HTML tooltip to to all the DOM nodes set with this cssClass (for more elaborate content such as presenting a bigger version of a card).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: all concerned nodes must have IDs to get tooltips&lt;br /&gt;
&lt;br /&gt;
== Dialogs, warning messages, confirmation dialogs, ... ==&lt;br /&gt;
&lt;br /&gt;
=== Warning messages ===&lt;br /&gt;
&lt;br /&gt;
Sometimes, there is something important that is happening on the game and you have to make sure all players get the message. Most of the time, the evolution of the game situation or the game log is enough, but sometimes you need something more visible.&lt;br /&gt;
&lt;br /&gt;
Ex: someone fulfill one of the end of the game condition, so this is the last turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.showMessage( msg, type )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
showMessage shows a message in a big rectangular area on the top of the screen of current player.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;msg&amp;quot; is the string to display. It should be translated.&lt;br /&gt;
* &amp;quot;type&amp;quot; can be set to &amp;quot;info&amp;quot; or &amp;quot;error&amp;quot;. If set to &amp;quot;info&amp;quot;, the message will be an informative message on a white background. If set to &amp;quot;error&amp;quot;, the message will be an error message on a red background.&lt;br /&gt;
&lt;br /&gt;
Important: the normal way to inform players about the progression of the game is the game log. &amp;quot;showMessage&amp;quot; is intrusive and should not be used often.&lt;br /&gt;
&lt;br /&gt;
=== Confirmation dialog ===&lt;br /&gt;
&lt;br /&gt;
When an important action with a lot of consequences is triggered by the player, you may want to propose a confirmation dialog.&lt;br /&gt;
&lt;br /&gt;
CAREFUL: the general guidelines of BGA is to AVOID the use of confirmation dialog. Confirmation dialogs slow down the game and bother players. The players knows that they have to pay attention about each move when they are playing online.&lt;br /&gt;
&lt;br /&gt;
The situation where you should use a confirmation dialog are the following:&lt;br /&gt;
* It must not happen very often during a game.&lt;br /&gt;
* It must be linked to an action that can really &amp;quot;kill a game&amp;quot; if the player do not pay attention.&lt;br /&gt;
* It must be something that can be done by mistake (ex: a link on the action status bar).&lt;br /&gt;
&lt;br /&gt;
How to display a confirmation dialog:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        this.confirmationDialog( _(&#039;Are you sure you want to make this?&#039;), dojo.hitch( this, function() {&lt;br /&gt;
            this.ajaxcall( &#039;/mygame/mygame/makeThis.html&#039;, { lock:true }, this, function( result ) {} );&lt;br /&gt;
        } ) );   &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Dialogs ===&lt;br /&gt;
&lt;br /&gt;
At first, you shouldn&#039;t use dialogs windows.&lt;br /&gt;
&lt;br /&gt;
BGA guidelines specify that all game elements should be displayed on the main screen. Players can eventually scroll down to see game elements they don&#039;t need to see anytime, and you may eventually create anchors to move between game area section. Of course dialogs windows are very practical, but the thing is: all players know how to scroll down, and not all players know how to show up your dialog window. In addition, when the dialog shows up, players can&#039;t access the other game components.&lt;br /&gt;
&lt;br /&gt;
Sometimes although, you need to display a dialog window. Here is how you do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  // Create the new dialog. You should store the handler in a member variable to access it later&lt;br /&gt;
  this.myDlg = new dijit.Dialog({ title: _(&amp;quot;my dialog title to translate&amp;quot;) });&lt;br /&gt;
&lt;br /&gt;
  // Create the HTML of my dialog. The best practice here is to use [[Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl#Javascript_templates|Javascript templates]]:&lt;br /&gt;
  var html = this.format_block( &#039;jstpl_myDialogTemplate&#039;, { &lt;br /&gt;
                arg1: myArg1,&lt;br /&gt;
                arg2: myArg2,&lt;br /&gt;
                ...&lt;br /&gt;
            } );  &lt;br /&gt;
&lt;br /&gt;
  // Show the dialog&lt;br /&gt;
  this.myDlg.attr(&amp;quot;content&amp;quot;, html );&lt;br /&gt;
  this.myDlg.show(); &lt;br /&gt;
&lt;br /&gt;
  // Now that the dialog has been displayed, you can connect your method to some dialog elements&lt;br /&gt;
  // Example, a &amp;quot;close&amp;quot; button:&lt;br /&gt;
  dojo.connect( $(&#039;closeDlg&#039;), &#039;onclick&#039;, this, function(evt){&lt;br /&gt;
                evt.preventDefault();&lt;br /&gt;
                this.myDlg.hide();&lt;br /&gt;
            } );  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tip: be careful with &amp;quot;hide()&amp;quot; method to close your dialog: the dialog and its content is not completely removed from the DOM. It can cause you problems if you try to display the same dialog several times. A good practice is to wrap all the content of your dialog in a &amp;quot;&amp;lt;div id=&#039;myDlgContent&#039;&amp;gt;&amp;quot; div element, and to call &amp;quot;dojo.destroy(&#039;myDlgContent&#039;)&amp;quot; before displaying your dialog.&lt;br /&gt;
&lt;br /&gt;
=== Scoring dialogs ===&lt;br /&gt;
&lt;br /&gt;
Sometimes at the end of a round you want to display a big table that details the points wins in each section of the game.&lt;br /&gt;
&lt;br /&gt;
Example: in Hearts game, we display at the end of each round the number of &amp;quot;heart&amp;quot; cards collected by each player, the player who collected the Queen of Spades, and the total number of points loose by each player.&lt;br /&gt;
&lt;br /&gt;
Scoring dialogs are managed entirely on &#039;&#039;&#039;PHP side&#039;&#039;&#039;, but they are described here as their effects are visible only on client side.&lt;br /&gt;
&lt;br /&gt;
Displaying a scoring dialog is quite simple and is using a special notification type: &amp;quot;tableWindow&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // on PHP side:&lt;br /&gt;
  $this-&amp;gt;notifyAllPlayers( &amp;quot;tableWindow&amp;quot;, &#039;&#039;, array(&lt;br /&gt;
            &amp;quot;id&amp;quot; =&amp;gt; &#039;finalScoring&#039;,&lt;br /&gt;
            &amp;quot;title&amp;quot; =&amp;gt; clienttranslate(&amp;quot;Title of the scoring dialog&amp;quot;),&lt;br /&gt;
            &amp;quot;table&amp;quot; =&amp;gt; $table&lt;br /&gt;
        ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;table&amp;quot; argument is a 2 dimensional PHP array that describe the table you want to display, line by line and column by column.&lt;br /&gt;
&lt;br /&gt;
Example: display an 3x3 array of strings&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   $table = array(&lt;br /&gt;
      array( &amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, &amp;quot;three&amp;quot; ),    // This is my first line&lt;br /&gt;
      array( &amp;quot;four&amp;quot;, &amp;quot;five&amp;quot;, &amp;quot;six&amp;quot; ),    // This is my second line&lt;br /&gt;
      array( &amp;quot;seven&amp;quot;, &amp;quot;height&amp;quot;, &amp;quot;nine&amp;quot; )    // This is my third line&lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see above, in each &amp;quot;cell&amp;quot; of your array you can display a simple string value. But you can also display a complex value with a template and associated arguments like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   $table = array(&lt;br /&gt;
      array( &amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, array( &amp;quot;str&amp;quot; =&amp;gt; &amp;quot;a string with an ${argument}&amp;quot;, &amp;quot;args&amp;quot; =&amp;gt; array( &#039;argument&#039; =&amp;gt; &#039;argument_value&#039; )  ) ),&lt;br /&gt;
      array( &amp;quot;four&amp;quot;, &amp;quot;five&amp;quot;, &amp;quot;six&amp;quot; ), &lt;br /&gt;
      array( &amp;quot;seven&amp;quot;, &amp;quot;height&amp;quot;, &amp;quot;nine&amp;quot; )&lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is especially useful when you want to display player names with colors. Example from &amp;quot;Hearts&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $firstRow = array( &#039;&#039; );&lt;br /&gt;
        foreach( $players as $player_id =&amp;gt; $player )&lt;br /&gt;
        {&lt;br /&gt;
            $firstRow[] = array( &#039;str&#039; =&amp;gt; &#039;${player_name}&#039;,&lt;br /&gt;
                                 &#039;args&#039; =&amp;gt; array( &#039;player_name&#039; =&amp;gt; $player[&#039;player_name&#039;] ),&lt;br /&gt;
                                 &#039;type&#039; =&amp;gt; &#039;header&#039;&lt;br /&gt;
                               );&lt;br /&gt;
        }&lt;br /&gt;
        $table[] = $firstRow;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update players score ==&lt;br /&gt;
&lt;br /&gt;
Increase a player score (with a positive or negative number):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  this.scoreCtrl[ player_id ].incValue( score_delta );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set a player score to a specific value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  this.scoreCtrl[ player_id ].setValue( new_score );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Players panels ==&lt;br /&gt;
&lt;br /&gt;
=== Adding stuff to player&#039;s panel ===&lt;br /&gt;
&lt;br /&gt;
At first, create a new &amp;quot;JS template&amp;quot; string in your template (tpl) file:&lt;br /&gt;
&lt;br /&gt;
(from Reversi example)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var jstpl_player_board = &#039;\&amp;lt;div class=&amp;quot;cp_board&amp;quot;&amp;gt;\&lt;br /&gt;
    &amp;lt;div id=&amp;quot;stoneicon_p${id}&amp;quot; class=&amp;quot;gmk_stoneicon gmk_stoneicon_${color}&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;span id=&amp;quot;stonecount_p${id}&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt;\&lt;br /&gt;
&amp;lt;/div&amp;gt;&#039;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, you add this piece of code in your JS file to add this template to each player panel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            // Setting up player boards&lt;br /&gt;
            for( var player_id in gamedatas.players )&lt;br /&gt;
            {&lt;br /&gt;
                var player = gamedatas.players[player_id];&lt;br /&gt;
                         &lt;br /&gt;
                // Setting up players boards if needed&lt;br /&gt;
                var player_board_div = $(&#039;player_board_&#039;+player_id);&lt;br /&gt;
                dojo.place( this.format_block(&#039;jstpl_player_board&#039;, player ), player_board_div );&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note: the code above is of course from your &amp;quot;setup&amp;quot; function in your Javascript).&lt;br /&gt;
&lt;br /&gt;
Very often, you have to distinguish current player and others players. In this case, you just have to create another JS template (ex: jstpl_otherplayer_board) and use it when &amp;quot;player_id&amp;quot; is different than &amp;quot;this.player_id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Player&#039;s panel disabling/enabling ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.disablePlayerPanel( player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Disable given player panel (the panel background become gray).&lt;br /&gt;
&lt;br /&gt;
Usually, this is used to signal that this played passes, or will be inactive during a while.&lt;br /&gt;
&lt;br /&gt;
Note that the only effect of this is visual. There are no consequences on the behaviour of the panel itself.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.enablePlayerPanel( player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Enable a player panel that has been disabled before.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this.enableAllPlayerPanels()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Enable all player panels that has been disabled before.&lt;br /&gt;
&lt;br /&gt;
== Image loading ==&lt;br /&gt;
&lt;br /&gt;
See also [[Game_art:_img_directory]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be careful&#039;&#039;&#039;: by default, ALL images of your img directory are loaded on a player&#039;s browser when he loads the game. For this reason, don&#039;t let in your img directory images that are not useful, otherwise it&#039;s going to slowdown the game load.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dontPreloadImage( image_file_name )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using dontPreloadImage, you tell the interface to not preload a specific image in your img directory.&lt;br /&gt;
&lt;br /&gt;
Example of use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.dontPreloadImage( &#039;cards.png&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is particularly useful if for example you have 2 different themes for a game. To accelerate the loading of the game, you can specify to not preload images corresponding to the other theme.&lt;br /&gt;
&lt;br /&gt;
Another example of use: in &amp;quot;Gosu&amp;quot; game with Kamakor extension, you play with 5 sets of cards among 10 available. Cards images are organized by sets, and we only preload the images corresponding to the 5 current sets.&lt;br /&gt;
&lt;br /&gt;
== Other useful stuff ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dojo.hitch&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With dojo.hitch, you can create a callback function that will run with your game object context whatever happen.&lt;br /&gt;
&lt;br /&gt;
Typical example: display a BGA confirmation dialog with a callback function created with dojo.hitch:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        this.confirmationDialog( _(&#039;Are you sure you want to make this?&#039;), dojo.hitch( this, function() {&lt;br /&gt;
            this.ajaxcall( &#039;/mygame/mygame/makeThis.html&#039;, { lock:true }, this, function( result ) {} );&lt;br /&gt;
        } ) );   &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, using dojo.hitch, we are sure that the &amp;quot;this&amp;quot; object will be set when the callback is called.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; updateCounters(counters)&lt;br /&gt;
: Useful for updating game counters in the player panel (such as resources). &lt;br /&gt;
: &#039;counters&#039; arg is an associative array [counter_name_value =&amp;gt; [ &#039;counter_name&#039; =&amp;gt; counter_name_value, &#039;counter_value&#039; =&amp;gt; counter_value_value], ... ]&lt;br /&gt;
: All counters must be referenced in this.gamedatas.counters and will be updated.&lt;br /&gt;
: DOM objects referenced by &#039;counter_name&#039; will have their innerHTML updated with &#039;counter_value&#039;.&lt;br /&gt;
&lt;br /&gt;
== BGA GUI components ==&lt;br /&gt;
&lt;br /&gt;
BGA framework provides some useful ready-to-use components for the game interface:&lt;br /&gt;
&lt;br /&gt;
[[Studio#BGA_Studio_game_components_reference]]&lt;br /&gt;
&lt;br /&gt;
Note that each time you are using an additional component, you must declare it at the top of your Javascript file in the list of modules used.&lt;br /&gt;
&lt;br /&gt;
Example if you are using &amp;quot;ebg.stock&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define([&lt;br /&gt;
    &amp;quot;dojo&amp;quot;,&amp;quot;dojo/_base/declare&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/core/gamegui&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/counter&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/stock&amp;quot;  /// &amp;lt;=== we are using ebg.stock module&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=888</id>
		<title>Gamehelpelfenland</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=888"/>
		<updated>2013-06-16T13:00:56Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Goal of the game */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Goal of the game ==&lt;br /&gt;
&lt;br /&gt;
Visiting as many cities as possible in Elfenland over 4 rounds.&lt;br /&gt;
&lt;br /&gt;
At the end of the 4th round, the player who collected the most Town Pieces wins.&lt;br /&gt;
&lt;br /&gt;
We advise you to play with at least 3 players to best enjoy the game (4 or 5 is even better). A lot of the fun comes from using the Transportation Counters set by other players to optimise one&#039;s travels, so the more the merrier!&lt;br /&gt;
&lt;br /&gt;
== Round overview ==&lt;br /&gt;
&lt;br /&gt;
A round is split into phases:&lt;br /&gt;
&lt;br /&gt;
# Each player fills his hand up to 8 cards and gets a secret Transportation Counter.&lt;br /&gt;
# One after another, each player chooses a Transportation Counter from the 5 visible or drawn from the facedown stack, until each player took 3.&lt;br /&gt;
# One after another, each player chooses must plan a travel road by laying a Transportation Counter matching the terrain of the chosen road. This phase goes on until each player has passed consecutively. Each player also owns an Obstacle that he can lay down on a Transportation Counter to up the cost of traveling on this road from 1 card.&lt;br /&gt;
# One after another, each player is going to travel from town to town. The current position of a player is shown by the Elf Boot of his color, initially set on the biggest town, Elvenhold.&lt;br /&gt;
&lt;br /&gt;
At the end of the round, a player can keep a maximum of 4 cards in hand, and keeps only 1 Transportation counter.&lt;br /&gt;
&lt;br /&gt;
== Travel rules ==&lt;br /&gt;
&lt;br /&gt;
Players can travel :&lt;br /&gt;
* on the roads on which a Transportation Counter has been set&lt;br /&gt;
* on the rivers&lt;br /&gt;
* on the lakes.&lt;br /&gt;
&lt;br /&gt;
To travel on a road, a river or a lake, the player needs to pay with the cards in hands the cost matching the terrain of the road and the means of transport used.&lt;br /&gt;
&lt;br /&gt;
For example, if the Transportation Counter &#039;Magic Cloud&#039; has been set on a mountain road, one can travel with just one &#039;Magic Cloud&#039; card. But if it has been set on a forest or plain road, one needs to pay 2 &#039;Magic Cloud&#039; cards to pass (NB: the &#039;Magic Cloud&#039; Transportation Counter cannot be used to travel in the desert, as it&#039;s too hot for a Cloud over there).&lt;br /&gt;
&lt;br /&gt;
Also :&lt;br /&gt;
* To travel a river, you need only 1 &#039;Raft&#039; card to go downriver, but you need 2 to go upriver (look for the small arrows).&lt;br /&gt;
* To cross a lake, you need to pay two &#039;Raft&#039; cards.&lt;br /&gt;
* If an Obstacle has been set on a road, you need to pay 1 more card of the appropriate type.&lt;br /&gt;
* If you don&#039;t have the appropriate cards to travel on a road, you can still pass using a &#039;Caravan&#039;, by paying 3 cards of any type (4 cards if there is an Obstacle on the road).&lt;br /&gt;
&lt;br /&gt;
== Variant ==&lt;br /&gt;
&lt;br /&gt;
In the &#039;Hometown&#039; variant, each player gets a secret town card at the beginning of the game, telling him which town he has to reach at the end of the 4th round.&lt;br /&gt;
&lt;br /&gt;
If he doesn&#039;t manage to get there, he&#039;ll lose as many points as the remaining distance he has to travel to get there.&lt;br /&gt;
&lt;br /&gt;
This variant gives more tactic depth to the game, as you have to plan each round to the best to get the most Town Pieces while making sure to be able to get to your hometown at the end of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Have a good game!&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ms.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=887</id>
		<title>Gamehelpelfenland</title>
		<link rel="alternate" type="text/html" href="https://ms.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=887"/>
		<updated>2013-06-16T12:57:28Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Goal of the game */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Goal of the game ==&lt;br /&gt;
&lt;br /&gt;
Visiting as many cities as possible in Elfenland over 4 rounds.&lt;br /&gt;
&lt;br /&gt;
At the end of the 4th round, the player who collected the most Town Pieces wins.&lt;br /&gt;
&lt;br /&gt;
We advise you to play with at least 3 players to best enjoy the game (4 or 5 is even better). A lot of the fun comes from using the counters from other players to optimise one&#039;s travels, so the more the merrier!&lt;br /&gt;
&lt;br /&gt;
== Round overview ==&lt;br /&gt;
&lt;br /&gt;
A round is split into phases:&lt;br /&gt;
&lt;br /&gt;
# Each player fills his hand up to 8 cards and gets a secret Transportation Counter.&lt;br /&gt;
# One after another, each player chooses a Transportation Counter from the 5 visible or drawn from the facedown stack, until each player took 3.&lt;br /&gt;
# One after another, each player chooses must plan a travel road by laying a Transportation Counter matching the terrain of the chosen road. This phase goes on until each player has passed consecutively. Each player also owns an Obstacle that he can lay down on a Transportation Counter to up the cost of traveling on this road from 1 card.&lt;br /&gt;
# One after another, each player is going to travel from town to town. The current position of a player is shown by the Elf Boot of his color, initially set on the biggest town, Elvenhold.&lt;br /&gt;
&lt;br /&gt;
At the end of the round, a player can keep a maximum of 4 cards in hand, and keeps only 1 Transportation counter.&lt;br /&gt;
&lt;br /&gt;
== Travel rules ==&lt;br /&gt;
&lt;br /&gt;
Players can travel :&lt;br /&gt;
* on the roads on which a Transportation Counter has been set&lt;br /&gt;
* on the rivers&lt;br /&gt;
* on the lakes.&lt;br /&gt;
&lt;br /&gt;
To travel on a road, a river or a lake, the player needs to pay with the cards in hands the cost matching the terrain of the road and the means of transport used.&lt;br /&gt;
&lt;br /&gt;
For example, if the Transportation Counter &#039;Magic Cloud&#039; has been set on a mountain road, one can travel with just one &#039;Magic Cloud&#039; card. But if it has been set on a forest or plain road, one needs to pay 2 &#039;Magic Cloud&#039; cards to pass (NB: the &#039;Magic Cloud&#039; Transportation Counter cannot be used to travel in the desert, as it&#039;s too hot for a Cloud over there).&lt;br /&gt;
&lt;br /&gt;
Also :&lt;br /&gt;
* To travel a river, you need only 1 &#039;Raft&#039; card to go downriver, but you need 2 to go upriver (look for the small arrows).&lt;br /&gt;
* To cross a lake, you need to pay two &#039;Raft&#039; cards.&lt;br /&gt;
* If an Obstacle has been set on a road, you need to pay 1 more card of the appropriate type.&lt;br /&gt;
* If you don&#039;t have the appropriate cards to travel on a road, you can still pass using a &#039;Caravan&#039;, by paying 3 cards of any type (4 cards if there is an Obstacle on the road).&lt;br /&gt;
&lt;br /&gt;
== Variant ==&lt;br /&gt;
&lt;br /&gt;
In the &#039;Hometown&#039; variant, each player gets a secret town card at the beginning of the game, telling him which town he has to reach at the end of the 4th round.&lt;br /&gt;
&lt;br /&gt;
If he doesn&#039;t manage to get there, he&#039;ll lose as many points as the remaining distance he has to travel to get there.&lt;br /&gt;
&lt;br /&gt;
This variant gives more tactic depth to the game, as you have to plan each round to the best to get the most Town Pieces while making sure to be able to get to your hometown at the end of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Have a good game!&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
</feed>