<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ca">
	<id>https://ca.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Een</id>
	<title>Board Game Arena - Contribucions de l&#039;usuari [ca]</title>
	<link rel="self" type="application/atom+xml" href="https://ca.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Een"/>
	<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/Especial:Contribucions/Een"/>
	<updated>2026-09-17T21:28:01Z</updated>
	<subtitle>Contribucions de l&amp;#039;usuari</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1517</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1516</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1515</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Game_clock&amp;diff=1375</id>
		<title>Game clock</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Game_clock&amp;diff=1373</id>
		<title>Game clock</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1278</id>
		<title>Gamehelpcheckers</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1277</id>
		<title>Gamehelpcheckers</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1276</id>
		<title>Gamehelpcheckers</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.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://ca.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://ca.doc.boardgamearena.com/index.php?title=Gamehelpcheckers&amp;diff=1233</id>
		<title>Gamehelpcheckers</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=TermsOfService&amp;diff=1209</id>
		<title>TermsOfService</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Gamehelppuertorico&amp;diff=1085</id>
		<title>Gamehelppuertorico</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Gamehelppuertorico&amp;diff=1084</id>
		<title>Gamehelppuertorico</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Stock&amp;diff=1082</id>
		<title>Stock</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Stock&amp;diff=1081</id>
		<title>Stock</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Stock&amp;diff=1080</id>
		<title>Stock</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.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://ca.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://ca.doc.boardgamearena.com/index.php?title=Faq&amp;diff=1078</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Contact_us&amp;diff=1021</id>
		<title>Contact us</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.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://ca.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://ca.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://ca.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://ca.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://ca.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://ca.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://ca.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://ca.doc.boardgamearena.com/index.php?title=Browser_support&amp;diff=969</id>
		<title>Browser support</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Faq&amp;diff=968</id>
		<title>Faq</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Privacy&amp;diff=905</id>
		<title>Privacy</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.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://ca.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://ca.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://ca.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://ca.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=888</id>
		<title>Gamehelpelfenland</title>
		<link rel="alternate" type="text/html" href="https://ca.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://ca.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=887</id>
		<title>Gamehelpelfenland</title>
		<link rel="alternate" type="text/html" href="https://ca.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>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=886</id>
		<title>Gamehelpelfenland</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=886"/>
		<updated>2013-06-16T12:52:46Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Round overview */&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;
== 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://ca.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=885</id>
		<title>Gamehelpelfenland</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Gamehelpelfenland&amp;diff=885"/>
		<updated>2013-06-16T12:50:55Z</updated>

		<summary type="html">&lt;p&gt;Een: Created page with &amp;quot;== Goal of the game ==  Visiting as many cities as possible in Elfenland over 4 rounds.  At the end of the 4th round, the player who collected the most Town Pieces wins.  == R...&amp;quot;&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;
== 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;
== 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://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=867</id>
		<title>Moderationpolicy</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=867"/>
		<updated>2013-05-30T19:13:08Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Penalty grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== General rules ==&lt;br /&gt;
&lt;br /&gt;
=== Beyond a Reasonable Doubt ===&lt;br /&gt;
&lt;br /&gt;
In case there is a any possible doubt, a player should be considered not guilty.&lt;br /&gt;
&lt;br /&gt;
=== Moderators independance ===&lt;br /&gt;
&lt;br /&gt;
Moderators must not process reports if they know the protagonists (author or targeted player). Playing online with the protagonist does not mean to &amp;quot;know&amp;quot; them. &amp;quot;Know&amp;quot; means: know them personally or playing with them online very regularly.&lt;br /&gt;
&lt;br /&gt;
=== Appeal ===&lt;br /&gt;
&lt;br /&gt;
Players has the right to appeal against the moderation decision, by forwarding received moderation email to &amp;quot;contact@boardgamearena.com&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
They &#039;&#039;&#039;MUST&#039;&#039;&#039; explain in the email why the moderator did not respect the BGA moderation policy. If the explanation is not convincing, the email will be ignored. If the player is obviously guilty and if the moderation policy hasn&#039;t been violated, BGA admins will double the penalties.&lt;br /&gt;
&lt;br /&gt;
=== Penalty grid ===&lt;br /&gt;
&lt;br /&gt;
Moderators should respect the penalties grid as much as possible. However, they have the right to adjust the penalty depending on the gravity of the case. The following situation can lead moderators to increase the penalties:&lt;br /&gt;
* the player has been reported several times for the same type of case.&lt;br /&gt;
* the player wrong action can be obviously qualified by one or several of the following terms: racism, xenophobia, homophobia, sexism, and as a rule of thumb any type of discrimination against a particular category of people.&lt;br /&gt;
* on case there is a provocation, the penalty may be be reduced a little, and the author of the provocation may have a warning BUT, as everyone should keep quiet and polite even if there are provoked, this is a moderator choice.&lt;br /&gt;
&lt;br /&gt;
=== Relapse ===&lt;br /&gt;
&lt;br /&gt;
In case there is a relapse, the penalty increases exponentially.&lt;br /&gt;
&lt;br /&gt;
This is the moderator job to determine the right penalty to apply in this case, considering the fact that the player has been warned by a first penalty.&lt;br /&gt;
&lt;br /&gt;
Moderators should consider there is a relapse only if the new wrong action occurs AFTER the previous penalty has been applied and the associated moderation email has been sent.&lt;br /&gt;
&lt;br /&gt;
Considering it&#039;s a lot of work to analyze reports about players who do the same action again and again, the &amp;quot;ban forever&amp;quot; penalty can be applied to any case if the player relapses.&lt;br /&gt;
&lt;br /&gt;
=== Special urgency ban procedure ===&lt;br /&gt;
&lt;br /&gt;
Whatever the case type, moderators has the right to ban a player from the website (forever) if this player set up a situation that is out of control and must be stopped within hours. This special procedure should only be used if there is an immediate danger for the community (ex: vandalism, flow of insults, massive spam, ...).&lt;br /&gt;
&lt;br /&gt;
=== About private jokes ===&lt;br /&gt;
&lt;br /&gt;
If a wrong action happened in a private circle (ex: at a game table, with no spectators), and if none of the present players reported the action, the moderator must consider this was a &amp;quot;private joke&amp;quot; and must not apply any penalty. In the contrary, if the wrong action is public (ex: post/comment on the wall), the moderator may consider this as a wrong action even if there is no report.&lt;br /&gt;
&lt;br /&gt;
=== Prescription ===&lt;br /&gt;
&lt;br /&gt;
For operational reason, a report that is older than 2 weeks may be closed by moderators because it is too old.&lt;br /&gt;
&lt;br /&gt;
=== Player profile influence ===&lt;br /&gt;
&lt;br /&gt;
The player profile IS taken into account to determine if the player is guilty or not guilty. Moderators give more credit to players with a good profile than the other.&lt;br /&gt;
&lt;br /&gt;
The player profile is NOT taken into account when choosing the penalty if the player is found guilty.&lt;br /&gt;
&lt;br /&gt;
Good profile elements are:&lt;br /&gt;
* A good thumb up / thumb down ratio.&lt;br /&gt;
* Player is registered since a long time / has a lot of games played.&lt;br /&gt;
* Players is involved in the website (ex: realized translations).&lt;br /&gt;
* Player is supporting BGA (member of the club).&lt;br /&gt;
&lt;br /&gt;
=== Incomplete reports ===&lt;br /&gt;
&lt;br /&gt;
Analyzing reports takes a lot of time, and many reports are received. If any needed information is missing in the report, moderators may (and most of the time, should) close the report.&lt;br /&gt;
&lt;br /&gt;
== Penalty grid ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable alternance centre&amp;quot;&lt;br /&gt;
|+ Titre&lt;br /&gt;
 |-&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Category&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Case type&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Details&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Standard penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults during a game, on table chat&lt;br /&gt;
 | Must be present in the report: table ID, and the insults terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on general chat&lt;br /&gt;
 | Must be present in the report: the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 30 days for small insults and insanity, Devilkin forever for real insults. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on public space (wall, forum, comments...)&lt;br /&gt;
 | Must be present in the report: where to find the insult, the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Aggressive attitude&lt;br /&gt;
 | Aggressive attitude during a game: can&#039;t wait the other player, provocation, ...&lt;br /&gt;
 | As a rule of thumb: as long as there is no insult, this is not an issue: thumb down are the solution. BUT, if the player is really borderline and should be warned, a moderation action is needed.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should explain that this is a small warning, and that a change of attitude is needed.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate avatar: porn, extreme violence, advertising...&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Avatar is really inappropriate in 3 cases:&lt;br /&gt;
1°) It can hurt underage players (porn, extreme violence)&lt;br /&gt;
2°) This is advertisement / this violate some intellectual property&lt;br /&gt;
3°) The avatar contains a reference that discriminate a group of people (ex: nazi cross)&lt;br /&gt;
 | Avatar immediate removal + Devilkin 3 days to devilkin forever depending on the gravity. In any case: the player should be warn that this is the last warning before ban. If the player obviously don&#039;t measure the meaning of the avatar, the penalty can be reduced.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate username&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Username are inappropriate when this is obviously an insult for many people. Moderators shouldn&#039;t moderate a username that is insulting by accident in a language that is not widely used on BGA.&lt;br /&gt;
 | Ban from the website. Moderators should explain that the player is welcome with another username on BGA. Note that if the player has a long seniority on BGA (=many games played), moderators should be very cautious on the case: if no one noticed the username until now, it is probably not inappropriate.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Table description&lt;br /&gt;
 | Inappropriate table description&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Table description is inappropriate when it contains insults, insanity, or tend to discriminate a group of people. &lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Kingmaking&lt;br /&gt;
 | Kingmaking action during a game&lt;br /&gt;
 | The report must contains the table id, the exact move number, and the exact explanation why this is a kingmaking action. To declare a player guilty, the player must have played an obvious move against his own interest, and it has to be a good player (clues: his ELO, number of game played, ...). As the difference between a mistake and a kingmaking action is very tight, one kingmaking report is not enough to find a player guilty: only players who regularly play against their interest should be found guilty.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Bug exploit&lt;br /&gt;
 | Exploit a known bug during a game&lt;br /&gt;
 | The bug must have been reported in the forum, and an exact reference to this bug must be in the report, with the table id and the move number. Minor bugs that can be considered as &amp;quot;variants&amp;quot; are NOT concerned (ex: pick 4 cards instead of 3). Bugs that violate the spirit of the game are concerned.&lt;br /&gt;
 | No penalty applies: if there is a bug that has been widely used for a game, a global ELO reset (or an ELO adjustment for players who exploited the bug) will be done. &lt;br /&gt;
 |-&lt;br /&gt;
 ! Private information&lt;br /&gt;
 | Some player gives some private information during the game&lt;br /&gt;
 | Players have the right to pretend things during a game. As these infos could be true or false, and could be exploited by other players too, moderators should be cautious when judging these cases. This case concerns players that had a strong intent to kill the pleasure of the game by giving some private information during the game.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Multiple accounts&lt;br /&gt;
 | A player is using multiple accounts (most of the time: to boost his ELO rank)&lt;br /&gt;
 | The report must contains the usernames of all intimidated accounts, and the reason why the report author think that multiple accounts are used. It is very difficult to find out if different accounts corresponds to different person. For example: BGA accepts that multiple players plays from the same IP address, to allow people from the same family to play at the same table. In addition, some players are using multiple accounts, but these accounts are not playing together (which is acceptable). Strong tools are available for moderators to detect multiple accounts that are used the wrong way.&lt;br /&gt;
 | For secondary accounts: ban forever. For main account: ELO reseted to 1500 / ELO penalty for all games.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Translation stealing / vandalism&lt;br /&gt;
 | The player is writing inappropriate / poor quality translations (or writes a lot of very minor modifications to someone else translation) to gain free club membership, &lt;br /&gt;
 | Immediate ban from the website (to avoid vandalism).&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player is slow to play&lt;br /&gt;
 | Players have the right to think as long as they do not go over their allotted time. If the player is slow on purpose, the good answer is: thumb down.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player quit the game before the end&lt;br /&gt;
 | In this case, player automatically gets a ELO penalty + a red mark on his profile. There is no need to do something else.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=866</id>
		<title>Moderationpolicy</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=866"/>
		<updated>2013-05-30T18:52:46Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Player profile influence */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== General rules ==&lt;br /&gt;
&lt;br /&gt;
=== Beyond a Reasonable Doubt ===&lt;br /&gt;
&lt;br /&gt;
In case there is a any possible doubt, a player should be considered not guilty.&lt;br /&gt;
&lt;br /&gt;
=== Moderators independance ===&lt;br /&gt;
&lt;br /&gt;
Moderators must not process reports if they know the protagonists (author or targeted player). Playing online with the protagonist does not mean to &amp;quot;know&amp;quot; them. &amp;quot;Know&amp;quot; means: know them personally or playing with them online very regularly.&lt;br /&gt;
&lt;br /&gt;
=== Appeal ===&lt;br /&gt;
&lt;br /&gt;
Players has the right to appeal against the moderation decision, by forwarding received moderation email to &amp;quot;contact@boardgamearena.com&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
They &#039;&#039;&#039;MUST&#039;&#039;&#039; explain in the email why the moderator did not respect the BGA moderation policy. If the explanation is not convincing, the email will be ignored. If the player is obviously guilty and if the moderation policy hasn&#039;t been violated, BGA admins will double the penalties.&lt;br /&gt;
&lt;br /&gt;
=== Penalty grid ===&lt;br /&gt;
&lt;br /&gt;
Moderators should respect the penalties grid as much as possible. However, they have the right to adjust the penalty depending on the gravity of the case. The following situation can lead moderators to increase the penalties:&lt;br /&gt;
* the player has been reported several times for the same type of case.&lt;br /&gt;
* the player wrong action can be obviously qualified by one or several of the following terms: racism, xenophobia, homophobia, sexism, and as a rule of thumb any type of discrimination against a particular category of people.&lt;br /&gt;
* on case there is a provocation, the penalty may be be reduced a little, and the author of the provocation may have a warning BUT, as everyone should keep quiet and polite even if there are provoked, this is a moderator choice.&lt;br /&gt;
&lt;br /&gt;
=== Relapse ===&lt;br /&gt;
&lt;br /&gt;
In case there is a relapse, the penalty increases exponentially.&lt;br /&gt;
&lt;br /&gt;
This is the moderator job to determine the right penalty to apply in this case, considering the fact that the player has been warned by a first penalty.&lt;br /&gt;
&lt;br /&gt;
Moderators should consider there is a relapse only if the new wrong action occurs AFTER the previous penalty has been applied and the associated moderation email has been sent.&lt;br /&gt;
&lt;br /&gt;
Considering it&#039;s a lot of work to analyze reports about players who do the same action again and again, the &amp;quot;ban forever&amp;quot; penalty can be applied to any case if the player relapses.&lt;br /&gt;
&lt;br /&gt;
=== Special urgency ban procedure ===&lt;br /&gt;
&lt;br /&gt;
Whatever the case type, moderators has the right to ban a player from the website (forever) if this player set up a situation that is out of control and must be stopped within hours. This special procedure should only be used if there is an immediate danger for the community (ex: vandalism, flow of insults, massive spam, ...).&lt;br /&gt;
&lt;br /&gt;
=== About private jokes ===&lt;br /&gt;
&lt;br /&gt;
If a wrong action happened in a private circle (ex: at a game table, with no spectators), and if none of the present players reported the action, the moderator must consider this was a &amp;quot;private joke&amp;quot; and must not apply any penalty. In the contrary, if the wrong action is public (ex: post/comment on the wall), the moderator may consider this as a wrong action even if there is no report.&lt;br /&gt;
&lt;br /&gt;
=== Prescription ===&lt;br /&gt;
&lt;br /&gt;
For operational reason, a report that is older than 2 weeks may be closed by moderators because it is too old.&lt;br /&gt;
&lt;br /&gt;
=== Player profile influence ===&lt;br /&gt;
&lt;br /&gt;
The player profile IS taken into account to determine if the player is guilty or not guilty. Moderators give more credit to players with a good profile than the other.&lt;br /&gt;
&lt;br /&gt;
The player profile is NOT taken into account when choosing the penalty if the player is found guilty.&lt;br /&gt;
&lt;br /&gt;
Good profile elements are:&lt;br /&gt;
* A good thumb up / thumb down ratio.&lt;br /&gt;
* Player is registered since a long time / has a lot of games played.&lt;br /&gt;
* Players is involved in the website (ex: realized translations).&lt;br /&gt;
* Player is supporting BGA (member of the club).&lt;br /&gt;
&lt;br /&gt;
=== Incomplete reports ===&lt;br /&gt;
&lt;br /&gt;
Analyzing reports takes a lot of time, and many reports are received. If any needed information is missing in the report, moderators may (and most of the time, should) close the report.&lt;br /&gt;
&lt;br /&gt;
== Penalty grid ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable alternance centre&amp;quot;&lt;br /&gt;
|+ Titre&lt;br /&gt;
 |-&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Category&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Case type&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Details&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Standard penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults during a game, on table chat&lt;br /&gt;
 | Must be present in the report: table ID, and the insults terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on general chat&lt;br /&gt;
 | Must be present in the report: the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 30 days for small insults and insanity, Devilkin forever for real insults. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on public space (wall, forum, comments...)&lt;br /&gt;
 | Must be present in the report: where to find the insult, the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Aggressive attitude&lt;br /&gt;
 | Aggressive attitude during a game: can&#039;t wait the other player, provocation, ...&lt;br /&gt;
 | As a rule of thumb: as long as there is no insult, this is not an issue: thumb down are the solution. BUT, if the player is really borderline and should be warned, a moderation action is needed.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should explain that this is a small warning, and that a change of attitude is needed.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate avatar: porn, extreme violence, advertising...&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Avatar is really inappropriate in 3 cases:&lt;br /&gt;
1°) It can hurt underage players (porn, extreme violence)&lt;br /&gt;
2°) This is advertisement / this violate some intellectual property&lt;br /&gt;
3°) The avatar contains a reference that discriminate a group of people (ex: nazi cross)&lt;br /&gt;
 | Avatar immediate removal + Devilkin 3 days to devilkin forever depending on the gravity. In any case: the player should be warn that this is the last warning before ban. If the player obviously don&#039;t measure the meaning of the avatar, the penalty can be reduced.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate username&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Username are inappropriate when this is obviously an insult for many people. Moderators shouldn&#039;t moderate a username that is insulting by accident in a language that is not widely used on BGA.&lt;br /&gt;
 | Ban from the website. Moderators should explain that the player is welcome with another username on BGA. Note that if the player has a long seniority on BGA (=many games played), moderators should be very cautious on the case: if no one notice the username until now, it is probably not inappropriate.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Table description&lt;br /&gt;
 | Inappropriate table description&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Table description is inappropriate when it contains insults, insanity, or tend to discriminate a group of people. &lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Kingmaking&lt;br /&gt;
 | Kingmaking action during a game&lt;br /&gt;
 | The report must contains the table id, the exact move number, and the exact explanation why this is a kingmaking action. To declare a player guilty, the player must have played an obvious move against his own interest, and it have to be a good player (clues: his ELO, number of game played, ...). As the difference between a mistake and a kingmaking action is very tight, one kingmaking report is not enough to find a player guilty: only players who regularly play against their interest should be found guilty.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Bug exploit&lt;br /&gt;
 | Exploit a known bug during a game&lt;br /&gt;
 | The bug must have been reported in the forum, and an exact reference to this bug must be in the report, with the table id and the move number. Minor bugs that can be considered as &amp;quot;variants&amp;quot; are NOT concerned (ex: pick 4 cards instead of 3). Bugs that violate the spirit of the game are concerned.&lt;br /&gt;
 | No penalty applies: if there is a bug that has been widely used for a game, a global ELO reset (or an ELO adjustment for players who exploited the bug) will be done. &lt;br /&gt;
 |-&lt;br /&gt;
 ! Private information&lt;br /&gt;
 | Some player gives some private information during the game&lt;br /&gt;
 | Players have the right to pretend things during a game. As these infos could be true or false, and could be exploited by other players too, moderators should be cautious when judging these cases. This case concerns players that had a strong voluntee to kill the pleasure of the game by giving some private information during the game.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Multiple accounts&lt;br /&gt;
 | A player is using multiple accounts (most of the time: to boost his ELO rank)&lt;br /&gt;
 | The report must contains the usernames of all intimidated accounts, and the reason why the report author think that multiple accounts are used. This is very difficult to find out if different accounts corresponds to different person. For example: BGA accepts that multiple players plays from the same IP adress, to allow people from the same family to play at the same table. In addition, some players are using multiple accounts, but these accounts are not playing together (which is acceptable). Strong tools are available for moderators to detect multiple accounts that are used the wrong way.&lt;br /&gt;
 | For secondary accounts: ban forever. For main account: ELO reseted to 1500 / ELO penalty for all games.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Tranlation stealing / vandalism&lt;br /&gt;
 | The player is writing inapropriate / poor quality translations (or writes a lot of very minor modifications to someone else translation) to gain free club membership, &lt;br /&gt;
 | Immediate ban from the website (to avoid vandalism).&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player is slow to play&lt;br /&gt;
 | Players have the right to think as long as they do not go over their alloted time. If the player is slow on purpose, the good answer is: thumb down.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player quit the game before the end&lt;br /&gt;
 | In this case, player automatically gets a ELO penalty + a red mark on his profile. There is no need to do something else.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=865</id>
		<title>Moderationpolicy</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=865"/>
		<updated>2013-05-30T18:52:15Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Player profile influence */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== General rules ==&lt;br /&gt;
&lt;br /&gt;
=== Beyond a Reasonable Doubt ===&lt;br /&gt;
&lt;br /&gt;
In case there is a any possible doubt, a player should be considered not guilty.&lt;br /&gt;
&lt;br /&gt;
=== Moderators independance ===&lt;br /&gt;
&lt;br /&gt;
Moderators must not process reports if they know the protagonists (author or targeted player). Playing online with the protagonist does not mean to &amp;quot;know&amp;quot; them. &amp;quot;Know&amp;quot; means: know them personally or playing with them online very regularly.&lt;br /&gt;
&lt;br /&gt;
=== Appeal ===&lt;br /&gt;
&lt;br /&gt;
Players has the right to appeal against the moderation decision, by forwarding received moderation email to &amp;quot;contact@boardgamearena.com&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
They &#039;&#039;&#039;MUST&#039;&#039;&#039; explain in the email why the moderator did not respect the BGA moderation policy. If the explanation is not convincing, the email will be ignored. If the player is obviously guilty and if the moderation policy hasn&#039;t been violated, BGA admins will double the penalties.&lt;br /&gt;
&lt;br /&gt;
=== Penalty grid ===&lt;br /&gt;
&lt;br /&gt;
Moderators should respect the penalties grid as much as possible. However, they have the right to adjust the penalty depending on the gravity of the case. The following situation can lead moderators to increase the penalties:&lt;br /&gt;
* the player has been reported several times for the same type of case.&lt;br /&gt;
* the player wrong action can be obviously qualified by one or several of the following terms: racism, xenophobia, homophobia, sexism, and as a rule of thumb any type of discrimination against a particular category of people.&lt;br /&gt;
* on case there is a provocation, the penalty may be be reduced a little, and the author of the provocation may have a warning BUT, as everyone should keep quiet and polite even if there are provoked, this is a moderator choice.&lt;br /&gt;
&lt;br /&gt;
=== Relapse ===&lt;br /&gt;
&lt;br /&gt;
In case there is a relapse, the penalty increases exponentially.&lt;br /&gt;
&lt;br /&gt;
This is the moderator job to determine the right penalty to apply in this case, considering the fact that the player has been warned by a first penalty.&lt;br /&gt;
&lt;br /&gt;
Moderators should consider there is a relapse only if the new wrong action occurs AFTER the previous penalty has been applied and the associated moderation email has been sent.&lt;br /&gt;
&lt;br /&gt;
Considering it&#039;s a lot of work to analyze reports about players who do the same action again and again, the &amp;quot;ban forever&amp;quot; penalty can be applied to any case if the player relapses.&lt;br /&gt;
&lt;br /&gt;
=== Special urgency ban procedure ===&lt;br /&gt;
&lt;br /&gt;
Whatever the case type, moderators has the right to ban a player from the website (forever) if this player set up a situation that is out of control and must be stopped within hours. This special procedure should only be used if there is an immediate danger for the community (ex: vandalism, flow of insults, massive spam, ...).&lt;br /&gt;
&lt;br /&gt;
=== About private jokes ===&lt;br /&gt;
&lt;br /&gt;
If a wrong action happened in a private circle (ex: at a game table, with no spectators), and if none of the present players reported the action, the moderator must consider this was a &amp;quot;private joke&amp;quot; and must not apply any penalty. In the contrary, if the wrong action is public (ex: post/comment on the wall), the moderator may consider this as a wrong action even if there is no report.&lt;br /&gt;
&lt;br /&gt;
=== Prescription ===&lt;br /&gt;
&lt;br /&gt;
For operational reason, a report that is older than 2 weeks may be closed by moderators because it is too old.&lt;br /&gt;
&lt;br /&gt;
=== Player profile influence ===&lt;br /&gt;
&lt;br /&gt;
The player profile IS taken into account to determine if the player is guilty or not guilty. Moderators give more credit to players with a good profile than the other.&lt;br /&gt;
&lt;br /&gt;
The player profile is NOT taken into account when choosing the penalty if the player is found guilty.&lt;br /&gt;
&lt;br /&gt;
Good profile elements are:&lt;br /&gt;
* A good thumb up / thumb down ratio.&lt;br /&gt;
* Player is registered since a long time / has a lot of games player.&lt;br /&gt;
* Players is involved in the website (ex: realized translations).&lt;br /&gt;
* Player is supporting BGA (member of the club).&lt;br /&gt;
&lt;br /&gt;
=== Incomplete reports ===&lt;br /&gt;
&lt;br /&gt;
Analyzing reports takes a lot of time, and many reports are received. If any needed information is missing in the report, moderators may (and most of the time, should) close the report.&lt;br /&gt;
&lt;br /&gt;
== Penalty grid ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable alternance centre&amp;quot;&lt;br /&gt;
|+ Titre&lt;br /&gt;
 |-&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Category&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Case type&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Details&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Standard penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults during a game, on table chat&lt;br /&gt;
 | Must be present in the report: table ID, and the insults terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on general chat&lt;br /&gt;
 | Must be present in the report: the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 30 days for small insults and insanity, Devilkin forever for real insults. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on public space (wall, forum, comments...)&lt;br /&gt;
 | Must be present in the report: where to find the insult, the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Aggressive attitude&lt;br /&gt;
 | Aggressive attitude during a game: can&#039;t wait the other player, provocation, ...&lt;br /&gt;
 | As a rule of thumb: as long as there is no insult, this is not an issue: thumb down are the solution. BUT, if the player is really borderline and should be warned, a moderation action is needed.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should explain that this is a small warning, and that a change of attitude is needed.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate avatar: porn, extreme violence, advertising...&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Avatar is really inappropriate in 3 cases:&lt;br /&gt;
1°) It can hurt underage players (porn, extreme violence)&lt;br /&gt;
2°) This is advertisement / this violate some intellectual property&lt;br /&gt;
3°) The avatar contains a reference that discriminate a group of people (ex: nazi cross)&lt;br /&gt;
 | Avatar immediate removal + Devilkin 3 days to devilkin forever depending on the gravity. In any case: the player should be warn that this is the last warning before ban. If the player obviously don&#039;t measure the meaning of the avatar, the penalty can be reduced.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate username&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Username are inappropriate when this is obviously an insult for many people. Moderators shouldn&#039;t moderate a username that is insulting by accident in a language that is not widely used on BGA.&lt;br /&gt;
 | Ban from the website. Moderators should explain that the player is welcome with another username on BGA. Note that if the player has a long seniority on BGA (=many games played), moderators should be very cautious on the case: if no one notice the username until now, it is probably not inappropriate.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Table description&lt;br /&gt;
 | Inappropriate table description&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Table description is inappropriate when it contains insults, insanity, or tend to discriminate a group of people. &lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Kingmaking&lt;br /&gt;
 | Kingmaking action during a game&lt;br /&gt;
 | The report must contains the table id, the exact move number, and the exact explanation why this is a kingmaking action. To declare a player guilty, the player must have played an obvious move against his own interest, and it have to be a good player (clues: his ELO, number of game played, ...). As the difference between a mistake and a kingmaking action is very tight, one kingmaking report is not enough to find a player guilty: only players who regularly play against their interest should be found guilty.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Bug exploit&lt;br /&gt;
 | Exploit a known bug during a game&lt;br /&gt;
 | The bug must have been reported in the forum, and an exact reference to this bug must be in the report, with the table id and the move number. Minor bugs that can be considered as &amp;quot;variants&amp;quot; are NOT concerned (ex: pick 4 cards instead of 3). Bugs that violate the spirit of the game are concerned.&lt;br /&gt;
 | No penalty applies: if there is a bug that has been widely used for a game, a global ELO reset (or an ELO adjustment for players who exploited the bug) will be done. &lt;br /&gt;
 |-&lt;br /&gt;
 ! Private information&lt;br /&gt;
 | Some player gives some private information during the game&lt;br /&gt;
 | Players have the right to pretend things during a game. As these infos could be true or false, and could be exploited by other players too, moderators should be cautious when judging these cases. This case concerns players that had a strong voluntee to kill the pleasure of the game by giving some private information during the game.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Multiple accounts&lt;br /&gt;
 | A player is using multiple accounts (most of the time: to boost his ELO rank)&lt;br /&gt;
 | The report must contains the usernames of all intimidated accounts, and the reason why the report author think that multiple accounts are used. This is very difficult to find out if different accounts corresponds to different person. For example: BGA accepts that multiple players plays from the same IP adress, to allow people from the same family to play at the same table. In addition, some players are using multiple accounts, but these accounts are not playing together (which is acceptable). Strong tools are available for moderators to detect multiple accounts that are used the wrong way.&lt;br /&gt;
 | For secondary accounts: ban forever. For main account: ELO reseted to 1500 / ELO penalty for all games.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Tranlation stealing / vandalism&lt;br /&gt;
 | The player is writing inapropriate / poor quality translations (or writes a lot of very minor modifications to someone else translation) to gain free club membership, &lt;br /&gt;
 | Immediate ban from the website (to avoid vandalism).&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player is slow to play&lt;br /&gt;
 | Players have the right to think as long as they do not go over their alloted time. If the player is slow on purpose, the good answer is: thumb down.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player quit the game before the end&lt;br /&gt;
 | In this case, player automatically gets a ELO penalty + a red mark on his profile. There is no need to do something else.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=864</id>
		<title>Moderationpolicy</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=864"/>
		<updated>2013-05-30T18:44:44Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Penalty grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== General rules ==&lt;br /&gt;
&lt;br /&gt;
=== Beyond a Reasonable Doubt ===&lt;br /&gt;
&lt;br /&gt;
In case there is a any possible doubt, a player should be considered not guilty.&lt;br /&gt;
&lt;br /&gt;
=== Moderators independance ===&lt;br /&gt;
&lt;br /&gt;
Moderators must not process reports if they know the protagonists (author or targeted player). Playing online with the protagonist does not mean to &amp;quot;know&amp;quot; them. &amp;quot;Know&amp;quot; means: know them personally or playing with them online very regularly.&lt;br /&gt;
&lt;br /&gt;
=== Appeal ===&lt;br /&gt;
&lt;br /&gt;
Players has the right to appeal against the moderation decision, by forwarding received moderation email to &amp;quot;contact@boardgamearena.com&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
They &#039;&#039;&#039;MUST&#039;&#039;&#039; explain in the email why the moderator did not respect the BGA moderation policy. If the explanation is not convincing, the email will be ignored. If the player is obviously guilty and if the moderation policy hasn&#039;t been violated, BGA admins will double the penalties.&lt;br /&gt;
&lt;br /&gt;
=== Penalty grid ===&lt;br /&gt;
&lt;br /&gt;
Moderators should respect the penalties grid as much as possible. However, they have the right to adjust the penalty depending on the gravity of the case. The following situation can lead moderators to increase the penalties:&lt;br /&gt;
* the player has been reported several times for the same type of case.&lt;br /&gt;
* the player wrong action can be obviously qualified by one or several of the following terms: racism, xenophobia, homophobia, sexism, and as a rule of thumb any type of discrimination against a particular category of people.&lt;br /&gt;
* on case there is a provocation, the penalty may be be reduced a little, and the author of the provocation may have a warning BUT, as everyone should keep quiet and polite even if there are provoked, this is a moderator choice.&lt;br /&gt;
&lt;br /&gt;
=== Relapse ===&lt;br /&gt;
&lt;br /&gt;
In case there is a relapse, the penalty increases exponentially.&lt;br /&gt;
&lt;br /&gt;
This is the moderator job to determine the right penalty to apply in this case, considering the fact that the player has been warned by a first penalty.&lt;br /&gt;
&lt;br /&gt;
Moderators should consider there is a relapse only if the new wrong action occurs AFTER the previous penalty has been applied and the associated moderation email has been sent.&lt;br /&gt;
&lt;br /&gt;
Considering it&#039;s a lot of work to analyze reports about players who do the same action again and again, the &amp;quot;ban forever&amp;quot; penalty can be applied to any case if the player relapses.&lt;br /&gt;
&lt;br /&gt;
=== Special urgency ban procedure ===&lt;br /&gt;
&lt;br /&gt;
Whatever the case type, moderators has the right to ban a player from the website (forever) if this player set up a situation that is out of control and must be stopped within hours. This special procedure should only be used if there is an immediate danger for the community (ex: vandalism, flow of insults, massive spam, ...).&lt;br /&gt;
&lt;br /&gt;
=== About private jokes ===&lt;br /&gt;
&lt;br /&gt;
If a wrong action happened in a private circle (ex: at a game table, with no spectators), and if none of the present players reported the action, the moderator must consider this was a &amp;quot;private joke&amp;quot; and must not apply any penalty. In the contrary, if the wrong action is public (ex: post/comment on the wall), the moderator may consider this as a wrong action even if there is no report.&lt;br /&gt;
&lt;br /&gt;
=== Prescription ===&lt;br /&gt;
&lt;br /&gt;
For operational reason, a report that is older than 2 weeks may be closed by moderators because it is too old.&lt;br /&gt;
&lt;br /&gt;
=== Player profile influence ===&lt;br /&gt;
&lt;br /&gt;
The player profile IS taken into account to determine if the player is guilty or not guilty. Moderators gives more credit to players with a good profile than the other.&lt;br /&gt;
&lt;br /&gt;
The player profile is NOT taken into account when choosing the penalty if the player is found guilty.&lt;br /&gt;
&lt;br /&gt;
Good profile elements are:&lt;br /&gt;
* A good thumb up / thumb down ratio.&lt;br /&gt;
* Player is registered since a long time / has a lot of games player.&lt;br /&gt;
* Players is involved in the website (ex: realized translations).&lt;br /&gt;
* Player is supporting BGA (member of the club).&lt;br /&gt;
&lt;br /&gt;
=== Incomplete reports ===&lt;br /&gt;
&lt;br /&gt;
Analyzing reports takes a lot of time, and many reports are received. If any needed information is missing in the report, moderators may (and most of the time, should) close the report.&lt;br /&gt;
&lt;br /&gt;
== Penalty grid ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable alternance centre&amp;quot;&lt;br /&gt;
|+ Titre&lt;br /&gt;
 |-&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Category&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Case type&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Details&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Standard penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults during a game, on table chat&lt;br /&gt;
 | Must be present in the report: table ID, and the insults terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on general chat&lt;br /&gt;
 | Must be present in the report: the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 30 days for small insults and insanity, Devilkin forever for real insults. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on public space (wall, forum, comments...)&lt;br /&gt;
 | Must be present in the report: where to find the insult, the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Aggressive attitude&lt;br /&gt;
 | Aggressive attitude during a game: can&#039;t wait the other player, provocation, ...&lt;br /&gt;
 | As a rule of thumb: as long as there is no insult, this is not an issue: thumb down are the solution. BUT, if the player is really borderline and should be warned, a moderation action is needed.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should explain that this is a small warning, and that a change of attitude is needed.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate avatar: porn, extreme violence, advertising...&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Avatar is really inappropriate in 3 cases:&lt;br /&gt;
1°) It can hurt underage players (porn, extreme violence)&lt;br /&gt;
2°) This is advertisement / this violate some intellectual property&lt;br /&gt;
3°) The avatar contains a reference that discriminate a group of people (ex: nazi cross)&lt;br /&gt;
 | Avatar immediate removal + Devilkin 3 days to devilkin forever depending on the gravity. In any case: the player should be warn that this is the last warning before ban. If the player obviously don&#039;t measure the meaning of the avatar, the penalty can be reduced.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate username&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Username are inappropriate when this is obviously an insult for many people. Moderators shouldn&#039;t moderate a username that is insulting by accident in a language that is not widely used on BGA.&lt;br /&gt;
 | Ban from the website. Moderators should explain that the player is welcome with another username on BGA. Note that if the player has a long seniority on BGA (=many games played), moderators should be very cautious on the case: if no one notice the username until now, it is probably not inappropriate.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Table description&lt;br /&gt;
 | Inappropriate table description&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Table description is inappropriate when it contains insults, insanity, or tend to discriminate a group of people. &lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Kingmaking&lt;br /&gt;
 | Kingmaking action during a game&lt;br /&gt;
 | The report must contains the table id, the exact move number, and the exact explanation why this is a kingmaking action. To declare a player guilty, the player must have played an obvious move against his own interest, and it have to be a good player (clues: his ELO, number of game played, ...). As the difference between a mistake and a kingmaking action is very tight, one kingmaking report is not enough to find a player guilty: only players who regularly play against their interest should be found guilty.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Bug exploit&lt;br /&gt;
 | Exploit a known bug during a game&lt;br /&gt;
 | The bug must have been reported in the forum, and an exact reference to this bug must be in the report, with the table id and the move number. Minor bugs that can be considered as &amp;quot;variants&amp;quot; are NOT concerned (ex: pick 4 cards instead of 3). Bugs that violate the spirit of the game are concerned.&lt;br /&gt;
 | No penalty applies: if there is a bug that has been widely used for a game, a global ELO reset (or an ELO adjustment for players who exploited the bug) will be done. &lt;br /&gt;
 |-&lt;br /&gt;
 ! Private information&lt;br /&gt;
 | Some player gives some private information during the game&lt;br /&gt;
 | Players have the right to pretend things during a game. As these infos could be true or false, and could be exploited by other players too, moderators should be cautious when judging these cases. This case concerns players that had a strong voluntee to kill the pleasure of the game by giving some private information during the game.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Multiple accounts&lt;br /&gt;
 | A player is using multiple accounts (most of the time: to boost his ELO rank)&lt;br /&gt;
 | The report must contains the usernames of all intimidated accounts, and the reason why the report author think that multiple accounts are used. This is very difficult to find out if different accounts corresponds to different person. For example: BGA accepts that multiple players plays from the same IP adress, to allow people from the same family to play at the same table. In addition, some players are using multiple accounts, but these accounts are not playing together (which is acceptable). Strong tools are available for moderators to detect multiple accounts that are used the wrong way.&lt;br /&gt;
 | For secondary accounts: ban forever. For main account: ELO reseted to 1500 / ELO penalty for all games.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Tranlation stealing / vandalism&lt;br /&gt;
 | The player is writing inapropriate / poor quality translations (or writes a lot of very minor modifications to someone else translation) to gain free club membership, &lt;br /&gt;
 | Immediate ban from the website (to avoid vandalism).&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player is slow to play&lt;br /&gt;
 | Players have the right to think as long as they do not go over their alloted time. If the player is slow on purpose, the good answer is: thumb down.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player quit the game before the end&lt;br /&gt;
 | In this case, player automatically gets a ELO penalty + a red mark on his profile. There is no need to do something else.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=863</id>
		<title>Moderationpolicy</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Moderationpolicy&amp;diff=863"/>
		<updated>2013-05-30T18:44:30Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Penalty grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== General rules ==&lt;br /&gt;
&lt;br /&gt;
=== Beyond a Reasonable Doubt ===&lt;br /&gt;
&lt;br /&gt;
In case there is a any possible doubt, a player should be considered not guilty.&lt;br /&gt;
&lt;br /&gt;
=== Moderators independance ===&lt;br /&gt;
&lt;br /&gt;
Moderators must not process reports if they know the protagonists (author or targeted player). Playing online with the protagonist does not mean to &amp;quot;know&amp;quot; them. &amp;quot;Know&amp;quot; means: know them personally or playing with them online very regularly.&lt;br /&gt;
&lt;br /&gt;
=== Appeal ===&lt;br /&gt;
&lt;br /&gt;
Players has the right to appeal against the moderation decision, by forwarding received moderation email to &amp;quot;contact@boardgamearena.com&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
They &#039;&#039;&#039;MUST&#039;&#039;&#039; explain in the email why the moderator did not respect the BGA moderation policy. If the explanation is not convincing, the email will be ignored. If the player is obviously guilty and if the moderation policy hasn&#039;t been violated, BGA admins will double the penalties.&lt;br /&gt;
&lt;br /&gt;
=== Penalty grid ===&lt;br /&gt;
&lt;br /&gt;
Moderators should respect the penalties grid as much as possible. However, they have the right to adjust the penalty depending on the gravity of the case. The following situation can lead moderators to increase the penalties:&lt;br /&gt;
* the player has been reported several time for the same type of case.&lt;br /&gt;
* the player wrong action can be obviously qualified by one or several of the following terms: racism, xenophobia, homophobia, sexism, and as a rule of thumb any type of discrimination against a particular category of people.&lt;br /&gt;
* on case there is a provocation, the penalty may be be reduced a little, and the author of the provocation may have a warning BUT, as everyone should keep quiet and polite even if there are provoked, this is a moderator choice.&lt;br /&gt;
&lt;br /&gt;
=== Relapse ===&lt;br /&gt;
&lt;br /&gt;
In case there is a relapse, the penalty increases exponentially.&lt;br /&gt;
&lt;br /&gt;
This is the moderator job to determine the right penalty to apply in this case, considering the fact that the player has been warned by a first penalty.&lt;br /&gt;
&lt;br /&gt;
Moderators should consider there is a relapse only if the new wrong action occurs AFTER the previous penalty has been applied and the associated moderation email has been sent.&lt;br /&gt;
&lt;br /&gt;
Considering it&#039;s a lot of work to analyze reports about players who do the same action again and again, the &amp;quot;ban forever&amp;quot; penalty can be applied to any case if the player relapses.&lt;br /&gt;
&lt;br /&gt;
=== Special urgency ban procedure ===&lt;br /&gt;
&lt;br /&gt;
Whatever the case type, moderators has the right to ban a player from the website (forever) if this player set up a situation that is out of control and must be stopped within hours. This special procedure should only be used if there is an immediate danger for the community (ex: vandalism, flow of insults, massive spam, ...).&lt;br /&gt;
&lt;br /&gt;
=== About private jokes ===&lt;br /&gt;
&lt;br /&gt;
If a wrong action happened in a private circle (ex: at a game table, with no spectators), and if none of the present players reported the action, the moderator must consider this was a &amp;quot;private joke&amp;quot; and must not apply any penalty. In the contrary, if the wrong action is public (ex: post/comment on the wall), the moderator may consider this as a wrong action even if there is no report.&lt;br /&gt;
&lt;br /&gt;
=== Prescription ===&lt;br /&gt;
&lt;br /&gt;
For operational reason, a report that is older than 2 weeks may be closed by moderators because it is too old.&lt;br /&gt;
&lt;br /&gt;
=== Player profile influence ===&lt;br /&gt;
&lt;br /&gt;
The player profile IS taken into account to determine if the player is guilty or not guilty. Moderators gives more credit to players with a good profile than the other.&lt;br /&gt;
&lt;br /&gt;
The player profile is NOT taken into account when choosing the penalty if the player is found guilty.&lt;br /&gt;
&lt;br /&gt;
Good profile elements are:&lt;br /&gt;
* A good thumb up / thumb down ratio.&lt;br /&gt;
* Player is registered since a long time / has a lot of games player.&lt;br /&gt;
* Players is involved in the website (ex: realized translations).&lt;br /&gt;
* Player is supporting BGA (member of the club).&lt;br /&gt;
&lt;br /&gt;
=== Incomplete reports ===&lt;br /&gt;
&lt;br /&gt;
Analyzing reports takes a lot of time, and many reports are received. If any needed information is missing in the report, moderators may (and most of the time, should) close the report.&lt;br /&gt;
&lt;br /&gt;
== Penalty grid ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable alternance centre&amp;quot;&lt;br /&gt;
|+ Titre&lt;br /&gt;
 |-&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Category&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Case type&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Details&lt;br /&gt;
 ! scope=&amp;quot;col&amp;quot; | Standard penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults during a game, on table chat&lt;br /&gt;
 | Must be present in the report: table ID, and the insults terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on general chat&lt;br /&gt;
 | Must be present in the report: the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 30 days for small insults and insanity, Devilkin forever for real insults. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Insults&lt;br /&gt;
 | Insults on public space (wall, forum, comments...)&lt;br /&gt;
 | Must be present in the report: where to find the insult, the insult terms. If the insult is not in English, or if the insult is not obvious, the report author must specify why this is insulting.&lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Aggressive attitude&lt;br /&gt;
 | Aggressive attitude during a game: can&#039;t wait the other player, provocation, ...&lt;br /&gt;
 | As a rule of thumb: as long as there is no insult, this is not an issue: thumb down are the solution. BUT, if the player is really borderline and should be warned, a moderation action is needed.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should explain that this is a small warning, and that a change of attitude is needed.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate avatar: porn, extreme violence, advertising...&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Avatar is really inappropriate in 3 cases:&lt;br /&gt;
1°) It can hurt underage players (porn, extreme violence)&lt;br /&gt;
2°) This is advertisement / this violate some intellectual property&lt;br /&gt;
3°) The avatar contains a reference that discriminate a group of people (ex: nazi cross)&lt;br /&gt;
 | Avatar immediate removal + Devilkin 3 days to devilkin forever depending on the gravity. In any case: the player should be warn that this is the last warning before ban. If the player obviously don&#039;t measure the meaning of the avatar, the penalty can be reduced.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Avatar&lt;br /&gt;
 | Inappropriate username&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Username are inappropriate when this is obviously an insult for many people. Moderators shouldn&#039;t moderate a username that is insulting by accident in a language that is not widely used on BGA.&lt;br /&gt;
 | Ban from the website. Moderators should explain that the player is welcome with another username on BGA. Note that if the player has a long seniority on BGA (=many games played), moderators should be very cautious on the case: if no one notice the username until now, it is probably not inappropriate.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Table description&lt;br /&gt;
 | Inappropriate table description&lt;br /&gt;
 | If needed, report author should explain why this is inappropriate. Table description is inappropriate when it contains insults, insanity, or tend to discriminate a group of people. &lt;br /&gt;
 | Devilkin 3 days for small insults and insanity, Devilkin 30 days for real insults. Smaller penalty (ex: 1 day) can be applied if this was obviously a stupid joke. In any case: the player should be warn that this is the last warning before ban.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Kingmaking&lt;br /&gt;
 | Kingmaking action during a game&lt;br /&gt;
 | The report must contains the table id, the exact move number, and the exact explanation why this is a kingmaking action. To declare a player guilty, the player must have played an obvious move against his own interest, and it have to be a good player (clues: his ELO, number of game played, ...). As the difference between a mistake and a kingmaking action is very tight, one kingmaking report is not enough to find a player guilty: only players who regularly play against their interest should be found guilty.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Bug exploit&lt;br /&gt;
 | Exploit a known bug during a game&lt;br /&gt;
 | The bug must have been reported in the forum, and an exact reference to this bug must be in the report, with the table id and the move number. Minor bugs that can be considered as &amp;quot;variants&amp;quot; are NOT concerned (ex: pick 4 cards instead of 3). Bugs that violate the spirit of the game are concerned.&lt;br /&gt;
 | No penalty applies: if there is a bug that has been widely used for a game, a global ELO reset (or an ELO adjustment for players who exploited the bug) will be done. &lt;br /&gt;
 |-&lt;br /&gt;
 ! Private information&lt;br /&gt;
 | Some player gives some private information during the game&lt;br /&gt;
 | Players have the right to pretend things during a game. As these infos could be true or false, and could be exploited by other players too, moderators should be cautious when judging these cases. This case concerns players that had a strong voluntee to kill the pleasure of the game by giving some private information during the game.&lt;br /&gt;
 | -1 to -10 reputation penalty. Moderators should warn the player that this is a only small warning. Relapses can lead to higher reputation points penalties.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Multiple accounts&lt;br /&gt;
 | A player is using multiple accounts (most of the time: to boost his ELO rank)&lt;br /&gt;
 | The report must contains the usernames of all intimidated accounts, and the reason why the report author think that multiple accounts are used. This is very difficult to find out if different accounts corresponds to different person. For example: BGA accepts that multiple players plays from the same IP adress, to allow people from the same family to play at the same table. In addition, some players are using multiple accounts, but these accounts are not playing together (which is acceptable). Strong tools are available for moderators to detect multiple accounts that are used the wrong way.&lt;br /&gt;
 | For secondary accounts: ban forever. For main account: ELO reseted to 1500 / ELO penalty for all games.&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Tranlation stealing / vandalism&lt;br /&gt;
 | The player is writing inapropriate / poor quality translations (or writes a lot of very minor modifications to someone else translation) to gain free club membership, &lt;br /&gt;
 | Immediate ban from the website (to avoid vandalism).&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player is slow to play&lt;br /&gt;
 | Players have the right to think as long as they do not go over their alloted time. If the player is slow on purpose, the good answer is: thumb down.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
 ! Something else&lt;br /&gt;
 | Player quit the game before the end&lt;br /&gt;
 | In this case, player automatically gets a ELO penalty + a red mark on his profile. There is no need to do something else.&lt;br /&gt;
 | No penalty&lt;br /&gt;
 |-&lt;br /&gt;
&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Practical_debugging&amp;diff=829</id>
		<title>Practical debugging</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Practical_debugging&amp;diff=829"/>
		<updated>2013-05-19T20:14:01Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Add traces to your code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page gives you practical tips to debug your game during the development. Don&#039;t hesitate to share with us your difficulties in order we can improve this section.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
To work on BGA Studio, we recommend you to use [www.google.com/chrome Google Chrome] as it&#039;s the current fastest browser for BGA platform, and it&#039;s available in all OS.&lt;br /&gt;
&lt;br /&gt;
Another reason to use Chrome is that it embed all tools you need to work on BGA Studio. You can see them by pressing &amp;quot;F12&amp;quot; or from the menu (&amp;quot;Tools &amp;gt; Development tools&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
A good practice is to use a second browser to develop the game, in order to check that your game is working fine on this browser too.&lt;br /&gt;
&lt;br /&gt;
To debug with Firefox browser, we advise you to use these 2 extensions:&lt;br /&gt;
* [https://addons.mozilla.org/firefox/addon/firebug/ Firebug]&lt;br /&gt;
* [https://addons.mozilla.org/firefox/addon/web-developer/ Web developper]&lt;br /&gt;
&lt;br /&gt;
To debug with Internet Explorer, we advise you to use one of the most recent version (ex: IE9). Last versions of Internet Explorer have way better development tools than the previous ones...&lt;br /&gt;
&lt;br /&gt;
== General tip for debugging ==&lt;br /&gt;
&lt;br /&gt;
In general for debugging, think of using the &#039;[[Tools_and_tips_of_BGA_Studio#Save_.26_restore_state|save &amp;amp; restore]] state&#039; functionality. It enables you to save the state of your game just before the issue you are investigating, then come back to that point with one click as many times as needed to understand what is going wrong.&lt;br /&gt;
&lt;br /&gt;
You can save up to 3 different states.&lt;br /&gt;
&lt;br /&gt;
== Debugging my game when it cannot start ==&lt;br /&gt;
&lt;br /&gt;
If your game don&#039;t start because of an error, you are probably in one of these situations:&lt;br /&gt;
* There is a SQL error in your dbmodel.sql file.&lt;br /&gt;
* You have a syntax error in your PHP file.&lt;br /&gt;
* Your PHP &amp;quot;setup&amp;quot; - or any method used during the game initial states - generates an exception.&lt;br /&gt;
&lt;br /&gt;
If the error is not explicitly displayed when you click on &amp;quot;Express start&amp;quot;, you should check the &amp;quot;Gameserver error log&amp;quot; in the [[Studio_back-office|Studio backoffice]].&lt;br /&gt;
&lt;br /&gt;
== Debugging my PHP game logic (or my view) ==&lt;br /&gt;
&lt;br /&gt;
Most of the time, debugging PHP is quite easy. Here&#039;s what I do when I want to develop/debug some game logic that is triggered by some game action:&lt;br /&gt;
&lt;br /&gt;
* At first, I make sure that I can reproduce the needed game situation in one click. To do this, I use the &amp;quot;[[Tools_and_tips_of_BGA_Studio#Save_.26_restore_state|save &amp;amp; restore]]&amp;quot; function.&lt;br /&gt;
* Another possibility for this is to place a &#039;&#039;&#039;die(&#039;ok&#039;);&#039;&#039;&#039; PHP statement right after the PHP I am developing/debugging. This way, I make sure that every request will fail and then nothing will be commited to the database, anyway.&lt;br /&gt;
* Then, I use &#039;&#039;&#039;var_dump&#039;&#039;&#039; function to dump PHP variables and check what&#039;s wrong, until it works.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// (...my code to debug)&lt;br /&gt;
&lt;br /&gt;
var_dump( $my_variable );&lt;br /&gt;
die(&#039;ok&#039;);&lt;br /&gt;
&lt;br /&gt;
// (...my code to debug)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add traces to your code ===&lt;br /&gt;
&lt;br /&gt;
You can use the following functions in your game to add server side logging:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::debug( $message );&#039;&#039;&#039;  // debug level logging&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::trace( $message );&#039;&#039;&#039;  // info level logging&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::warn( $message );&#039;&#039;&#039;   // warning level logging&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::error( $message );&#039;&#039;&#039;  // error level logging&lt;br /&gt;
&lt;br /&gt;
To see the logs, you should check the &amp;quot;Current table error log&amp;quot; in the [[Studio_back-office|Studio backoffice]].&lt;br /&gt;
&lt;br /&gt;
This can be useful when you need to follow the flow of your code and not just stop it to see how it goes at some point.&lt;br /&gt;
&lt;br /&gt;
Only the error log level will appear in production. This level should be used only for critical problems. &lt;br /&gt;
Other levels will show only in the development environment and can be used as you see fit.&lt;br /&gt;
&lt;br /&gt;
== Debugging my HTML/CSS layout ==&lt;br /&gt;
&lt;br /&gt;
Situation examples:&lt;br /&gt;
* why my game element doesn&#039;t show up in the interface?&lt;br /&gt;
* why my CSS property hasn&#039;t been applied to this element?&lt;br /&gt;
* why this game element is displayed at this position?&lt;br /&gt;
&lt;br /&gt;
A first useful tip when an element does not show up in the interface is to give it a red background:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#my_element {&lt;br /&gt;
  ... some CSS definitions ...&lt;br /&gt;
  background-color: red;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way, you know if the element is not visible because of some of its CSS property or because of anything else.&lt;br /&gt;
&lt;br /&gt;
Another tip: sometimes, you change a CSS property with no visible effect on your interface. In that case, add a &amp;quot;display:none&amp;quot; property. If your element does not disappear, the bug probably comes from your CSS selector and not from your CSS property.&lt;br /&gt;
&lt;br /&gt;
Using Chrome &amp;quot;Elements&amp;quot; tab (thre first one), you can:&lt;br /&gt;
* See the CURRENT HTML of your page. Remember that the classical &amp;quot;show page source&amp;quot; is inefficient with BGA as you are modifying the page source with your Javascript code.&lt;br /&gt;
* Using the &amp;quot;magnifying glass&amp;quot;, you can click on any part of your game interface and check it&#039;s HTML code and associated CSS styles.&lt;br /&gt;
* You can even modify directly some CSS property and see if how it looks immediately on the game interface.&lt;br /&gt;
&lt;br /&gt;
== Debugging my Javascript game interface logic ==&lt;br /&gt;
&lt;br /&gt;
Compare to PHP debugging, Javascript debugging can sometimes be painful.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s are some tips to make your life easier while developing and debugging Javascript:&lt;br /&gt;
&lt;br /&gt;
=== Do complex things on PHP side ===&lt;br /&gt;
&lt;br /&gt;
PHP side is more reliable and simpler to debug than Javascript. Then, when you need to perform a complex operation, check first it you can&#039;t write it on server side first.&lt;br /&gt;
&lt;br /&gt;
The most frequent case is the following: you want to compute possible moves in a game situation. Doing it in Javascript is a nightmare. Then, do it on PHP, and transfer the result to your client interface using the &amp;quot;args&amp;quot; game state property.&lt;br /&gt;
&lt;br /&gt;
Note: check Reversi example for this.&lt;br /&gt;
&lt;br /&gt;
=== Add traces in your code ===&lt;br /&gt;
&lt;br /&gt;
You can use the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;console.log( variable_to_inspect )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It will give you the object structure of the variable in the Javascript console, without blocking the execution.&lt;br /&gt;
&lt;br /&gt;
It&#039;s often a good idea to precede this call with a console.log( &#039;### HERE ###&#039; ); to find more easily the appropriate line in the console log.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;alert( variable_to_inspect )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It will popup what you wish and pause the execution until you click ok.&lt;br /&gt;
&lt;br /&gt;
This won&#039;t be useful for complex structures, only native types will get plainly displayed. But this is sometimes useful just with messages to make sure which way the execution goes.&lt;br /&gt;
&lt;br /&gt;
== Some frequent errors ==&lt;br /&gt;
&lt;br /&gt;
=== when launching the game &amp;quot;Fatal error during creation of database ebd_quoridor_389 Not logged.&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Check that you didn&#039;t use $g_user or getCurrentPlayerId() in setupNewGame() function or in an &amp;quot;args&amp;quot; function of your state.&lt;br /&gt;
&lt;br /&gt;
As these functions are not consequences of a user action, there is no current player defined.&lt;br /&gt;
&lt;br /&gt;
As a general rule, you should use getActivePlayerId() and not getCurrentPlayerId(). See the [http://www.slideshare.net/boardgamearena/bga-studio-focus-on-bga-game-state-machine presentation on the game state machine] for more information.&lt;br /&gt;
&lt;br /&gt;
=== when refreshing the web page, the interface remains on &amp;quot;Application loading...&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
In this case, you probably have a syntax error in your Javascript code, and the interface refuses to load.&lt;br /&gt;
&lt;br /&gt;
To find this error, check if there is an error message in the Javascript console (F12).&lt;br /&gt;
&lt;br /&gt;
If there is really nothing on the log, it&#039;s probably that the system was unable to load your Javascript because of an syntax error that affect the structure of the Javascript file, typically a missing &amp;quot;}&amp;quot; or a missing &amp;quot;,&amp;quot; after a method definition.&lt;br /&gt;
&lt;br /&gt;
=== When I do a move, I got &amp;quot;Move recorded, waiting for update ...&amp;quot; forever ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Move recorded&amp;quot; means that your ajaxcall request has been sent to the server and returned normally.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Waiting for update&amp;quot; means that your client interface is waiting for some notifications from the server that correspond to the move we just did.&lt;br /&gt;
&lt;br /&gt;
If this message stays forever, it is probably that your PHP code does not send any notification when the move happens, which is abnormal. To fix this: add a notifyAllPlayers or a notifyPlayer call in your PHP code.&lt;br /&gt;
&lt;br /&gt;
=== Some player action is triggered randomly when I click somewhere on the game area ===&lt;br /&gt;
&lt;br /&gt;
You probably used &amp;quot;dojo.connect&amp;quot; on a null object. In this case, dojo.connect associate the event (ex: &amp;quot;onclick&amp;quot;) to the whole game area.&lt;br /&gt;
&lt;br /&gt;
Most of the time it happens in this situation, when my_object element does not exists:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   dojo.connect( $(&amp;quot;my_object&amp;quot;), &amp;quot;onclick&amp;quot;, this, function() {&lt;br /&gt;
     ...&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine if this is the case, place &amp;quot;alert( $(&amp;quot;my_object&amp;quot;) )&amp;quot; before the dojo.connect to check if the object exists or not.&lt;br /&gt;
&lt;br /&gt;
=== Javascript does not know how to sum two numbers ===&lt;br /&gt;
&lt;br /&gt;
Be careful when you manipulate integers returned by notifications: most of the time, Javascript considers they are Strings and not Integers.&lt;br /&gt;
&lt;br /&gt;
As a result:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    var i=1;&lt;br /&gt;
    i += notif.args.increment;  // With notif.args.increment=&#039;1&#039;&lt;br /&gt;
    alert( i );                 // i=11 instead of 2 !! Javascript concatenate 2 strings !&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this, you should use the &amp;quot;toint&amp;quot; function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    var i=1;&lt;br /&gt;
    i += toint( notif.args.increment );  // With notif.args.increment=&#039;1&#039;&lt;br /&gt;
    alert( i );                 // i=2 :)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Javascript: do not use substr with negative numbers ===&lt;br /&gt;
&lt;br /&gt;
To get the last characters of a string, use &amp;quot;slice&amp;quot; instead of &amp;quot;substr&amp;quot; which has a bug on IE:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    var three_last_characters = string.substr( -3 );   // Wrong&lt;br /&gt;
    var three_last_characters = string.slice( -3 );    // Correct&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Practical_debugging&amp;diff=828</id>
		<title>Practical debugging</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Practical_debugging&amp;diff=828"/>
		<updated>2013-05-19T19:32:34Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Debugging my PHP game logic (or my view) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page gives you practical tips to debug your game during the development. Don&#039;t hesitate to share with us your difficulties in order we can improve this section.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
To work on BGA Studio, we recommend you to use [www.google.com/chrome Google Chrome] as it&#039;s the current fastest browser for BGA platform, and it&#039;s available in all OS.&lt;br /&gt;
&lt;br /&gt;
Another reason to use Chrome is that it embed all tools you need to work on BGA Studio. You can see them by pressing &amp;quot;F12&amp;quot; or from the menu (&amp;quot;Tools &amp;gt; Development tools&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
A good practice is to use a second browser to develop the game, in order to check that your game is working fine on this browser too.&lt;br /&gt;
&lt;br /&gt;
To debug with Firefox browser, we advise you to use these 2 extensions:&lt;br /&gt;
* [https://addons.mozilla.org/firefox/addon/firebug/ Firebug]&lt;br /&gt;
* [https://addons.mozilla.org/firefox/addon/web-developer/ Web developper]&lt;br /&gt;
&lt;br /&gt;
To debug with Internet Explorer, we advise you to use one of the most recent version (ex: IE9). Last versions of Internet Explorer have way better development tools than the previous ones...&lt;br /&gt;
&lt;br /&gt;
== General tip for debugging ==&lt;br /&gt;
&lt;br /&gt;
In general for debugging, think of using the &#039;[[Tools_and_tips_of_BGA_Studio#Save_.26_restore_state|save &amp;amp; restore]] state&#039; functionality. It enables you to save the state of your game just before the issue you are investigating, then come back to that point with one click as many times as needed to understand what is going wrong.&lt;br /&gt;
&lt;br /&gt;
You can save up to 3 different states.&lt;br /&gt;
&lt;br /&gt;
== Debugging my game when it cannot start ==&lt;br /&gt;
&lt;br /&gt;
If your game don&#039;t start because of an error, you are probably in one of these situations:&lt;br /&gt;
* There is a SQL error in your dbmodel.sql file.&lt;br /&gt;
* You have a syntax error in your PHP file.&lt;br /&gt;
* Your PHP &amp;quot;setup&amp;quot; - or any method used during the game initial states - generates an exception.&lt;br /&gt;
&lt;br /&gt;
If the error is not explicitly displayed when you click on &amp;quot;Express start&amp;quot;, you should check the &amp;quot;Gameserver error log&amp;quot; in the [[Studio_back-office|Studio backoffice]].&lt;br /&gt;
&lt;br /&gt;
== Debugging my PHP game logic (or my view) ==&lt;br /&gt;
&lt;br /&gt;
Most of the time, debugging PHP is quite easy. Here&#039;s what I do when I want to develop/debug some game logic that is triggered by some game action:&lt;br /&gt;
&lt;br /&gt;
* At first, I make sure that I can reproduce the needed game situation in one click. To do this, I use the &amp;quot;[[Tools_and_tips_of_BGA_Studio#Save_.26_restore_state|save &amp;amp; restore]]&amp;quot; function.&lt;br /&gt;
* Another possibility for this is to place a &#039;&#039;&#039;die(&#039;ok&#039;);&#039;&#039;&#039; PHP statement right after the PHP I am developing/debugging. This way, I make sure that every request will fail and then nothing will be commited to the database, anyway.&lt;br /&gt;
* Then, I use &#039;&#039;&#039;var_dump&#039;&#039;&#039; function to dump PHP variables and check what&#039;s wrong, until it works.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// (...my code to debug)&lt;br /&gt;
&lt;br /&gt;
var_dump( $my_variable );&lt;br /&gt;
die(&#039;ok&#039;);&lt;br /&gt;
&lt;br /&gt;
// (...my code to debug)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add traces to your code ===&lt;br /&gt;
&lt;br /&gt;
You can use the following functions in your game to add server side logging:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::debug( $message )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::trace( $message )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::warn( $message )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::error( $message )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see the logs, you should check the &amp;quot;Current table error log&amp;quot; in the [[Studio_back-office|Studio backoffice]].&lt;br /&gt;
&lt;br /&gt;
This can be useful when you need to follow the flow of your code and not just stop it to see how it goes at some point.&lt;br /&gt;
&lt;br /&gt;
Only the error log level will appear in production. This level should be used only for critical problems. &lt;br /&gt;
Other levels will show only in the development environment and can be used as you see fit.&lt;br /&gt;
&lt;br /&gt;
== Debugging my HTML/CSS layout ==&lt;br /&gt;
&lt;br /&gt;
Situation examples:&lt;br /&gt;
* why my game element doesn&#039;t show up in the interface?&lt;br /&gt;
* why my CSS property hasn&#039;t been applied to this element?&lt;br /&gt;
* why this game element is displayed at this position?&lt;br /&gt;
&lt;br /&gt;
A first useful tip when an element does not show up in the interface is to give it a red background:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#my_element {&lt;br /&gt;
  ... some CSS definitions ...&lt;br /&gt;
  background-color: red;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way, you know if the element is not visible because of some of its CSS property or because of anything else.&lt;br /&gt;
&lt;br /&gt;
Another tip: sometimes, you change a CSS property with no visible effect on your interface. In that case, add a &amp;quot;display:none&amp;quot; property. If your element does not disappear, the bug probably comes from your CSS selector and not from your CSS property.&lt;br /&gt;
&lt;br /&gt;
Using Chrome &amp;quot;Elements&amp;quot; tab (thre first one), you can:&lt;br /&gt;
* See the CURRENT HTML of your page. Remember that the classical &amp;quot;show page source&amp;quot; is inefficient with BGA as you are modifying the page source with your Javascript code.&lt;br /&gt;
* Using the &amp;quot;magnifying glass&amp;quot;, you can click on any part of your game interface and check it&#039;s HTML code and associated CSS styles.&lt;br /&gt;
* You can even modify directly some CSS property and see if how it looks immediately on the game interface.&lt;br /&gt;
&lt;br /&gt;
== Debugging my Javascript game interface logic ==&lt;br /&gt;
&lt;br /&gt;
Compare to PHP debugging, Javascript debugging can sometimes be painful.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s are some tips to make your life easier while developing and debugging Javascript:&lt;br /&gt;
&lt;br /&gt;
=== Do complex things on PHP side ===&lt;br /&gt;
&lt;br /&gt;
PHP side is more reliable and simpler to debug than Javascript. Then, when you need to perform a complex operation, check first it you can&#039;t write it on server side first.&lt;br /&gt;
&lt;br /&gt;
The most frequent case is the following: you want to compute possible moves in a game situation. Doing it in Javascript is a nightmare. Then, do it on PHP, and transfer the result to your client interface using the &amp;quot;args&amp;quot; game state property.&lt;br /&gt;
&lt;br /&gt;
Note: check Reversi example for this.&lt;br /&gt;
&lt;br /&gt;
=== Add traces in your code ===&lt;br /&gt;
&lt;br /&gt;
You can use the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;console.log( variable_to_inspect )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It will give you the object structure of the variable in the Javascript console, without blocking the execution.&lt;br /&gt;
&lt;br /&gt;
It&#039;s often a good idea to precede this call with a console.log( &#039;### HERE ###&#039; ); to find more easily the appropriate line in the console log.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;alert( variable_to_inspect )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It will popup what you wish and pause the execution until you click ok.&lt;br /&gt;
&lt;br /&gt;
This won&#039;t be useful for complex structures, only native types will get plainly displayed. But this is sometimes useful just with messages to make sure which way the execution goes.&lt;br /&gt;
&lt;br /&gt;
== Some frequent errors ==&lt;br /&gt;
&lt;br /&gt;
=== when launching the game &amp;quot;Fatal error during creation of database ebd_quoridor_389 Not logged.&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Check that you didn&#039;t use $g_user or getCurrentPlayerId() in setupNewGame() function or in an &amp;quot;args&amp;quot; function of your state.&lt;br /&gt;
&lt;br /&gt;
As these functions are not consequences of a user action, there is no current player defined.&lt;br /&gt;
&lt;br /&gt;
As a general rule, you should use getActivePlayerId() and not getCurrentPlayerId(). See the [http://www.slideshare.net/boardgamearena/bga-studio-focus-on-bga-game-state-machine presentation on the game state machine] for more information.&lt;br /&gt;
&lt;br /&gt;
=== when refreshing the web page, the interface remains on &amp;quot;Application loading...&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
In this case, you probably have a syntax error in your Javascript code, and the interface refuses to load.&lt;br /&gt;
&lt;br /&gt;
To find this error, check if there is an error message in the Javascript console (F12).&lt;br /&gt;
&lt;br /&gt;
If there is really nothing on the log, it&#039;s probably that the system was unable to load your Javascript because of an syntax error that affect the structure of the Javascript file, typically a missing &amp;quot;}&amp;quot; or a missing &amp;quot;,&amp;quot; after a method definition.&lt;br /&gt;
&lt;br /&gt;
=== When I do a move, I got &amp;quot;Move recorded, waiting for update ...&amp;quot; forever ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Move recorded&amp;quot; means that your ajaxcall request has been sent to the server and returned normally.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Waiting for update&amp;quot; means that your client interface is waiting for some notifications from the server that correspond to the move we just did.&lt;br /&gt;
&lt;br /&gt;
If this message stays forever, it is probably that your PHP code does not send any notification when the move happens, which is abnormal. To fix this: add a notifyAllPlayers or a notifyPlayer call in your PHP code.&lt;br /&gt;
&lt;br /&gt;
=== Some player action is triggered randomly when I click somewhere on the game area ===&lt;br /&gt;
&lt;br /&gt;
You probably used &amp;quot;dojo.connect&amp;quot; on a null object. In this case, dojo.connect associate the event (ex: &amp;quot;onclick&amp;quot;) to the whole game area.&lt;br /&gt;
&lt;br /&gt;
Most of the time it happens in this situation, when my_object element does not exists:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   dojo.connect( $(&amp;quot;my_object&amp;quot;), &amp;quot;onclick&amp;quot;, this, function() {&lt;br /&gt;
     ...&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine if this is the case, place &amp;quot;alert( $(&amp;quot;my_object&amp;quot;) )&amp;quot; before the dojo.connect to check if the object exists or not.&lt;br /&gt;
&lt;br /&gt;
=== Javascript does not know how to sum two numbers ===&lt;br /&gt;
&lt;br /&gt;
Be careful when you manipulate integers returned by notifications: most of the time, Javascript considers they are Strings and not Integers.&lt;br /&gt;
&lt;br /&gt;
As a result:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    var i=1;&lt;br /&gt;
    i += notif.args.increment;  // With notif.args.increment=&#039;1&#039;&lt;br /&gt;
    alert( i );                 // i=11 instead of 2 !! Javascript concatenate 2 strings !&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this, you should use the &amp;quot;toint&amp;quot; function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    var i=1;&lt;br /&gt;
    i += toint( notif.args.increment );  // With notif.args.increment=&#039;1&#039;&lt;br /&gt;
    alert( i );                 // i=2 :)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Javascript: do not use substr with negative numbers ===&lt;br /&gt;
&lt;br /&gt;
To get the last characters of a string, use &amp;quot;slice&amp;quot; instead of &amp;quot;substr&amp;quot; which has a bug on IE:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    var three_last_characters = string.substr( -3 );   // Wrong&lt;br /&gt;
    var three_last_characters = string.slice( -3 );    // Correct&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Translations&amp;diff=810</id>
		<title>Translations</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Translations&amp;diff=810"/>
		<updated>2013-05-10T19:54:03Z</updated>

		<summary type="html">&lt;p&gt;Een: /* On client side (Javascript) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Using BGA Studio, the game you create is ready to be translated to each language by the BGA community. To make this possible, you only need to specify which string must be translated and how to combine them.&lt;br /&gt;
&lt;br /&gt;
== How translation works? ==&lt;br /&gt;
&lt;br /&gt;
When developing your game, all strings must be in English. Strings must be coherent with the English version of the game.&lt;br /&gt;
&lt;br /&gt;
Before the release of the game, BGA team will do the French translation of the game.&lt;br /&gt;
&lt;br /&gt;
After the release of the game, the BGA players community will translate the game in every language.&lt;br /&gt;
&lt;br /&gt;
== What should be translated? ==&lt;br /&gt;
&lt;br /&gt;
Every text that can be visible by the player when the game is running normally. This includes tooltips, texts on cards, error messages, ...&lt;br /&gt;
&lt;br /&gt;
This does NOT include error messages that are not supposed to happened (unexpected errors).&lt;br /&gt;
&lt;br /&gt;
== Focus on translating notifications ==&lt;br /&gt;
&lt;br /&gt;
Usually, translating a website is simple: you just call a function on every string you have to translate, and the string is translated in the player&#039;s language. On Board Game Arena, this is exactly the same with the &amp;quot;_( string )&amp;quot; function.&lt;br /&gt;
&lt;br /&gt;
However, there is one difference on BGA: notifications. The server is sending notifications to players, and most of the time the notifications are the same for every players, no matter what language each player is using. This is why notifications are translated on client side in the proper language, even if the strings are defined on server side.&lt;br /&gt;
&lt;br /&gt;
== WARNING: how to make sure your strings will be translated ==&lt;br /&gt;
&lt;br /&gt;
For each game, our translation tool is doing a full scan of the code, looking for translator markers like &amp;quot;_()&amp;quot; or &amp;quot;clientranslate()&amp;quot;... (see below the list of translation markers).&lt;br /&gt;
&lt;br /&gt;
If your original string is not &amp;quot;physically&amp;quot; inside one of this marker, it won&#039;t be translated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Examples: the following strings will be translated:&lt;br /&gt;
    var mystring_translated = _(&amp;quot;my string&amp;quot;);       // JS&lt;br /&gt;
    $mystring_translated = self::_(&amp;quot;my string&amp;quot;);    // PHP&lt;br /&gt;
    $mystring_translated = sprintf( _(&amp;quot;my string with an %s argument&amp;quot;), $argument );   // PHP&lt;br /&gt;
&lt;br /&gt;
    // Examples: the following strings WILL NOT be translated:&lt;br /&gt;
    $my_string = &amp;quot;my string&amp;quot;;&lt;br /&gt;
    $not_translated = self::_( $my_string );   // The original string is not bordered by a translator marker =&amp;gt; no translation&lt;br /&gt;
    $not_translated = self::_( sprintf( &amp;quot;my string with a %s argument&amp;quot;, $argument ) ); // Same thing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to not make translators crazy ;) ==&lt;br /&gt;
&lt;br /&gt;
* When you need the same string twice, try to reuse exactly the same string (with the same case) to minimize the number of strings.&lt;br /&gt;
* Do not mark as translatable a game element that does not have to be translated (ex: if the name of a monster on a card is &amp;quot;Zzzzz&amp;quot;, maybe there&#039;s no need to translate it).&lt;br /&gt;
* Words does not come in the same order in each language. Thus, when you have to translate a string with an argument, do not write something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;_(&amp;quot;First part of the string, &amp;quot;).$argument.&#039; &#039;._(&amp;quot;second part of the string&amp;quot;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
Write instead:&lt;br /&gt;
&amp;lt;pre&amp;gt;sprintf( _(&amp;quot;First part of the string, %s second part of the string&amp;quot;), $argument )&amp;lt;/pre&amp;gt;&lt;br /&gt;
(or the equivalent &amp;quot;dojo.string.substitute&amp;quot; in Javascript)&lt;br /&gt;
* When translators are going to translate your game, the most difficult task for them is to get the context of the string to be translated. The more the string is a short insignificant string, the more difficult is the task for them. As a rule of thumb, try to avoid insignificant short strings.&lt;br /&gt;
* The BGA translation policy is to be flexible on grammar... We prefer to write &amp;quot;player gets 1 coin(s)&amp;quot; than write two versions of the same string for plural and singular - it reduces the number of strings to translate.&lt;br /&gt;
* Instead of writing nice strings like &amp;quot;With the effect of ZZZ, player XXX gets a new YYY&amp;quot;, which is very difficult to translate, write strings like &amp;quot;ZZZ: XXX gets YYY&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== On client side (Javascript) ==&lt;br /&gt;
&lt;br /&gt;
On client side, things are quite simple: you just have to use the &amp;quot;_()&amp;quot; function for all strings you want to translate.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get a string in player&#039;s language:&lt;br /&gt;
var translated = _(&amp;quot;original english string&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Get a string in player&#039;s language with parameter:&lt;br /&gt;
var translated = dojo.string.substitute( &amp;quot;You can pick ${p} cards and discard ${d}&amp;quot;, {&lt;br /&gt;
    p: 2,&lt;br /&gt;
    d: 4&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; in Javascript strings to translate, you should never use &#039;\n&#039;, &#039;\t&#039; or such, as it will break the translation bundle and result in all the Javascript translation to fail. In any case, the strings will result in HTML code, and such character codes won&#039;t have any impact on the HTML rendering. You should use HTML markup instead.&lt;br /&gt;
&lt;br /&gt;
== On server side (PHP) ==&lt;br /&gt;
&lt;br /&gt;
On PHP side, you can use 3 different functions to specify that a string must be translated.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;clienttranslate( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function is &#039;&#039;&#039;transparent&#039;&#039;&#039;: it will return the original English string without any change. It&#039;s only purpose is to mark this string as &amp;quot;must be translated&amp;quot;, and to make sure the translated version of the string will be available on client side.&lt;br /&gt;
&lt;br /&gt;
In general, you use clienttranslate:&lt;br /&gt;
* On your states.inc.php, for field &amp;quot;description&amp;quot; and &amp;quot;descriptionmyturn&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;quot;description&amp;quot; =&amp;gt; clienttranslate(&#039;${card_name}: ${actplayer} must discard 4 identical energies&#039;),&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On &amp;quot;material.inc.php&amp;quot;, when defining texts for game material that must be displayed on client side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;card_types = array(&lt;br /&gt;
&lt;br /&gt;
     1 =&amp;gt; array(&lt;br /&gt;
        &#039;name&#039; =&amp;gt; clienttranslate(&amp;quot;Amulet of Air&amp;quot;), // Thus, we can use &amp;quot;_( card_name )&amp;quot; on Javascript side.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When sending a notification with &amp;quot;notifyAllPlayers&amp;quot; or &amp;quot;notifyPlayer&amp;quot;, for the game log string and all game log arguments that need a translation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // A game log string with no argument:&lt;br /&gt;
     self::notifyAllPlayers( &#039;pickLibraryCards&#039;, clienttranslate(&amp;quot;Everyone draw cards from his library&amp;quot;), array() );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Translating arguments is a little bit more complex. It is using the &amp;quot;i18n&amp;quot; special argument as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 // In the following example, we translate the game log itself, but also the &amp;quot;card_name&amp;quot; argument:&lt;br /&gt;
&lt;br /&gt;
 self::notifyAllPlayers( &#039;winPoints&#039;, clienttranslate(&#039;${card_name}: ${player_name} gains ${points} point(s)&#039;), array(&lt;br /&gt;
                &#039;i18n&#039; =&amp;gt; array( &#039;card_name&#039; ),     // &amp;lt;===== We specify here that &amp;quot;card_name&amp;quot; argument must be transate&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;points&#039; =&amp;gt; $points,&lt;br /&gt;
                &#039;card_name&#039; =&amp;gt; $this-&amp;gt;card_types[8][&#039;name&#039;] // &amp;lt;==== Here, we provide original English string.&lt;br /&gt;
            ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::_( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function returns a string translated in the language of CURRENT user (ie: player who send the request to the server) (be careful, this is NOT the active player).&lt;br /&gt;
&lt;br /&gt;
Most of the time, you don&#039;t need to translate strings on server side, except on the following 3 situations:&lt;br /&gt;
* When throwing an exception because the player did a forbidden move.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// This will display a translatable red message to the player that just do some wrong action:&lt;br /&gt;
throw new feException( self::_(&#039;You must choose 3 cards&#039;), true);&lt;br /&gt;
&lt;br /&gt;
// ... notice the use of &amp;quot;true&amp;quot; parameter that signal that this exception is &amp;quot;expected&amp;quot;. In theory, all exception that are excepted should be translated.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;yourgame.view.php&amp;quot;, when creating the labels for the game interface used in your template (.tpl) file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;tpl[&#039;CARDS_FOR_YEAR_2&#039;] = self::_(&amp;quot;Your cards for year II&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Eventually, in your material.inc.php, if for example you need to use some string elements in your exceptions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// In material.inc.php, $this-&amp;gt;energies[n][&#039;nametr&#039;] has been created with the self::_() method. This we can do this:&lt;br /&gt;
throw new feException( self::_(&amp;quot;To execute this action you need more: &amp;quot;).&#039; &#039;.$this-&amp;gt;energies[$resource_id][&#039;nametr&#039;], true );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Eventually, in your &amp;quot;getAllDatas&amp;quot; PHP method, as the data return by this method is used only by current user.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;totranslate( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function works exactly like &#039;clienttranslate&#039;, except it tells BGA that the string is not needed on client side.&lt;br /&gt;
&lt;br /&gt;
You should not use this function, except on the following cases:&lt;br /&gt;
* Statistics name in stats.inc.php&lt;br /&gt;
* Option names and option values name in gameoptions.inc.php&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Scrollmap&amp;diff=781</id>
		<title>Scrollmap</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Scrollmap&amp;diff=781"/>
		<updated>2013-04-26T13:57:14Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Enable scrollmap zone extension */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scrollmap is a BGA client side component to display an infinite game area.&lt;br /&gt;
&lt;br /&gt;
In some games, players are building the main game area with tiles or cards. Examples:&lt;br /&gt;
* Carcassonne&lt;br /&gt;
* Saboteur&lt;br /&gt;
* Takenoko&lt;br /&gt;
* Taluva&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Of course this cause an additional difficulty for the adaptation, because we have to display an infinite game area into a finite space on the screen. This is where Scrollmap component can help you.&lt;br /&gt;
&lt;br /&gt;
== Scrollmap in action ==&lt;br /&gt;
&lt;br /&gt;
If you want to see how Scrollmap looks like, please try &amp;quot;Saboteur&amp;quot; or &amp;quot;Takenoko&amp;quot; games on BGA, or watch a game in progress.&lt;br /&gt;
&lt;br /&gt;
In both games, you can see that there are arrow controls around the main game area, so that players can use them to scroll the view. You can also drag&#039;n&#039;drop the game area to scroll.&lt;br /&gt;
&lt;br /&gt;
== How to use Scrollmap ==&lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/scrollmap&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/scrollmap&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, declare a new variable in your class for the Scrollmap object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        constructor: function(){&lt;br /&gt;
        console.log(&#039;yourgame constructor&#039;);&lt;br /&gt;
              &lt;br /&gt;
        // Scrollable area        	&lt;br /&gt;
        this.scrollmap = new ebg.scrollmap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, open your template (TPL) file and add this HTML code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;map_container&amp;quot;&amp;gt;&lt;br /&gt;
    	&amp;lt;div id=&amp;quot;map_scrollable&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;map_surface&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;map_scrollable_oversurface&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;movetop&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;moveleft&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;moveright&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;movedown&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are also some lines to add to your CSS stylesheet. Please note that you can adapt it to your needs, especially the default width of the scrollable area:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Scrollable area **/&lt;br /&gt;
&lt;br /&gt;
#map_container {&lt;br /&gt;
    position: relative;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
    height: 400px;&lt;br /&gt;
    overflow: hidden;&lt;br /&gt;
}&lt;br /&gt;
#map_scrollable, #map_scrollable_oversurface {&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    top: 205px;&lt;br /&gt;
    left:  315px;&lt;br /&gt;
}&lt;br /&gt;
#map_surface {&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    top: 0px;&lt;br /&gt;
    left: 0px;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
    height: 100%;&lt;br /&gt;
    cursor: move;&lt;br /&gt;
}&lt;br /&gt;
#map_footer {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, to link your HTML code with your Javascript, place this in your Javascript &amp;quot;Setup&amp;quot; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   	// Make map scrollable        	&lt;br /&gt;
        this.scrollmap.create( $(&#039;map_container&#039;),$(&#039;map_scrollable&#039;),$(&#039;map_surface&#039;),$(&#039;map_scrollable_oversurface&#039;) );&lt;br /&gt;
        this.scrollmap.setupOnScreenArrows( 150 );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is it! Now, you should see on your game interface a scrollable game area. This is not really impressive though, because you didn&#039;t add anything on the game area yet. This is the next step.&lt;br /&gt;
&lt;br /&gt;
== Scrollable area layers ==&lt;br /&gt;
&lt;br /&gt;
There are 2 - and only 2 - places where you should place your HTML stuff in your scrollable area:&lt;br /&gt;
* inside &amp;quot;map_scrollable&amp;quot; div&lt;br /&gt;
* inside &amp;quot;map_scrollable_oversurface&amp;quot; div&lt;br /&gt;
&lt;br /&gt;
The difference is very important: &amp;quot;map_scrollable&amp;quot; is beneath the surface that is used to drag&#039;n&#039;drop the game area, and &amp;quot;map_scrollable_oversurface&amp;quot; is above this surface. In practice:&lt;br /&gt;
* If some element on the game area need to be clicked (or any kind of user interaction), you should place it in map_scrollable_oversurface, otherwise no click can reach it.&lt;br /&gt;
* If some element on the game area don&#039;t need to be clicked, you&#039;d better place it in &amp;quot;map_scrollable&amp;quot;, so it is possible to drag&#039;n&#039;drop the game area from a point on this element.&lt;br /&gt;
&lt;br /&gt;
Of course, all layers are scrolled synchronously.&lt;br /&gt;
&lt;br /&gt;
Tips: in some situation, it&#039;s also useful to place a game element on map_scrollable and a corresponding invisible element over the surface to manage the interactions. Example: when an interactive element must be placed beneath a non interactive element for display reason.&lt;br /&gt;
&lt;br /&gt;
== Positioning elements on game area ==&lt;br /&gt;
&lt;br /&gt;
All elements on the game are must be absolute positioned (with &amp;quot;top&amp;quot; and &amp;quot;left&amp;quot; attributes).&lt;br /&gt;
&lt;br /&gt;
By default, the game area is centered on 0,0 coordinates.&lt;br /&gt;
&lt;br /&gt;
== Enable move arrows ==&lt;br /&gt;
&lt;br /&gt;
To show move arrows icons around the scrollmap in order to enable click based navigation in addition to drag and drop, add these lines to your CSS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Move arrows **/&lt;br /&gt;
&lt;br /&gt;
#movetop,#moveleft,#moveright,#movedown {&lt;br /&gt;
    display: block;&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    background-image: url(&#039;../../img/common/arrows.png&#039;);&lt;br /&gt;
    width: 32px;&lt;br /&gt;
    height: 32px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#movetop {&lt;br /&gt;
    top: 0px;&lt;br /&gt;
    left: 50%;&lt;br /&gt;
    background-position: 0px 32px;&lt;br /&gt;
}&lt;br /&gt;
#moveleft {&lt;br /&gt;
    top: 50%;&lt;br /&gt;
    left: 0px;&lt;br /&gt;
    background-position: 32px 0px;&lt;br /&gt;
}&lt;br /&gt;
#moveright {&lt;br /&gt;
    top: 50%;&lt;br /&gt;
    right: 0px;&lt;br /&gt;
    background-position: 0px 0px;&lt;br /&gt;
}&lt;br /&gt;
#movedown {&lt;br /&gt;
    bottom: 0px;&lt;br /&gt;
    left: 50%;&lt;br /&gt;
    background-position: 32px 32px;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your javascript, define the following functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        onMoveTop : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveTop&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 0, 300 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveLeft : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveLeft&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 300, 0 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveRight : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveRight&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( -300, 0 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveDown : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveDown&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 0, -300 );&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And connect onclick events on the arrows to these functions in your javascript setup&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        dojo.connect( $(&#039;movetop&#039;), &#039;onclick&#039;, this, &#039;onMoveTop&#039; );&lt;br /&gt;
        dojo.connect( $(&#039;moveleft&#039;), &#039;onclick&#039;, this, &#039;onMoveLeft&#039; );&lt;br /&gt;
        dojo.connect( $(&#039;moveright&#039;), &#039;onclick&#039;, this, &#039;onMoveRight&#039; );&lt;br /&gt;
        dojo.connect( $(&#039;movedown&#039;), &#039;onclick&#039;, this, &#039;onMoveDown&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enable scrollmap zone extension ==&lt;br /&gt;
&lt;br /&gt;
This is optional, when there can be unused screen space under the scrollmap that a player might want to use.&lt;br /&gt;
Add this in your .tpl after the scrollmap div (the matching css rules has already been defined):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;map_footer&amp;quot; class=&amp;quot;whiteblock&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;enlargedisplay&amp;quot;&amp;gt;&amp;amp;darr;&amp;amp;nbsp;&amp;amp;nbsp;{LABEL_ENLARGE_DISPLAY}&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;darr;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your javascript, define the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        onIncreaseDisplayHeight: function( evt )&lt;br /&gt;
        {&lt;br /&gt;
        	console.log( &#039;$$$$ Event : onIncreaseDisplayHeight&#039; );&lt;br /&gt;
        	evt.preventDefault();&lt;br /&gt;
        	&lt;br /&gt;
            var cur_h = toint( dojo.style( $(&#039;map_container&#039;), &#039;height&#039; ) );&lt;br /&gt;
            dojo.style( $(&#039;map_container&#039;), &#039;height&#039;, ( cur_h+300 ) + &#039;px&#039; );&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and connect them to the &#039;enlargedisplay&#039; link in your setup:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dojo.connect( $(&#039;enlargedisplay&#039;), &#039;onclick&#039;, this, &#039;onIncreaseDisplayHeight&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your view.php file, define the template variable LABEL_ENLARGE_DISPLAY so that it gets substituted with appropriate translatable text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;tpl[&#039;LABEL_ENLARGE_DISPLAY&#039;] = self::_(&amp;quot;Enlarge display&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Scrollmap&amp;diff=780</id>
		<title>Scrollmap</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Scrollmap&amp;diff=780"/>
		<updated>2013-04-26T13:53:16Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scrollmap is a BGA client side component to display an infinite game area.&lt;br /&gt;
&lt;br /&gt;
In some games, players are building the main game area with tiles or cards. Examples:&lt;br /&gt;
* Carcassonne&lt;br /&gt;
* Saboteur&lt;br /&gt;
* Takenoko&lt;br /&gt;
* Taluva&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Of course this cause an additional difficulty for the adaptation, because we have to display an infinite game area into a finite space on the screen. This is where Scrollmap component can help you.&lt;br /&gt;
&lt;br /&gt;
== Scrollmap in action ==&lt;br /&gt;
&lt;br /&gt;
If you want to see how Scrollmap looks like, please try &amp;quot;Saboteur&amp;quot; or &amp;quot;Takenoko&amp;quot; games on BGA, or watch a game in progress.&lt;br /&gt;
&lt;br /&gt;
In both games, you can see that there are arrow controls around the main game area, so that players can use them to scroll the view. You can also drag&#039;n&#039;drop the game area to scroll.&lt;br /&gt;
&lt;br /&gt;
== How to use Scrollmap ==&lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/scrollmap&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/scrollmap&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, declare a new variable in your class for the Scrollmap object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        constructor: function(){&lt;br /&gt;
        console.log(&#039;yourgame constructor&#039;);&lt;br /&gt;
              &lt;br /&gt;
        // Scrollable area        	&lt;br /&gt;
        this.scrollmap = new ebg.scrollmap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, open your template (TPL) file and add this HTML code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;map_container&amp;quot;&amp;gt;&lt;br /&gt;
    	&amp;lt;div id=&amp;quot;map_scrollable&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;map_surface&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;map_scrollable_oversurface&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;movetop&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;moveleft&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;moveright&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;movedown&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are also some lines to add to your CSS stylesheet. Please note that you can adapt it to your needs, especially the default width of the scrollable area:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Scrollable area **/&lt;br /&gt;
&lt;br /&gt;
#map_container {&lt;br /&gt;
    position: relative;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
    height: 400px;&lt;br /&gt;
    overflow: hidden;&lt;br /&gt;
}&lt;br /&gt;
#map_scrollable, #map_scrollable_oversurface {&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    top: 205px;&lt;br /&gt;
    left:  315px;&lt;br /&gt;
}&lt;br /&gt;
#map_surface {&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    top: 0px;&lt;br /&gt;
    left: 0px;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
    height: 100%;&lt;br /&gt;
    cursor: move;&lt;br /&gt;
}&lt;br /&gt;
#map_footer {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, to link your HTML code with your Javascript, place this in your Javascript &amp;quot;Setup&amp;quot; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   	// Make map scrollable        	&lt;br /&gt;
        this.scrollmap.create( $(&#039;map_container&#039;),$(&#039;map_scrollable&#039;),$(&#039;map_surface&#039;),$(&#039;map_scrollable_oversurface&#039;) );&lt;br /&gt;
        this.scrollmap.setupOnScreenArrows( 150 );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is it! Now, you should see on your game interface a scrollable game area. This is not really impressive though, because you didn&#039;t add anything on the game area yet. This is the next step.&lt;br /&gt;
&lt;br /&gt;
== Scrollable area layers ==&lt;br /&gt;
&lt;br /&gt;
There are 2 - and only 2 - places where you should place your HTML stuff in your scrollable area:&lt;br /&gt;
* inside &amp;quot;map_scrollable&amp;quot; div&lt;br /&gt;
* inside &amp;quot;map_scrollable_oversurface&amp;quot; div&lt;br /&gt;
&lt;br /&gt;
The difference is very important: &amp;quot;map_scrollable&amp;quot; is beneath the surface that is used to drag&#039;n&#039;drop the game area, and &amp;quot;map_scrollable_oversurface&amp;quot; is above this surface. In practice:&lt;br /&gt;
* If some element on the game area need to be clicked (or any kind of user interaction), you should place it in map_scrollable_oversurface, otherwise no click can reach it.&lt;br /&gt;
* If some element on the game area don&#039;t need to be clicked, you&#039;d better place it in &amp;quot;map_scrollable&amp;quot;, so it is possible to drag&#039;n&#039;drop the game area from a point on this element.&lt;br /&gt;
&lt;br /&gt;
Of course, all layers are scrolled synchronously.&lt;br /&gt;
&lt;br /&gt;
Tips: in some situation, it&#039;s also useful to place a game element on map_scrollable and a corresponding invisible element over the surface to manage the interactions. Example: when an interactive element must be placed beneath a non interactive element for display reason.&lt;br /&gt;
&lt;br /&gt;
== Positioning elements on game area ==&lt;br /&gt;
&lt;br /&gt;
All elements on the game are must be absolute positioned (with &amp;quot;top&amp;quot; and &amp;quot;left&amp;quot; attributes).&lt;br /&gt;
&lt;br /&gt;
By default, the game area is centered on 0,0 coordinates.&lt;br /&gt;
&lt;br /&gt;
== Enable move arrows ==&lt;br /&gt;
&lt;br /&gt;
To show move arrows icons around the scrollmap in order to enable click based navigation in addition to drag and drop, add these lines to your CSS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Move arrows **/&lt;br /&gt;
&lt;br /&gt;
#movetop,#moveleft,#moveright,#movedown {&lt;br /&gt;
    display: block;&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    background-image: url(&#039;../../img/common/arrows.png&#039;);&lt;br /&gt;
    width: 32px;&lt;br /&gt;
    height: 32px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#movetop {&lt;br /&gt;
    top: 0px;&lt;br /&gt;
    left: 50%;&lt;br /&gt;
    background-position: 0px 32px;&lt;br /&gt;
}&lt;br /&gt;
#moveleft {&lt;br /&gt;
    top: 50%;&lt;br /&gt;
    left: 0px;&lt;br /&gt;
    background-position: 32px 0px;&lt;br /&gt;
}&lt;br /&gt;
#moveright {&lt;br /&gt;
    top: 50%;&lt;br /&gt;
    right: 0px;&lt;br /&gt;
    background-position: 0px 0px;&lt;br /&gt;
}&lt;br /&gt;
#movedown {&lt;br /&gt;
    bottom: 0px;&lt;br /&gt;
    left: 50%;&lt;br /&gt;
    background-position: 32px 32px;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your javascript, define the following functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        onMoveTop : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveTop&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 0, 300 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveLeft : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveLeft&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 300, 0 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveRight : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveRight&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( -300, 0 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveDown : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveDown&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 0, -300 );&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And connect onclick events on the arrows to these functions in your javascript setup&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        dojo.connect( $(&#039;movetop&#039;), &#039;onclick&#039;, this, &#039;onMoveTop&#039; );&lt;br /&gt;
        dojo.connect( $(&#039;moveleft&#039;), &#039;onclick&#039;, this, &#039;onMoveLeft&#039; );&lt;br /&gt;
        dojo.connect( $(&#039;moveright&#039;), &#039;onclick&#039;, this, &#039;onMoveRight&#039; );&lt;br /&gt;
        dojo.connect( $(&#039;movedown&#039;), &#039;onclick&#039;, this, &#039;onMoveDown&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enable scrollmap zone extension ==&lt;br /&gt;
&lt;br /&gt;
This is optional, when there can be unused screen space under the scrollmap that a player might want to use.&lt;br /&gt;
Add this in your .tpl after the scrollmap div (the matching css rules has already been defined):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;map_footer&amp;quot; class=&amp;quot;whiteblock&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;enlargedisplay&amp;quot;&amp;gt;&amp;amp;darr;&amp;amp;nbsp;&amp;amp;nbsp;{LABEL_ENLARGE_DISPLAY}&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;darr;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your javascript, define the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        onIncreaseDisplayHeight: function( evt )&lt;br /&gt;
        {&lt;br /&gt;
        	console.log( &#039;$$$$ Event : onIncreaseDisplayHeight&#039; );&lt;br /&gt;
        	evt.preventDefault();&lt;br /&gt;
        	&lt;br /&gt;
            var cur_h = toint( dojo.style( $(&#039;map_container&#039;), &#039;height&#039; ) );&lt;br /&gt;
            dojo.style( $(&#039;map_container&#039;), &#039;height&#039;, ( cur_h+300 ) + &#039;px&#039; );&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and connect them to the &#039;enlargedisplay&#039; link in your setup:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dojo.connect( $(&#039;enlargedisplay&#039;), &#039;onclick&#039;, this, &#039;onIncreaseDisplayHeight&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Studio_FAQ&amp;diff=779</id>
		<title>Studio FAQ</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Studio_FAQ&amp;diff=779"/>
		<updated>2013-04-25T20:03:11Z</updated>

		<summary type="html">&lt;p&gt;Een: /* Should I use images free from copyright? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a place where we will collect and answer frequently asked questions.&lt;br /&gt;
&lt;br /&gt;
== What should I use to access the files through SFTP? ==&lt;br /&gt;
&lt;br /&gt;
There is a lot of tools to do that. Use the one you are the most comfortable with.&lt;br /&gt;
&lt;br /&gt;
On Linux Gnome, you can for example use the &#039;Connect to server&#039; function of the Nautilus file management system, or use sshfs.&lt;br /&gt;
&lt;br /&gt;
On Windows, there is for example the [http://winscp.net/ WinSCP client].&lt;br /&gt;
&lt;br /&gt;
== I can&#039;t edit the files in my game directory, it looks like they are readonly. What&#039;s happening? ==&lt;br /&gt;
&lt;br /&gt;
Maybe there is a maintenance operation underway.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t get access back after some time (say one or two hours), please send us a mail to check.&lt;br /&gt;
&lt;br /&gt;
== I can&#039;t access the Studio back-office, I get a &#039;Not authorized&#039; error message? ==&lt;br /&gt;
&lt;br /&gt;
You should first connect to the Studio website (with any of your &amp;lt;developer name&amp;gt;&amp;lt;number&amp;gt; accounts). As the authentication is shared with the back-office, then you will be able to access it.&lt;br /&gt;
&lt;br /&gt;
== I don&#039;t know the name to use to commit my game, what name should I use? ==&lt;br /&gt;
&lt;br /&gt;
The game name for committing is the name of the game in lower case and without spaces or special characters (ex: puertorico).&lt;br /&gt;
It is the same name as the name used for the game folder in your SFTP access.&lt;br /&gt;
&lt;br /&gt;
== What is the working language on BGA studio? ==&lt;br /&gt;
&lt;br /&gt;
Working language is &#039;&#039;&#039;English&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Variables and functions must be named with English words.&lt;br /&gt;
&lt;br /&gt;
Comments must be written in English.&lt;br /&gt;
&lt;br /&gt;
Game interface strings and game logs must be written in English.&lt;br /&gt;
&lt;br /&gt;
== How can I provide translation in my language? == &lt;br /&gt;
&lt;br /&gt;
BGA administrators will translate the game in French before the game release.&lt;br /&gt;
&lt;br /&gt;
After the game release, the collaborative translation interface can be used to translate into other languages.&lt;br /&gt;
&lt;br /&gt;
Check [[Translations]] to see how to make your game translatable.&lt;br /&gt;
&lt;br /&gt;
== I updated the images in the &#039;img&#039; folder of my game, but they don&#039;t show? ==&lt;br /&gt;
&lt;br /&gt;
On BGA Studio, there is the gameserver you are developing on, and the main site server that is used to launch the games. The game icon, box and the publisher logo are hosted on the main site server, so they are not immediately available when you modify them on the gameserver. To deploy them on the main site, you have to use the [[Studio back-office]] to do a commit.&lt;br /&gt;
&lt;br /&gt;
If the images still don&#039;t show after that, please try emptying your browser cache and reloading the page.&lt;br /&gt;
&lt;br /&gt;
== I added some game options / some game statistics, but they don&#039;t show? ==&lt;br /&gt;
&lt;br /&gt;
An extra deployment action from the BGA administrators is needed to activate new game options and statistics. Please contact us.&lt;br /&gt;
&lt;br /&gt;
== Should I use images free from copyright? ==&lt;br /&gt;
&lt;br /&gt;
If you are developing a game in the public domain, yes (or you can make your own if you feel it&#039;s better). &lt;br /&gt;
&lt;br /&gt;
If you are developing a game for which we have a licence, we will usually provide art files from the publisher.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Studio_FAQ&amp;diff=778</id>
		<title>Studio FAQ</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Studio_FAQ&amp;diff=778"/>
		<updated>2013-04-25T20:01:50Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a place where we will collect and answer frequently asked questions.&lt;br /&gt;
&lt;br /&gt;
== What should I use to access the files through SFTP? ==&lt;br /&gt;
&lt;br /&gt;
There is a lot of tools to do that. Use the one you are the most comfortable with.&lt;br /&gt;
&lt;br /&gt;
On Linux Gnome, you can for example use the &#039;Connect to server&#039; function of the Nautilus file management system, or use sshfs.&lt;br /&gt;
&lt;br /&gt;
On Windows, there is for example the [http://winscp.net/ WinSCP client].&lt;br /&gt;
&lt;br /&gt;
== I can&#039;t edit the files in my game directory, it looks like they are readonly. What&#039;s happening? ==&lt;br /&gt;
&lt;br /&gt;
Maybe there is a maintenance operation underway.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t get access back after some time (say one or two hours), please send us a mail to check.&lt;br /&gt;
&lt;br /&gt;
== I can&#039;t access the Studio back-office, I get a &#039;Not authorized&#039; error message? ==&lt;br /&gt;
&lt;br /&gt;
You should first connect to the Studio website (with any of your &amp;lt;developer name&amp;gt;&amp;lt;number&amp;gt; accounts). As the authentication is shared with the back-office, then you will be able to access it.&lt;br /&gt;
&lt;br /&gt;
== I don&#039;t know the name to use to commit my game, what name should I use? ==&lt;br /&gt;
&lt;br /&gt;
The game name for committing is the name of the game in lower case and without spaces or special characters (ex: puertorico).&lt;br /&gt;
It is the same name as the name used for the game folder in your SFTP access.&lt;br /&gt;
&lt;br /&gt;
== What is the working language on BGA studio? ==&lt;br /&gt;
&lt;br /&gt;
Working language is &#039;&#039;&#039;English&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Variables and functions must be named with English words.&lt;br /&gt;
&lt;br /&gt;
Comments must be written in English.&lt;br /&gt;
&lt;br /&gt;
Game interface strings and game logs must be written in English.&lt;br /&gt;
&lt;br /&gt;
== How can I provide translation in my language? == &lt;br /&gt;
&lt;br /&gt;
BGA administrators will translate the game in French before the game release.&lt;br /&gt;
&lt;br /&gt;
After the game release, the collaborative translation interface can be used to translate into other languages.&lt;br /&gt;
&lt;br /&gt;
Check [[Translations]] to see how to make your game translatable.&lt;br /&gt;
&lt;br /&gt;
== I updated the images in the &#039;img&#039; folder of my game, but they don&#039;t show? ==&lt;br /&gt;
&lt;br /&gt;
On BGA Studio, there is the gameserver you are developing on, and the main site server that is used to launch the games. The game icon, box and the publisher logo are hosted on the main site server, so they are not immediately available when you modify them on the gameserver. To deploy them on the main site, you have to use the [[Studio back-office]] to do a commit.&lt;br /&gt;
&lt;br /&gt;
If the images still don&#039;t show after that, please try emptying your browser cache and reloading the page.&lt;br /&gt;
&lt;br /&gt;
== I added some game options / some game statistics, but they don&#039;t show? ==&lt;br /&gt;
&lt;br /&gt;
An extra deployment action from the BGA administrators is needed to activate new game options and statistics. Please contact us.&lt;br /&gt;
&lt;br /&gt;
== Should I use images free from copyright? ==&lt;br /&gt;
&lt;br /&gt;
If you are developing a game in the public domain, yes (or you can make your own if you feel it&#039;s better). &lt;br /&gt;
If you are developing a game for which we have a licence, we will usually provide art files from the publisher.&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=How_to_join_BGA_developer_team%3F&amp;diff=777</id>
		<title>How to join BGA developer team?</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=How_to_join_BGA_developer_team%3F&amp;diff=777"/>
		<updated>2013-04-24T20:19:05Z</updated>

		<summary type="html">&lt;p&gt;Een: ²&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
   &#039;&#039;&#039;--- Notice ---&#039;&#039;&#039;&lt;br /&gt;
   We have received a lot of positive feedback on the Studio, and lots of developers have registered.&lt;br /&gt;
   We are very happy about it, but it comes with a cost in time spent answering emails and posts on the forum.&lt;br /&gt;
   So please bear with us if we are slow to answer. As soon as we can, we will.&lt;br /&gt;
   Thanks again for your interest!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Registering is done by e-mail at &#039;&#039;&#039;studio(at)boardgamearena.com&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Please provide the following information:&lt;br /&gt;
* your player user name on BGA&lt;br /&gt;
* your developer user name to be used on “BGA Studio” (for technical reasons, no space, number or special character);&lt;br /&gt;
* your real name;&lt;br /&gt;
* your e-mail address;&lt;br /&gt;
* your postal address.&lt;br /&gt;
&lt;br /&gt;
We also drafted a quick [http://en.doc.boardgamearena.com/images/0/02/BGA_TC_Dev_en.pdf &#039;&#039;&#039;&#039;terms &amp;amp; conditions&#039; document&#039;&#039;&#039;]. It&#039;s very light, so as to get to the fun part faster.&lt;br /&gt;
&lt;br /&gt;
To be valid, the registration e-mail must contain this document as an attachment, with the following sentence in the mail body: &#039;&#039;&#039;&#039;I agree with the terms &amp;amp; conditions for developers on BGA Studio joined as an attachment&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
And of course, we also encourage you to tell us about your developer experience and which games you would love to develop on BGA!&lt;br /&gt;
&lt;br /&gt;
== Ok, I registered, what do I get? ==&lt;br /&gt;
&lt;br /&gt;
First, we&#039;ll discuss by e-mail the names of some of the games we have an agreement to develop, so that you can tell us &#039;Hey, this game is great! I want to develop it!&#039; (please keep these names confidential, or it would ruin our tradition to make players guess the name of the next game on the forum)&lt;br /&gt;
&lt;br /&gt;
Second, once we have discussed together and are set on a game you&#039;ll take charge of, we&#039;ll create your studio account and you will get:&lt;br /&gt;
* one login / password to access files through SFTP&lt;br /&gt;
* ten logins with numeric suffixes from 0 to 9 and a common simple password to test games on the studio website while developing.&lt;br /&gt;
&lt;br /&gt;
Once logged in to your SFTP root folder, you will find:&lt;br /&gt;
* a &#039;&#039;&#039;&#039;resources.html&#039;&#039;&#039;&#039; file with the URLs to use and some extra connection information&lt;br /&gt;
* three folders containing the three simple games provided as examples&lt;br /&gt;
* a folder for the game you will be developing initialized after our &#039;EmptyGame&#039; template, providing the game structure (and comments! and examples!)&lt;br /&gt;
&lt;br /&gt;
Then... well that&#039;s all, you can start! See  [[Studio#Great.2C_I.27m_in.21_..._How_should_I_start.3F|Great, I&#039;m in! ... How should I start?]]&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Zone&amp;diff=772</id>
		<title>Zone</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Zone&amp;diff=772"/>
		<updated>2013-04-20T17:42:40Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Zone component is meant to organise items of the same type inside a predefined space.&lt;br /&gt;
&lt;br /&gt;
== Zone in action ==&lt;br /&gt;
&lt;br /&gt;
If you want to see how Zone works, please try &amp;quot;Can&#039;t Stop&amp;quot; or &amp;quot;Niagara&amp;quot; on BGA, or watch a game in progress or game replay.&lt;br /&gt;
&lt;br /&gt;
In Can&#039;t Stop, zone is used to display the bhikkus ascending the mountain when there is more than one on the same space (diagonal mode).&lt;br /&gt;
&lt;br /&gt;
In Niagara, it is used to display the canoes over the circles going down the river (custom mode).&lt;br /&gt;
&lt;br /&gt;
== How to use Zone == &lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/zone&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/zone&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, declare a new variable in your class for the Zone object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        constructor: function(){&lt;br /&gt;
        console.log(&#039;yourgame constructor&#039;);&lt;br /&gt;
              &lt;br /&gt;
        // Zone control        	&lt;br /&gt;
        this.myZone = new ebg.scrollmap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in your template file, you must add a div that will host this zone:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;my_zone&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And set its width (and optionnaly, height and position) in CSS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#my_zone {&lt;br /&gt;
  width: 100px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in your Javascript setup, attach your Zone component to the div and define its properties :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            zone.create( this, &#039;my_zone&#039;, &amp;lt;item_width&amp;gt;, &amp;lt;item_height&amp;gt; );&lt;br /&gt;
            zone.setPattern( &amp;lt;mode&amp;gt; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;item_width&amp;gt; is an integer for the width of the objects you want to organise in the zone&lt;br /&gt;
* &amp;lt;item_height&amp;gt; is an integer for the height of the objects you want to organise in the zone &lt;br /&gt;
* &amp;lt;mode&amp;gt; is one of &#039;grid&#039; (objects will be put on lines from top left to bottom right, wrapping when there is not enough space left on the line) &#039;diagonal&#039; (objects will be organised on a top left to bottom right diagonal, overlapping each other) or &#039;custom&#039; (objects will be organised depending upon their number and the coordinates that you provide - see below)&lt;br /&gt;
&lt;br /&gt;
Now your zone is ready to be used!&lt;br /&gt;
&lt;br /&gt;
After creating an object that you want to add to the zone as a classic HTML template (dojo.place / this.format_block), you can simply use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   zone.placeInZone( &amp;lt;object_id&amp;gt;, &amp;lt;weight&amp;gt; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;object_id&amp;gt; is the string identifier for your object &#039;my_object_id&#039;&lt;br /&gt;
* &amp;lt;weight&amp;gt; is an optional parameter used to sort items&lt;br /&gt;
&lt;br /&gt;
To remove an item, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   zone.removeFromZone( &amp;lt;object_id&amp;gt;, &amp;lt;destroy?&amp;gt;, &amp;lt;to&amp;gt; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;object_id&amp;gt; is the string identifier for your object &#039;my_object_id&#039;&lt;br /&gt;
* &amp;lt;destroy?&amp;gt; is a boolean indicating if the object should be destroyed after being removed&lt;br /&gt;
* &amp;lt;to&amp;gt; is the destination the object must be slided to when being removed (before being eventually destroyed)&lt;br /&gt;
&lt;br /&gt;
You can also:&lt;br /&gt;
* remove all items from the zone (and destroy them) using zone.removeAll();&lt;br /&gt;
* get the number of items in your zone using zone.getItemNumber();&lt;br /&gt;
* get an array of the ids of all the items using zone.getAllItems();&lt;br /&gt;
&lt;br /&gt;
== Custom mode == &lt;br /&gt;
&lt;br /&gt;
If you want complete control on how your objects are laid out inside the Zone, you can determine their coordinates after their number when being added to the zone. Here is how to do it, when defining your Zone properties in the javascript setup:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                this.zone.setPattern( &#039;custom&#039; );&lt;br /&gt;
                &lt;br /&gt;
                this.zone.itemIdToCoords = function( i, control_width ) {&lt;br /&gt;
                    if( i%8==0 )&lt;br /&gt;
                    {   return {  x:1,y:19, w:60, h:30 }; }&lt;br /&gt;
                    else if( i%8==1 )&lt;br /&gt;
                    {   return {  x:30,y:38, w:60, h:30 }; }&lt;br /&gt;
                    else if( i%8==2 )&lt;br /&gt;
                    {   return {  x:42,y:8, w:60, h:30 }; }&lt;br /&gt;
                    else if( i%8==3 )&lt;br /&gt;
                    {   return {  x:5,y:58, w:60, h:30 }; }&lt;br /&gt;
                    else if( i%8==4 )&lt;br /&gt;
                    {   return {  x:5,y:24, w:60, h:30 }; }&lt;br /&gt;
                    else if( i%8==5 )&lt;br /&gt;
                    {   return {  x:35,y:43, w:60, h:30 }; }&lt;br /&gt;
                    else if( i%8==6 )&lt;br /&gt;
                    {   return {  x:47,y:13, w:60, h:30 }; }&lt;br /&gt;
                    else if( i%8==7 )&lt;br /&gt;
                    {   return {  x:10,y:63, w:60, h:30 }; }&lt;br /&gt;
                };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Zone&amp;diff=771</id>
		<title>Zone</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Zone&amp;diff=771"/>
		<updated>2013-04-20T17:38:13Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Zone component is meant to organise items of the same type inside a predefined space.&lt;br /&gt;
&lt;br /&gt;
== Zone in action ==&lt;br /&gt;
&lt;br /&gt;
If you want to see how Zone works, please try &amp;quot;Can&#039;t Stop&amp;quot; or &amp;quot;Niagara&amp;quot; on BGA, or watch a game in progress or game replay.&lt;br /&gt;
&lt;br /&gt;
In Can&#039;t Stop, zone is used to display the bhikkus ascending the mountain when there is more than one on the same space (diagonal mode).&lt;br /&gt;
&lt;br /&gt;
In Niagara, it is used to display the canoes over the circles going down the river (custom mode).&lt;br /&gt;
&lt;br /&gt;
== How to use Zone == &lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/zone&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/zone&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, declare a new variable in your class for the Zone object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        constructor: function(){&lt;br /&gt;
        console.log(&#039;yourgame constructor&#039;);&lt;br /&gt;
              &lt;br /&gt;
        // Zone control        	&lt;br /&gt;
        this.myZone = new ebg.scrollmap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in your template file, you must add a div that will host this zone:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;my_zone&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And set its width (and optionnaly, height and position) in CSS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#my_zone {&lt;br /&gt;
  width: 100px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in your Javascript setup, attach your Zone component to the div and define its properties :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            zone.create( this, &#039;my_zone&#039;, &amp;lt;item_width&amp;gt;, &amp;lt;item_height&amp;gt; );&lt;br /&gt;
            zone.setPattern( &amp;lt;mode&amp;gt; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;item_width&amp;gt; is an integer for the width of the objects you want to organise in the zone&lt;br /&gt;
* &amp;lt;item_height&amp;gt; is an integer for the height of the objects you want to organise in the zone &lt;br /&gt;
* &amp;lt;mode&amp;gt; is one of &#039;grid&#039; (objects will be put on lines from top left to bottom right, wrapping when there is not enough space left on the line) &#039;diagonal&#039; (objects will be organised on a top left to bottom right diagonal, overlapping each other) or &#039;custom&#039; (objects will be organised depending upon their number and the coordinates that you provide - see below)&lt;br /&gt;
&lt;br /&gt;
Now your zone is ready to be used!&lt;br /&gt;
&lt;br /&gt;
After creating an object that you want to add to the zone as a classic HTML template (dojo.place / this.format_block), you can simply use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   zone.placeInZone( &amp;lt;object_id&amp;gt;, &amp;lt;weight&amp;gt; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;object_id&amp;gt; is the string identifier for your object &#039;my_object_id&#039;&lt;br /&gt;
* &amp;lt;weight&amp;gt; is an optional parameter used to sort items&lt;br /&gt;
&lt;br /&gt;
To remove an item, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   zone.removeFromZone( &amp;lt;object_id&amp;gt;, &amp;lt;destroy?&amp;gt;, &amp;lt;to&amp;gt; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;object_id&amp;gt; is the string identifier for your object &#039;my_object_id&#039;&lt;br /&gt;
* &amp;lt;destroy?&amp;gt; is a boolean indicating if the object should be destroyed after being removed&lt;br /&gt;
* &amp;lt;to&amp;gt; is the destination the object must be slided to when being removed (before being eventually destroyed)&lt;br /&gt;
&lt;br /&gt;
You can also:&lt;br /&gt;
* remove all items from the zone (and destroy them) using zone.removeAll();&lt;br /&gt;
* get the number of items in your zone using zone.getItemNumber();&lt;br /&gt;
* get an array of the ids of all the items using zone.getAllItems();&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Zone&amp;diff=770</id>
		<title>Zone</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Zone&amp;diff=770"/>
		<updated>2013-04-20T17:16:41Z</updated>

		<summary type="html">&lt;p&gt;Een: Created page with &amp;quot;The Zone component is meant to organise items of the same type inside a predefined space.  == Zone in action ==  If you want to see how Zone works, please try &amp;quot;Can&amp;#039;t Stop&amp;quot; or ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Zone component is meant to organise items of the same type inside a predefined space.&lt;br /&gt;
&lt;br /&gt;
== Zone in action ==&lt;br /&gt;
&lt;br /&gt;
If you want to see how Zone works, please try &amp;quot;Can&#039;t Stop&amp;quot; or &amp;quot;Niagara&amp;quot; on BGA, or watch a game in progress or game replay.&lt;br /&gt;
&lt;br /&gt;
In Can&#039;t Stop, zone is used to display the bhikkus ascending the mountain when there is more than one on the same space (diagonal mode).&lt;br /&gt;
&lt;br /&gt;
In Niagara, it is used to display the canoes over the circles going down the river (custom mode).&lt;br /&gt;
&lt;br /&gt;
== How to use Zone == &lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/zone&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/zone&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, declare a new variable in your class for the Zone object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        constructor: function(){&lt;br /&gt;
        console.log(&#039;yourgame constructor&#039;);&lt;br /&gt;
              &lt;br /&gt;
        // Zone control        	&lt;br /&gt;
        this.myZone = new ebg.scrollmap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in your template file, you must add a div that will host this zone:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;my_zone&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And set its width (and optionnaly, height and position) in CSS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#my_zone {&lt;br /&gt;
  width: 100px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in your Javascript setup, attach your Zone component to the div and define its properties :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            zone.create( this, &#039;my_zone&#039;, &amp;lt;item_width&amp;gt;, &amp;lt;item_height&amp;gt; );&lt;br /&gt;
            zone.setPattern( &amp;lt;mode&amp;gt; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;item_width&amp;gt; is an integer for the width of the objects you want to organise in the zone&lt;br /&gt;
* &amp;lt;item_height&amp;gt; is an integer for the height of the objects you want to organise in the zone &lt;br /&gt;
* &amp;lt;mode&amp;gt; is one of &#039;grid&#039; (objects will be put on lines from top left to bottom right, wrapping when there is not enough space left on the line) &#039;diagonal&#039; (objects will be organised on a top left to bottom right diagonal, overlapping each other) or &#039;custom&#039; (objects will be organised depending upon their number and the coordinates that you provide - see below)&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Scrollmap&amp;diff=769</id>
		<title>Scrollmap</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Scrollmap&amp;diff=769"/>
		<updated>2013-04-20T16:23:55Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scrollmap is a BGA client side component to display an infinite game area.&lt;br /&gt;
&lt;br /&gt;
In some games, players are building the main game area with tiles or cards. Examples:&lt;br /&gt;
* Carcassonne&lt;br /&gt;
* Saboteur&lt;br /&gt;
* Takenoko&lt;br /&gt;
* Taluva&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Of course this cause an additional difficulty for the adaptation, because we have to display an infinite game area into a finite space on the screen. This is where Scrollmap component can help you.&lt;br /&gt;
&lt;br /&gt;
== Scrollmap in action ==&lt;br /&gt;
&lt;br /&gt;
If you want to see how Scrollmap looks like, please try &amp;quot;Saboteur&amp;quot; or &amp;quot;Takenoko&amp;quot; games on BGA, or watch a game in progress.&lt;br /&gt;
&lt;br /&gt;
In both games, you can see that there are arrow controls around the main game area, so that players can use them to scroll the view. You can also drag&#039;n&#039;drop the game area to scroll.&lt;br /&gt;
&lt;br /&gt;
== How to use Scrollmap ==&lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/scrollmap&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/scrollmap&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, declare a new variable in your class for the Scrollmap object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        constructor: function(){&lt;br /&gt;
        console.log(&#039;yourgame constructor&#039;);&lt;br /&gt;
              &lt;br /&gt;
        // Scrollable area        	&lt;br /&gt;
        this.scrollmap = new ebg.scrollmap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, open your template (TPL) file and add this HTML code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;map_container&amp;quot;&amp;gt;&lt;br /&gt;
    	&amp;lt;div id=&amp;quot;map_scrollable&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;map_surface&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;map_scrollable_oversurface&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;movetop&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;moveleft&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;moveright&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;movedown&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are also some lines to add to your CSS stylesheet. Please note that you can adapt it to your needs, especially the default width of the scrollable area:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Scrollable area **/&lt;br /&gt;
&lt;br /&gt;
#map_container {&lt;br /&gt;
    position: relative;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
    height: 400px;&lt;br /&gt;
    overflow: hidden;&lt;br /&gt;
}&lt;br /&gt;
#map_scrollable, #map_scrollable_oversurface {&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    top: 205px;&lt;br /&gt;
    left:  315px;&lt;br /&gt;
}&lt;br /&gt;
#map_surface {&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    top: 0px;&lt;br /&gt;
    left: 0px;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
    height: 100%;&lt;br /&gt;
    cursor: move;&lt;br /&gt;
}&lt;br /&gt;
#map_footer {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, to link your HTML code with your Javascript, place this in your Javascript &amp;quot;Setup&amp;quot; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   	// Make map scrollable        	&lt;br /&gt;
        this.scrollmap.create( $(&#039;map_container&#039;),$(&#039;map_scrollable&#039;),$(&#039;map_surface&#039;),$(&#039;map_scrollable_oversurface&#039;) );&lt;br /&gt;
        this.scrollmap.setupOnScreenArrows( 150 );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is it! Now, you should see on your game interface a scrollable game area. This is not really impressive though, because you didn&#039;t add anything on the game area yet. This is the next step.&lt;br /&gt;
&lt;br /&gt;
== Scrollable area layers ==&lt;br /&gt;
&lt;br /&gt;
There are 2 - and only 2 - places where you should place your HTML stuff in your scrollable area:&lt;br /&gt;
* inside &amp;quot;map_scrollable&amp;quot; div&lt;br /&gt;
* inside &amp;quot;map_scrollable_oversurface&amp;quot; div&lt;br /&gt;
&lt;br /&gt;
The difference is very important: &amp;quot;map_scrollable&amp;quot; is beneath the surface that is used to drag&#039;n&#039;drop the game area, and &amp;quot;map_scrollable_oversurface&amp;quot; is above this surface. In practice:&lt;br /&gt;
* If some element on the game area need to be clicked (or any kind of user interaction), you should place it in map_scrollable_oversurface, otherwise no click can reach it.&lt;br /&gt;
* If some element on the game area don&#039;t need to be clicked, you&#039;d better place it in &amp;quot;map_scrollable&amp;quot;, so it is possible to drag&#039;n&#039;drop the game area from a point on this element.&lt;br /&gt;
&lt;br /&gt;
Of course, all layers are scrolled synchronously.&lt;br /&gt;
&lt;br /&gt;
Tips: in some situation, it&#039;s also useful to place a game element on map_scrollable and a corresponding invisible element over the surface to manage the interactions. Example: when an interactive element must be placed beneath a non interactive element for display reason.&lt;br /&gt;
&lt;br /&gt;
== Positioning elements on game area ==&lt;br /&gt;
&lt;br /&gt;
All elements on the game are must be absolute positioned (with &amp;quot;top&amp;quot; and &amp;quot;left&amp;quot; attributes).&lt;br /&gt;
&lt;br /&gt;
By default, the game area is centered on 0,0 coordinates.&lt;br /&gt;
&lt;br /&gt;
== Enable move arrows ==&lt;br /&gt;
&lt;br /&gt;
To show move arrows icons around the scrollmap in order to enable click based navigation in addition to drag and drop, add these lines to your CSS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Move arrows **/&lt;br /&gt;
&lt;br /&gt;
#movetop,#moveleft,#moveright,#movedown {&lt;br /&gt;
    display: block;&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    background-image: url(&#039;../../img/common/arrows.png&#039;);&lt;br /&gt;
    width: 32px;&lt;br /&gt;
    height: 32px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#movetop {&lt;br /&gt;
    top: 0px;&lt;br /&gt;
    left: 50%;&lt;br /&gt;
    background-position: 0px 32px;&lt;br /&gt;
}&lt;br /&gt;
#moveleft {&lt;br /&gt;
    top: 50%;&lt;br /&gt;
    left: 0px;&lt;br /&gt;
    background-position: 32px 0px;&lt;br /&gt;
}&lt;br /&gt;
#moveright {&lt;br /&gt;
    top: 50%;&lt;br /&gt;
    right: 0px;&lt;br /&gt;
    background-position: 0px 0px;&lt;br /&gt;
}&lt;br /&gt;
#movedown {&lt;br /&gt;
    bottom: 0px;&lt;br /&gt;
    left: 50%;&lt;br /&gt;
    background-position: 32px 32px;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your javascript, define the following functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        onMoveTop : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveTop&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 0, 300 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveLeft : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveLeft&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 300, 0 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveRight : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveRight&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( -300, 0 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveDown : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveDown&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 0, -300 );&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And connect onclick events on the arrows to these functions in your javascript setup&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        dojo.connect( $(&#039;movetop&#039;), &#039;onclick&#039;, this, &#039;onMoveTop&#039; );&lt;br /&gt;
        dojo.connect( $(&#039;moveleft&#039;), &#039;onclick&#039;, this, &#039;onMoveLeft&#039; );&lt;br /&gt;
        dojo.connect( $(&#039;moveright&#039;), &#039;onclick&#039;, this, &#039;onMoveRight&#039; );&lt;br /&gt;
        dojo.connect( $(&#039;movedown&#039;), &#039;onclick&#039;, this, &#039;onMoveDown&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
	<entry>
		<id>https://ca.doc.boardgamearena.com/index.php?title=Scrollmap&amp;diff=768</id>
		<title>Scrollmap</title>
		<link rel="alternate" type="text/html" href="https://ca.doc.boardgamearena.com/index.php?title=Scrollmap&amp;diff=768"/>
		<updated>2013-04-20T16:13:01Z</updated>

		<summary type="html">&lt;p&gt;Een: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scrollmap is a BGA client side component to display an infinite game area.&lt;br /&gt;
&lt;br /&gt;
In some games, players are building the main game area with tiles or cards. Examples:&lt;br /&gt;
* Carcassonne&lt;br /&gt;
* Saboteur&lt;br /&gt;
* Takenoko&lt;br /&gt;
* Taluva&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Of course this cause an additional difficulty for the adaptation, because we have to display an infinite game area into a finite space on the screen. This is where Scrollmap component can help you.&lt;br /&gt;
&lt;br /&gt;
== Scrollmap in action ==&lt;br /&gt;
&lt;br /&gt;
If you want to see how Scrollmap looks like, please try &amp;quot;Saboteur&amp;quot; or &amp;quot;Takenoko&amp;quot; games on BGA, or watch a game in progress.&lt;br /&gt;
&lt;br /&gt;
In both games, you can see that there are arrow controls around the main game area, so that players can use them to scroll the view. You can also drag&#039;n&#039;drop the game area to scroll.&lt;br /&gt;
&lt;br /&gt;
== How to use Scrollmap ==&lt;br /&gt;
&lt;br /&gt;
At first, don&#039;t forget to add &amp;quot;ebg/scrollmap&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/scrollmap&amp;quot;     /// &amp;lt;==== HERE&lt;br /&gt;
],&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, declare a new variable in your class for the Scrollmap object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        constructor: function(){&lt;br /&gt;
        console.log(&#039;yourgame constructor&#039;);&lt;br /&gt;
              &lt;br /&gt;
        // Scrollable area        	&lt;br /&gt;
        this.scrollmap = new ebg.scrollmap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, open your template (TPL) file and add this HTML code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;map_container&amp;quot;&amp;gt;&lt;br /&gt;
    	&amp;lt;div id=&amp;quot;map_scrollable&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;map_surface&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;map_scrollable_oversurface&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;movetop&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;moveleft&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;moveright&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a id=&amp;quot;movedown&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are also some lines to add to your CSS stylesheet. Please note that you can adapt it to your needs, especially the default width of the scrollable area:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Scrollable area **/&lt;br /&gt;
&lt;br /&gt;
#map_container {&lt;br /&gt;
    position: relative;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
    height: 400px;&lt;br /&gt;
    overflow: hidden;&lt;br /&gt;
}&lt;br /&gt;
#map_scrollable, #map_scrollable_oversurface {&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    top: 205px;&lt;br /&gt;
    left:  315px;&lt;br /&gt;
}&lt;br /&gt;
#map_surface {&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    top: 0px;&lt;br /&gt;
    left: 0px;&lt;br /&gt;
    width: 100%;&lt;br /&gt;
    height: 100%;&lt;br /&gt;
    cursor: move;&lt;br /&gt;
}&lt;br /&gt;
#map_footer {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, to link your HTML code with your Javascript, place this in your Javascript &amp;quot;Setup&amp;quot; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   	// Make map scrollable        	&lt;br /&gt;
        this.scrollmap.create( $(&#039;map_container&#039;),$(&#039;map_scrollable&#039;),$(&#039;map_surface&#039;),$(&#039;map_scrollable_oversurface&#039;) );&lt;br /&gt;
        this.scrollmap.setupOnScreenArrows( 150 );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is it! Now, you should see on your game interface a scrollable game area. This is not really impressive though, because you didn&#039;t add anything on the game area yet. This is the next step.&lt;br /&gt;
&lt;br /&gt;
== Scrollable area layers ==&lt;br /&gt;
&lt;br /&gt;
There are 2 - and only 2 - places where you should place your HTML stuff in your scrollable area:&lt;br /&gt;
* inside &amp;quot;map_scrollable&amp;quot; div&lt;br /&gt;
* inside &amp;quot;map_scrollable_oversurface&amp;quot; div&lt;br /&gt;
&lt;br /&gt;
The difference is very important: &amp;quot;map_scrollable&amp;quot; is beneath the surface that is used to drag&#039;n&#039;drop the game area, and &amp;quot;map_scrollable_oversurface&amp;quot; is above this surface. In practice:&lt;br /&gt;
* If some element on the game area need to be clicked (or any kind of user interaction), you should place it in map_scrollable_oversurface, otherwise no click can reach it.&lt;br /&gt;
* If some element on the game area don&#039;t need to be clicked, you&#039;d better place it in &amp;quot;map_scrollable&amp;quot;, so it is possible to drag&#039;n&#039;drop the game area from a point on this element.&lt;br /&gt;
&lt;br /&gt;
Of course, all layers are scrolled synchronously.&lt;br /&gt;
&lt;br /&gt;
Tips: in some situation, it&#039;s also useful to place a game element on map_scrollable and a corresponding invisible element over the surface to manage the interactions. Example: when an interactive element must be placed beneath a non interactive element for display reason.&lt;br /&gt;
&lt;br /&gt;
== Positioning elements on game area ==&lt;br /&gt;
&lt;br /&gt;
All elements on the game are must be absolute positioned (with &amp;quot;top&amp;quot; and &amp;quot;left&amp;quot; attributes).&lt;br /&gt;
&lt;br /&gt;
By default, the game area is centered on 0,0 coordinates.&lt;br /&gt;
&lt;br /&gt;
== Move arrows ==&lt;br /&gt;
&lt;br /&gt;
To show move arrows around the scrollmap to enable click based navigation in addition to drag and drop, add these lines to your CSS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Move arrows **/&lt;br /&gt;
&lt;br /&gt;
#movetop,#moveleft,#moveright,#movedown {&lt;br /&gt;
    display: block;&lt;br /&gt;
    position: absolute;&lt;br /&gt;
    background-image: url(&#039;../../img/common/arrows.png&#039;);&lt;br /&gt;
    width: 32px;&lt;br /&gt;
    height: 32px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#movetop {&lt;br /&gt;
    top: 0px;&lt;br /&gt;
    left: 50%;&lt;br /&gt;
    background-position: 0px 32px;&lt;br /&gt;
}&lt;br /&gt;
#moveleft {&lt;br /&gt;
    top: 50%;&lt;br /&gt;
    left: 0px;&lt;br /&gt;
    background-position: 32px 0px;&lt;br /&gt;
}&lt;br /&gt;
#moveright {&lt;br /&gt;
    top: 50%;&lt;br /&gt;
    right: 0px;&lt;br /&gt;
    background-position: 0px 0px;&lt;br /&gt;
}&lt;br /&gt;
#movedown {&lt;br /&gt;
    bottom: 0px;&lt;br /&gt;
    left: 50%;&lt;br /&gt;
    background-position: 32px 32px;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, in your javascript, define the following functions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        onMoveTop : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveTop&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 0, 300 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveLeft : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveLeft&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 300, 0 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveRight : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveRight&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( -300, 0 );&lt;br /&gt;
        },&lt;br /&gt;
        onMoveDown : function( evt )&lt;br /&gt;
        {&lt;br /&gt;
            console.log( &amp;quot;onMoveDown&amp;quot; );        &lt;br /&gt;
            evt.preventDefault();&lt;br /&gt;
            this.scrollmap.scroll( 0, -300 );&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And connect onclick events on the arrows to these functions in your javascript setup&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            dojo.connect( $(&#039;movetop&#039;), &#039;onclick&#039;, this, &#039;onMoveTop&#039; );&lt;br /&gt;
            dojo.connect( $(&#039;moveleft&#039;), &#039;onclick&#039;, this, &#039;onMoveLeft&#039; );&lt;br /&gt;
            dojo.connect( $(&#039;moveright&#039;), &#039;onclick&#039;, this, &#039;onMoveRight&#039; );&lt;br /&gt;
            dojo.connect( $(&#039;movedown&#039;), &#039;onclick&#039;, this, &#039;onMoveDown&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Een</name></author>
	</entry>
</feed>