<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BaronFraser</id>
	<title>Board Game Arena - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BaronFraser"/>
	<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/Special:Contributions/BaronFraser"/>
	<updated>2026-10-15T22:04:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpgroundfloor&amp;diff=31024</id>
		<title>Gamehelpgroundfloor</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpgroundfloor&amp;diff=31024"/>
		<updated>2026-08-10T07:51:33Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: Created page with &amp;quot;= Ground Floor =  &amp;#039;&amp;#039;A game for 1–5 players, by David Short.&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Ground Floor&amp;#039;&amp;#039;&amp;#039; is a worker-placement / time-management game in which one to five players take on the role of Entrepreneurs running a young start-up company. Players spend their limited time (Time markers) to manage their business, aiming to become the CEO of the most prestigious company by earning the most Prestige Points.   == Introduction ==  In &amp;#039;&amp;#039;&amp;#039;Ground Floor&amp;#039;&amp;#039;&amp;#039; one to five players adopt the role of...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Ground Floor =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;A game for 1–5 players, by David Short.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ground Floor&#039;&#039;&#039; is a worker-placement / time-management game in which one to five players take on the role of Entrepreneurs running a young start-up company. Players spend their limited time (Time markers) to manage their business, aiming to become the CEO of the most prestigious company by earning the most Prestige Points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Ground Floor&#039;&#039;&#039; one to five players adopt the role of Entrepreneurs responsible for the survival of their young start-up company. As CEO, a player will use their limited time to manage their business. Time is money, so they have to spend it wisely!&lt;br /&gt;
&lt;br /&gt;
Does a player need to hire staff or refine production? What about launching a marketing campaign? Anything is possible with effective use of time, money, and information. But in order to reach that corner office of your skyscraper, a player has to start with everybody else… at the &#039;&#039;&#039;Ground Floor&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
The goal is to become the CEO of the most prestigious company by accruing the most prestige points through expanding and improving your business.&lt;br /&gt;
&lt;br /&gt;
=== The Game Board ===&lt;br /&gt;
&lt;br /&gt;
The game board three tracks near the top-left corner, from top to bottom: the &#039;&#039;&#039;Rounds&#039;&#039;&#039; track, the &#039;&#039;&#039;Job Market&#039;&#039;&#039; track, and the &#039;&#039;&#039;Popularity&#039;&#039;&#039; track.&lt;br /&gt;
&lt;br /&gt;
Near the top-right corner of the board the players find two spaces to place &#039;&#039;&#039;Economic Forecast&#039;&#039;&#039; cards – in the left box the current card is placed, the right box holds the deck of future cards.&lt;br /&gt;
&lt;br /&gt;
From left to right there are various buildings with spaces where players may put their Time markers. These buildings are numbered &#039;&#039;&#039;A&#039;&#039;&#039; (&#039;&#039;&#039;Consulting Firm&#039;&#039;&#039;) to &#039;&#039;&#039;I&#039;&#039;&#039; (&#039;&#039;&#039;Construction Company&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=== The Player Boards ===&lt;br /&gt;
&lt;br /&gt;
Each player has a player board.&lt;br /&gt;
&lt;br /&gt;
On the left side are the six basic rooms which each player has in their company: Assembly, Training, Storage Closet, Meeting Room, Research &amp;amp; Testing, and Advertising. Each room lists what the players may do in it. To the right of the rooms is the Round Schedule, plus some Notes and reminders.&lt;br /&gt;
&lt;br /&gt;
On the right side is the &#039;&#039;&#039;Employee Track&#039;&#039;&#039;, where the CEO Marker and time markers track the size of your staff.&lt;br /&gt;
&lt;br /&gt;
The Specialty Tile of each company and added Floors are placed in the notch at the center of the board.&lt;br /&gt;
&lt;br /&gt;
=== Supply Cubes and Status Markers ===&lt;br /&gt;
&lt;br /&gt;
Supply Cubes are necessary to produce goods. They may be stored in a player&#039;s Storage Closet and are often acquired in the Warehouse.&lt;br /&gt;
&lt;br /&gt;
The Status Markers are placed in the starting spaces of the Rounds and Job Market tracks.&lt;br /&gt;
&lt;br /&gt;
=== A Player&#039;s Components ===&lt;br /&gt;
&lt;br /&gt;
In addition to a Player Board, each player receives, in their chosen player color, a CEO Marker, 2 Player markers, and 25 Time Markers.&lt;br /&gt;
&lt;br /&gt;
=== The Cards ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Ground Floor&#039;&#039; includes 20 Economic Forecast Cards.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# The players place the game board on the table.&lt;br /&gt;
# Each player chooses a color to represent their business in the game and takes 1 CEO marker, 2 Player markers, and 4 Time markers in their chosen color. In addition, each player takes 1 player board, 1 player aid, 7 [Info] and 1 Supply cube. They also take, &#039;&#039;at random&#039;&#039;, 1 Specialty tile and the Remodeled Room tile (or another advantage) awarded by their Specialty tile (see also chapter [[#Specialty Tiles|Specialty Tiles]]). They place the Specialty tile at the top of their player board, the Remodeled Room (if any) tile over the corresponding Ground Floor room, the Supply marker in their Storage Closet and the CEO together with 4 Time markers on their first space of the Employee track. The players place the remaining Money tokens, Info tokens, Time markers, Remodeled Room tiles, Untrained tokens and Supply cubes within easy reach of all players to create a General Stock.&lt;br /&gt;
# The players place one Status marker on the first space of the Rounds track.&lt;br /&gt;
# The players place one Status marker on the sixth space marked &amp;quot;5 / 5&amp;quot; of the Job Market.&lt;br /&gt;
# One player takes one Player marker of each player and stacks them, &#039;&#039;randomly&#039;&#039;, on the first space of the Popularity track. The topmost Player marker determines the start player for the first Round.&lt;br /&gt;
# The players now separate the Economic Forecast cards into four piles (Depression, Recession, Stable and Boom). They shuffle each pile separately, then randomly discard half of the cards in each pile and put these back into the box (unseen) as they will not be needed in the game. Then, the players shuffle all 10 remaining cards together and place the deck face down on the &#039;&#039;Future&#039;&#039; Economic Forecast space on the game board. Then, they move the top card face down to the &#039;&#039;Current&#039;&#039; Economic Forecast space.&lt;br /&gt;
# The players stack one Player marker of each player on the &amp;quot;No Bonus&amp;quot; space of the Marketing Bonus track; the order does not matter.&lt;br /&gt;
# The players place one Supply cube on each of the four spaces of the Warehouse.&lt;br /&gt;
# The players place the Stage 1 [Stage 1] Floor and Tenant Improvement tiles next to the Construction Company area of the game board. They place all the Stage 2 [Stage 2] and Stage 3 [Stage 3] Improvement tiles off to the side.&lt;br /&gt;
# For the first games, the players should place bonus components back into the box (2 new Economic Forecast cards &amp;quot;Great Depression&amp;quot; and &amp;quot;Windfall&amp;quot;, 5 Era cards, and 6 Event cards).&lt;br /&gt;
# The game is now ready to begin!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT NOTE:&#039;&#039;&#039; The players never start the game with the top card of the Economic Forecast deck being a Depression or Boom. If this occurs, they continue shuffling until a Recession or Stable card is the top card.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SUGGESTION FOR THE FIRST GAME:&#039;&#039;&#039; Instead of a random Economic Forecast deck, the players may choose to use a pre-set deck in order to ensure a less harsh economy. Shuffle each type of card separately. Then, construct the deck in this order (top to bottom), and put the remaining cards back in the box, they will not be needed:&lt;br /&gt;
&lt;br /&gt;
: Stable, Stable, Recession, Recession, Stable, Boom, Recession.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE (Improvement tiles):&#039;&#039;&#039; In a 2 or 3 player game, only one copy of each Improvement tile is available to purchase. Return additional copies of each Improvement tile to the box, they will not be needed.&lt;br /&gt;
&lt;br /&gt;
== Game Play ==&lt;br /&gt;
&lt;br /&gt;
Ground Floor is played over &#039;&#039;&#039;seven rounds&#039;&#039;&#039;, divided in &#039;&#039;&#039;three stages&#039;&#039;&#039; [Stage 1], [Stage 2], [Stage 3]. Each round consists of five phases. Per phase, players will conduct several player turns.&lt;br /&gt;
&lt;br /&gt;
These five phases form a round:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Receive Income&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Hire Employees&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Schedule Business&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Conduct Business&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Reorganize&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In each phase, turn order is determined by the position of the companies on the Popularity track. The most popular player/company, whose Player marker is &#039;&#039;furthest to the right&#039;&#039; on the track, goes first etc. If more than one player is on the same space, the Player Marker &#039;&#039;on top&#039;&#039; goes first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ground Floor&#039;&#039;&#039; ends after the &#039;&#039;&#039;Conduct Business&#039;&#039;&#039; phase of the seventh round has been completed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; Each time the rules describe costs or income, we will use the icons for all the different terms in this game. Please check the Player Aids for reference.&lt;br /&gt;
&lt;br /&gt;
=== I – Receive Income ===&lt;br /&gt;
&lt;br /&gt;
Players receive Money according to the location of their CEO marker on the Employee track. Some Improvements provide additional Money or Information during this phase.&lt;br /&gt;
&lt;br /&gt;
If a player has hired an employee, they must pay 3 [Money] during this phase. If the player cannot afford to do so, they &#039;&#039;have to&#039;&#039; fire an employee, discarding 3 [Time] and moving the CEO marker down one space on the Employee track.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: Marion already hired an employee, and now receives an income of 6 [Money].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== II – Hire Employees ===&lt;br /&gt;
&lt;br /&gt;
Players have the opportunity during this phase to hire new employees. In popularity order, each player may hire an employee at the current Job Market price. They move the Job Market Status marker to the right after each employee is hired (max. 7 [Money] / 7 [Info]).&lt;br /&gt;
&lt;br /&gt;
Once all players have had the opportunity to hire, the most popular player may hire again and so forth. This continues until all players have finished hiring employees.&lt;br /&gt;
&lt;br /&gt;
For each new employee that a player hires, they immediately move their CEO marker up on the Employee track to reflect the new size of their staff and place an Untrained [Untrained] token on the new employee&#039;s space next to the CEO.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT NOTE:&#039;&#039;&#039; The Time markers of an untrained employee are not available for use. The player gains these Time markers at start of the next round after the employee is trained, see [[#Ground Floor Rooms|Ground Floor Rooms]].&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: Marion hires her second employee. She pays 5 [Money] / 5 [Info] and moves her CEO to the second space of her Employee track and places an [Untrained] token next to the CEO. As this employee is untrained, she gets the 3 [Time] after she trained that employee. She moves the Job Market Status marker to the right.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== III – Schedule Business ===&lt;br /&gt;
&lt;br /&gt;
Players spend this phase scheduling their Time markers and investing in tasks. Players only have a finite amount of time to spend developing their business.&lt;br /&gt;
&lt;br /&gt;
The CEO is a business&#039; first employee, and provides 4 [Time]. Each additional &#039;&#039;trained&#039;&#039; employee provides 3 [Time].&lt;br /&gt;
&lt;br /&gt;
During the Schedule Business phase, in Popularity order, players take turns assigning Time markers to tasks on their Player board &#039;&#039;or&#039;&#039; on the Game board. Time markers may &#039;&#039;not&#039;&#039; be assigned to Player boards belonging to other players.&lt;br /&gt;
&lt;br /&gt;
On a player&#039;s turn they choose any &#039;&#039;one&#039;&#039; task and assign the number of Time markers from their Employee track indicated by that task. For tasks with multiple spaces for Time markers, the player must place their Time markers in the first available space in &#039;&#039;numerical order&#039;&#039; if spaces are marked.&lt;br /&gt;
&lt;br /&gt;
If spaces are not marked with numbers, the player may place &#039;&#039;anywhere&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Later, during &#039;&#039;&#039;Conduct Business&#039;&#039;&#039;, &#039;&#039;all&#039;&#039; locations are resolved from top to bottom.&lt;br /&gt;
&lt;br /&gt;
* See chapter [[#City Business|City Business]] for details of the tasks at these buildings.&lt;br /&gt;
* See chapter [[#Ground Floor Rooms|Ground Floor Rooms]], chapter [[#Tenant Improvements|Tenant Improvements]], and chapter [[#Floor Improvements|Floor Improvements]] for details of tasks.&lt;br /&gt;
&lt;br /&gt;
Play then continues with the next most popular player etc., until each player has assigned all of the Time markers on their Employee track. Since each player may have a different number of employees, the same player may end up taking several turns in a row once their opponents have spent all of their time.&lt;br /&gt;
&lt;br /&gt;
* Tasks on the Player board resolve &#039;&#039;immediately&#039;&#039;, therefore any benefit gained from these tasks may be used in upcoming turns during the current Schedule Business phase.&lt;br /&gt;
* All tasks on the Game board will be resolved during the &#039;&#039;&#039;Conduct Business&#039;&#039;&#039; phase.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT NOTE:&#039;&#039;&#039; In contrast to the tasks on the Game board, the Ground Floor Rooms on a Player Board are unlimited. This means that they can be used over and over again during the same Schedule Business phase, placing the indicated number of Time markers each time.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: As her first action Marion pays 6 [Money] and places 1 [Time] from her Employee track on the first space of the Consulting Firm. Only later during the &#039;&#039;&#039;Conduct Business&#039;&#039;&#039; phase, Marion will resolve this action. Later during her turn, she places 1 [Time] from her Employee track in the Meeting Room of her Player board and immediately receives 1 [Info].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Office Remodel ===&lt;br /&gt;
&lt;br /&gt;
At any time during the Schedule Business phase, a player may remodel their Ground Floor rooms on the Player Board. Remodeling does &#039;&#039;not&#039;&#039; require any Time markers and is done in addition to their turn. The cost to remodel each Ground Floor room is 3 [Money] / 3 [Info]. After paying this cost, the player takes the desired Remodeled Room tile from the General Stock and places it on top of the corresponding Ground Floor room on their Player board. The benefit of a Remodeled room is available immediately, and has no effect on Time markers already assigned to that room.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: During the Schedule Business phase Marion decides to remodel her Ground Floor Training room. She pays 3 [Money] / 3 [Info] and places the remodeled Training room on that space. She can immediately use that room.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== IV – Conduct Business ===&lt;br /&gt;
&lt;br /&gt;
During this phase, each area on the Game board is resolved in order:&lt;br /&gt;
&lt;br /&gt;
# Consulting Firm&lt;br /&gt;
# Advertising Agency&lt;br /&gt;
# Marketing Bonus&lt;br /&gt;
# Warehouse&lt;br /&gt;
# Factory&lt;br /&gt;
# Stock Exchange&lt;br /&gt;
# Economic Forecast&lt;br /&gt;
# Retail Outlets&lt;br /&gt;
# Construction Company&lt;br /&gt;
&lt;br /&gt;
See chapter [[#City Business|City Business]] for details of the tasks at these buildings.&lt;br /&gt;
&lt;br /&gt;
=== V – Reorganize ===&lt;br /&gt;
&lt;br /&gt;
The following steps are resolved in order during each Reorganize phase:&lt;br /&gt;
&lt;br /&gt;
# All players move any Time markers from their Player board to the General Stock. Time markers on the Game board remain there, if not otherwise mentioned in chapter [[#City Business|City Business]].&lt;br /&gt;
# Each player in Popularity order may downsize, moving their CEO marker down one space for each employee fired. When firing an employee, the player loses Time markers and discards the matching 3 [Time] for that fired employee.&lt;br /&gt;
# All players replenish their Time markers according to their Employee track, even if some of their Time markers remain on the Game board.&lt;br /&gt;
# Move all the Player markers on the Marketing Bonus track to the &amp;quot;No Bonus&amp;quot; space.&lt;br /&gt;
# Add one Supply marker to the &#039;&#039;most expensive empty&#039;&#039; space at the Warehouse. If all of the spaces at the Warehouse are full, no markers are added.&lt;br /&gt;
# All Player markers on the Popularity track are moved one space to the left, one by one, in reverse popularity order. Player markers stacked in the same space will move together, keeping the order of the stack intact. Any Player marker in the leftmost space does not move.&lt;br /&gt;
# Update the Job Market by moving the Status marker to the left according to the &#039;&#039;Unemployed&#039;&#039; line on the current Economic Forecast card (min. 2 [Money] / 2 [Info]).&lt;br /&gt;
# Move the top card of the Future Economic Forecast deck &#039;&#039;face down&#039;&#039; to the Current Economic Forecast space.&lt;br /&gt;
# Move the Round Status marker one space to the right.&lt;br /&gt;
# At the end of the second round, add the [Stage 2] Improvement tiles to those remaining at the Construction Company. At the end of the fifth round, add the [Stage 3] tiles as well.&lt;br /&gt;
&lt;br /&gt;
A new round is ready to begin.&lt;br /&gt;
&lt;br /&gt;
== Game End ==&lt;br /&gt;
&lt;br /&gt;
The game ends after the Conduct Business phase of the seventh round has been completed.&lt;br /&gt;
&lt;br /&gt;
At that point, all players add up the Prestige Points [PP] for all Remodeled Rooms, Tenant Improvements, Floors, and Achievement Floors. They also count an additional 1 [PP] for each full set of 3 [Money] / 3 [Info].&lt;br /&gt;
&lt;br /&gt;
The winner is the player with the most prestigious business, as measured by Prestige Points. In case of a tie, the most popular tied player (according to the Popularity track) wins.&lt;br /&gt;
&lt;br /&gt;
== City Business ==&lt;br /&gt;
&lt;br /&gt;
=== A – Consulting Firm ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCHEDULE BUSINESS:&#039;&#039;&#039; Players schedule business at the Consulting Firm for the opportunity to gain [Info] by placing 1 [Time] in the topmost available space in the left column and paying the indicated amount of [Money] for that space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CONDUCT BUSINESS:&#039;&#039;&#039; All players with Time markers in the right column receive [Info] &#039;&#039;if and only if&#039;&#039; the corresponding space in the &#039;&#039;left&#039;&#039; column is occupied. Players with Time markers in the right column &#039;&#039;without&#039;&#039; the corresponding space in the left column occupied have had their meetings cancelled and do not receive any info. Move all Time markers from the right column to the General Stock, then slide all Time markers from the left column to the right column.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: During the Schedule Business phase, Angelika has two Time markers and Marion has 1 Time marker in the right column from the previous round. This round, Tanja and Angelika have both placed 1 Time marker in the Consulting Firm during the Schedule Business phase. Tanja paid 5 [Money] and Angelika paid 6 [Money].&#039;&#039;&lt;br /&gt;
: &#039;&#039;During the Conduct Business phase, Angelika collects 20 [Info], but Marion gets nothing because there is no Time marker in the third space of the left column. All three Time markers from the left column are returned to the General Stock, and the Time markers from the right column slide over to the right column.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== B – Advertising Agency ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCHEDULE BUSINESS:&#039;&#039;&#039; Players schedule business at the Advertising Agency to boost their business&#039; Popularity. It costs 1 [Money] / 1 [Info] to place 1 [Time] in any available space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CONDUCT BUSINESS:&#039;&#039;&#039; This area resolves from top to bottom. The player with a Time marker in the top space will decide first which type of Marketing they wish to do. The player with the Time marker in the bottom space will get the advantage of choosing last.&lt;br /&gt;
&lt;br /&gt;
The types of Marketing available are: Networking, Social Media, and Broadcast. Only one type may be chosen for each Time marker placed in the Advertising Agency.&lt;br /&gt;
&lt;br /&gt;
* If Networking is chosen, then the player moves their 1 [Time] from the Advertising Agency to the Networking space. In addition they place 1 [Time] from the General Stock into the Networking space at no additional cost.&lt;br /&gt;
* If Social Media is chosen, then the player moves their 1 [Time] from the Advertising Agency to the Social Media space at an additional cost of 1 [Money] / 1 [Info].&lt;br /&gt;
* If Broadcast is chosen, then the player moves their 1 [Time] from the Advertising Agency to the Broadcast space at an additional cost of 2 [Money] / 2 [Info].&lt;br /&gt;
&lt;br /&gt;
After players have decided where to place their Time markers, each marketing type is resolved one at a time as follows. Resolve Networking for all players first, then Social Media, then Broadcast.&lt;br /&gt;
&lt;br /&gt;
For each marketing type, in popularity order, advance each player&#039;s Popularity marker once for every:&lt;br /&gt;
&lt;br /&gt;
* 3 [Time] in Networking&lt;br /&gt;
* 2 [Time] in Social Media&lt;br /&gt;
* 1 [Time] in Broadcast&lt;br /&gt;
&lt;br /&gt;
Advance the player&#039;s Popularity marker one additional space if that player had the &#039;&#039;single most&#039;&#039; Time markers in that marketing type. If multiple players are tied for the most Time markers, none of them receive this additional Popularity boost.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT NOTE:&#039;&#039;&#039; For each Marketing type, after all Time markers are accounted for and the Popularity track adjusted accordingly, move all Time markers that contributed to advancing in Popularity (including all Time markers of the player with the &#039;&#039;single most&#039;&#039;) to the general stock. Any excess Time markers remain at the Advertising Agency and may contribute to Marketing in future rounds.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: While conducting business, first Networking is resolved. Marion advances first as she is the most popular. Marion advances one space on the Popularity track for 3 [Time]. Nikki is next most popular, and advances two spaces (one for having 3 [Time], and another for having the most Time markers in Networking). Angelika only has 1 [Time], and therefore does not advance in Popularity.&#039;&#039;&lt;br /&gt;
: &#039;&#039;Next, Social Media is resolved: Angelika only has 1 [Time], which is not enough to advance in Popularity, so she does have the most Time markers in Social Media, so she does advance one space.&#039;&#039;&lt;br /&gt;
: &#039;&#039;Finally, Broadcast is resolved: Tanja has 1 [Time], which meets the requirement for Broadcast and is the most Time markers there, so Tanja advances 2 spaces on the Popularity track.&#039;&#039;&lt;br /&gt;
: &#039;&#039;All Time markers are returned to the General Stock, except for Angelika&#039;s Time marker in the Networking box. It did not contribute to Popularity, so it remains in the Networking box for next round.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== C – Marketing Bonus ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCHEDULE BUSINESS:&#039;&#039;&#039; The Marketing Bonus area is not available to players during the Schedule Business phase.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CONDUCT BUSINESS:&#039;&#039;&#039; In Popularity order, each player, except the least popular, chooses a Marketing bonus. Bonuses are awarded immediately, and each bonus may be chosen by only one player.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Marketing bonuses:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Remodel 1 Room (for 1 [Money] / 1 [Info])&lt;br /&gt;
* Supply: Gain 1 [Supply]&lt;br /&gt;
* Money: Gain 2 [Money]&lt;br /&gt;
* Information: Gain 2 [Info]&lt;br /&gt;
* Temp: Gain 1 [Time] for the next round&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; In a 2-player game Marketing Bonuses are &#039;&#039;not&#039;&#039; used. Neither player will receive a Marketing Bonus, no matter how popular they are.&lt;br /&gt;
&lt;br /&gt;
=== D – Warehouse ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCHEDULE BUSINESS:&#039;&#039;&#039; Players schedule business at the Warehouse in order to acquire new supplies. These supplies vary in cost. Players choose to spend [Money] or [Info] (never both) to place on any available space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CONDUCT BUSINESS:&#039;&#039;&#039; Players collect the [Supply] next to their Time markers. When a player acquires a new [Supply], they must have a place to store it on their Ground Floor. If no storage space in their Storage Closet is available, then the [Supply] must be discarded back to the General Stock.&lt;br /&gt;
&lt;br /&gt;
=== E – Factory ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCHEDULE BUSINESS:&#039;&#039;&#039; Players schedule business at the Factory to create products to sell at the Retail Outlets. Players pay 2 [Money] / 2 [Info] and 1 [Supply] to place 1 [Time] in the first available space in numerical order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CONDUCT BUSINESS:&#039;&#039;&#039; In numerical order, players move their Time markers representing products from the Factory to Retail Outlets. At this time they have the opportunity to set the price for the product they are selling. There are four different price brackets, separated by a white line.&lt;br /&gt;
&lt;br /&gt;
Later, the customers will purchase the products within the least expensive price bracket before buying products within a more expensive price bracket.&lt;br /&gt;
&lt;br /&gt;
Player icons [3 players] and [4 players] dictate how many spaces are available at the Retail Outlets for the number of players in the game. For instance, in a 3-player game, players may place Time markers up to and including the spaces marked with the [3 players] on it, but not on spaces marked with the [4 players]. On each space, only one player can place a Time marker. If Retail Outlets become completely full while resolving the Factory, further Time markers may be placed in the Liquidation space, where they &#039;&#039;immediately&#039;&#039; sell for 3 [Money].&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: During the Schedule Business phase, Angelika placed first, and Nikki last.&#039;&#039;&lt;br /&gt;
: &#039;&#039;The Conduct Business phase resolves by moving from the Factory to Retail Outlets. Marion has a leftover Time marker from the previous round.&#039;&#039;&lt;br /&gt;
: &#039;&#039;Angelika resolves first and picks the 8 [Money] space. Tanja picks the 12 [Money] space, Nikki chooses the 8 [Money] space, Angelika chooses the 12 [Money] space and finally Nikki chooses the 9 [Money] space.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== F – Stock Exchange ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCHEDULE BUSINESS:&#039;&#039;&#039; Players schedule business at the Stock Exchange to get [Money]. Players pay [Money] and/or [Info] to place 1 [Time] on any of the four spaces.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CONDUCT BUSINESS:&#039;&#039;&#039; All Time markers placed during Schedule Business move up into the Stock Exchange track one space at a time. This movement is &#039;&#039;not&#039;&#039; related to the Economic Forecast. Therefore the Time marker in the first space moves up, then the Time marker in the space below etc., follow the arrows from box to box. Each time a new Time marker enters the track, it pushes all the Time markers directly above them one space up.&lt;br /&gt;
&lt;br /&gt;
Then, all Time markers on the Stock Exchange track, including the ones that just entered, move up according to the current Economic Forecast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Depression:&#039;&#039;&#039; 0 spaces&lt;br /&gt;
* &#039;&#039;&#039;Recession:&#039;&#039;&#039; 1 space&lt;br /&gt;
* &#039;&#039;&#039;Stable:&#039;&#039;&#039; 2 spaces&lt;br /&gt;
* &#039;&#039;&#039;Boom:&#039;&#039;&#039; 3 spaces&lt;br /&gt;
&lt;br /&gt;
Finally, in Popularity order, each player with at least one Time marker on the Stock Exchange track decides whether to keep or remove any number of their Time Markers. Any Time marker that is kept on the track will stay there for the next round. Any Time marker that is removed will gain the player a multiple amount of [Money] according to the current Economic Forecast. Gaps are possible on the track due to this removal.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Depression:&#039;&#039;&#039; 0 [Money]&lt;br /&gt;
* &#039;&#039;&#039;Recession:&#039;&#039;&#039; 1 [Money]&lt;br /&gt;
* &#039;&#039;&#039;Stable:&#039;&#039;&#039; 2 [Money]&lt;br /&gt;
* &#039;&#039;&#039;Boom:&#039;&#039;&#039; 3 [Money]&lt;br /&gt;
&lt;br /&gt;
Each time a Time marker is pushed above the topmost space, the player &#039;&#039;has&#039;&#039; to &#039;&#039;&#039;Buy Out&#039;&#039;&#039; this Time marker and gets twice the amount of money according to the current Economic Forecast.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: During the Schedule Business phase, Nikki places a Time marker on the first space, and Tanja in the third space.&#039;&#039;&lt;br /&gt;
: &#039;&#039;Marion and Nikki have Time markers in the Stock Exchange from the previous round. During the Conduct Business phase, first Nikki moves her Time marker onto the first space of the Stock Exchange, then Tanja, whose Time marker both pushes Nikki&#039;s and Marion&#039;s Time markers one space up.&#039;&#039;&lt;br /&gt;
: &#039;&#039;The current Economic Forecast is &amp;quot;Stable&amp;quot;, so all Time markers move 2 spaces up.&#039;&#039;&lt;br /&gt;
: &#039;&#039;Finally, Nikki decides to remove both her Time markers to get 12 [Money]. Both Marion and Tanja decide to keep their Time Markers on the Stock Exchange.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== G – Economic Forecast ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCHEDULE BUSINESS:&#039;&#039;&#039; This area is not available to players during the Schedule Business phase.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CONDUCT BUSINESS:&#039;&#039;&#039; Once the Stock Exchange is completely resolved, reveal the Economic Forecast card in the &#039;&#039;current&#039;&#039; space.&lt;br /&gt;
&lt;br /&gt;
=== H – Retail Outlets ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCHEDULE BUSINESS:&#039;&#039;&#039; Retail Outlets are not available to players during the Schedule Business phase.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CONDUCT BUSINESS:&#039;&#039;&#039; According to the Economic Forecast card, a number of consumers will buy products at the Retail Outlets based on the number of players in the game. Each consumer is attracted to the best deal, and will therefore buy from the businesses in the lowest price bracket. Within the lowest bracket, each consumer will purchase from the most popular business in that bracket. For each product sold, the player receives [Money] as printed on the space, removes the matching Time marker from the Retail Outlet, and places it back into the General Stock.&lt;br /&gt;
&lt;br /&gt;
This continues until all consumers have bought one product each or all products have been sold, whichever comes first.&lt;br /&gt;
&lt;br /&gt;
Any remaining Time markers at the Retail Outlets (representing products that did not sell) drop down to any lower price bracket (including Liquidation), from the lowest price bracket up, in Popularity order within a bracket. Players may choose which price within the new bracket to place their Time marker on. Any Time marker dropping into the Liquidation space immediately sells for 3 [Money].&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: During the Conduct Business phase, the revealed Economic Forecast card is a &amp;quot;Stable&amp;quot;, which brings 3 Consumers in this 4-player game.&#039;&#039;&lt;br /&gt;
: &#039;&#039;The first consumer buys Angelika&#039;s product from the lowest price bracket for 8 [Money], as Angelika is the most popular. Marion is the next most popular player with a product in the lowest bracket, so the second consumer buys Marion&#039;s product for 6 [Money]. Nikki is the only player left with products in the lowest price bracket, so the third customer will buy her cheapest product for 6 [Money].&#039;&#039;&lt;br /&gt;
: &#039;&#039;After the third consumer has bought, three products remain in the Retail Outlets. From the lowest price bracket up, those products drop in price. First, Nikki&#039;s product drops from 8 [Money] to the Liquidation box and sells immediately for 3 [Money]. Then, since Angelika is more popular than Tanja, Angelika&#039;s 12 [Money] product drops to a lower price bracket. Angelika may choose to set the new price at 8 [Money], 6 [Money] or Liquidation for 3 [Money] right now. Finally, Tanja must choose a new price (8 [Money], 6 [Money] or Liquidation) as well.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== I – Construction Company ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCHEDULE BUSINESS:&#039;&#039;&#039; Players schedule business at the Construction Company in order to expand their business with a new Improvement. Players pay 5 [Money] and 1 [Info] to place 1 [Time] in the first available space in numerical order. Player icons [3 players], [4 players] and [5 players] dictate how many spaces are available for the number of players in the game. For instance, in a 4-player game, players place Time markers up to and including the spaces marked with the [4 players] on it, but not on the space marked with [5 players].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CONDUCT BUSINESS:&#039;&#039;&#039; In numerical order, each player has the option of buying an available Improvement. Starting with space 1, a Tenant Improvement can be bought for 7 [Money] / 1 [Info], or a Floor Improvement can be bought for 7 [Money] plus 2 [Money] / 2 [Info] per existing Floor on a Player&#039;s Player board. Players pay the cost for their chosen Improvement, add it to their Player board, and move their Time marker to the General Stock. Floors are placed on top of their building (move the Specialty tile up to make space), and Tenant Improvements replace a Ground Floor room or may be placed on an Empty Floor tile.&lt;br /&gt;
&lt;br /&gt;
See chapter [[#Tenant Improvements|Tenant Improvements]] and chapter [[#Floor Improvements|Floor Improvements]] for details of their tasks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Players start with the Ground Floor and the Specialty tile; they are not purchased. Additionally, the Specialty tile is not considered to be a floor!&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;EXAMPLE: Angelika&#039;s building consists of the following floors. During the game, she paid the following costs for each floor:&#039;&#039;&lt;br /&gt;
:: A – Ground Floor: Not purchased&lt;br /&gt;
:: B – 2nd Floor: costs 4 [Money] / 4 [Info]&lt;br /&gt;
:: C – 3rd Floor: costs 6 [Money] / 6 [Info]&lt;br /&gt;
:: D – 4th Floor: costs 8 [Money] / 8 [Info]&lt;br /&gt;
:: E – 5th Floor: costs 10 [Money] / 10 [Info]&lt;br /&gt;
:: F – 6th Floor: costs 12 [Money] / 12 [Info]&lt;br /&gt;
:: G – Specialty tile: Not purchased&lt;br /&gt;
&lt;br /&gt;
== Ground Floor Rooms ==&lt;br /&gt;
&lt;br /&gt;
Each player can use these six rooms on their Player boards. During the game, each Player can remodel any of their rooms to get access to upgraded benefits.&lt;br /&gt;
&lt;br /&gt;
When one or more Time Markers are required, all required Time markers must be placed at once. Once the Time marker requirement has been met, all Ground Floor Rooms provide their respective benefit immediately. These rooms have unlimited use.&lt;br /&gt;
&lt;br /&gt;
Each remodeled Ground Floor Room is worth 2 [PP] at the end of the game.&lt;br /&gt;
&lt;br /&gt;
=== Advertising ===&lt;br /&gt;
&lt;br /&gt;
; STANDARD : Place 1 [Time] on Advertising to place 1 [Time] from the General Stock into the Networking box at the Advertising Agency.&lt;br /&gt;
; REMODELED : Place 1 [Time] on Advertising to place 1 [Time] from the General Stock into the Networking box at the Advertising Agency OR place 2 [Time] on Advertising to place 1 [Time] from the General Stock into the Social Media box at the Advertising Agency.&lt;br /&gt;
&lt;br /&gt;
=== Assembly ===&lt;br /&gt;
&lt;br /&gt;
; STANDARD : Place 3 [Time] on Assembly to acquire 1 [Supply]. A newly acquired [Supply] must have a place in the Storage Closet to be stored or it is discarded.&lt;br /&gt;
; REMODELED : Place 2 [Time] on Assembly to acquire 1 [Supply]. A newly acquired [Supply] must have a place in the Storage Closet to be stored or it is discarded.&lt;br /&gt;
&lt;br /&gt;
=== Meeting Room ===&lt;br /&gt;
&lt;br /&gt;
; STANDARD : Place 1 [Time] on the Meeting Room to gain 1 [Info].&lt;br /&gt;
; REMODELED : Place 1 [Time] on the Meeting Room to gain 1 [Info], or place 2 [Time] on the Meeting Room to gain 3 [Info].&lt;br /&gt;
&lt;br /&gt;
=== Research &amp;amp; Testing ===&lt;br /&gt;
&lt;br /&gt;
; STANDARD : Place 1 [Time] on Research &amp;amp; Testing and spend 1 [Supply] from your Storage Closet to gain 3 [Info].&lt;br /&gt;
; REMODELED : Place 1 [Time] on Research &amp;amp; Testing and spend 1 [Supply] from your Storage Closet to either gain 4 [Info] or gain 2 [Money] / 2 [Info].&lt;br /&gt;
&lt;br /&gt;
=== Storage Closet ===&lt;br /&gt;
&lt;br /&gt;
; STANDARD : Store 1 [Supply] indefinitely with no time cost.&lt;br /&gt;
; REMODELED : Store up to 2 [Supply] indefinitely with no time cost. When remodeling the Storage Closet, the remodeled Storage Closet comes into play with 1 new [Supply] on it.&lt;br /&gt;
&lt;br /&gt;
=== Training ===&lt;br /&gt;
&lt;br /&gt;
; STANDARD : Place 2 [Time] on Training to remove 1 [Untrained] token from your Employee track. The Time markers for this trained employee are available for use at the start of the next round.&lt;br /&gt;
; REMODELED : Place 1 [Time] on Training to remove 1 [Untrained] token from your Employee track. The Time markers for this trained employee are available for use at the start of the next round.&lt;br /&gt;
&lt;br /&gt;
== Tenant Improvements ==&lt;br /&gt;
&lt;br /&gt;
There are two of each regular Tenant Improvement tile, and only one Tenant Improvement Achievement tile.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT NOTE:&#039;&#039;&#039; In a 2 or 3 player game, only one copy of each Tenant Improvement tile is available for purchase.&lt;br /&gt;
&lt;br /&gt;
When players expand their business with a new Tenant Improvement, they can either place it on an &amp;quot;Empty Floor&amp;quot; Improvement space or on top of another room. This other room (either a previous Tenant Improvement or a Ground Floor room) becomes inaccessible to the Player; its ability cannot be used nor can it be remodeled. However, its Prestige Points will still count at the end of the game.&lt;br /&gt;
&lt;br /&gt;
Each regular Tenant Improvement tile is worth 3 [PP] at the end of the game. Respectively, the Tenant Improvement Achievement tile is worth 1 [PP], but grants additional bonus Prestige Points.&lt;br /&gt;
&lt;br /&gt;
=== Stage 1 – Tenant Improvements [Stage 1] ===&lt;br /&gt;
&lt;br /&gt;
; Human Resources : During the Hire Employees phase of each round, Human Resources allows the owner to hire at a discount of 3 [Money] / 3 [Info], to a minimum cost of 1 [Money] / 1 [Info]. &#039;&#039;EXAMPLE: Marion already owns the Human Resources office, when she hires her third employee. Instead of paying the actual costs for hiring of 5 [Money] / 5 [Info], she only needs to pay 2 [Money] / 2 [Info].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
; Internship Program : During the Receive Income phase of each round, the owner of Internship Program receives 1 additional [Time]. This 1 [Time] does not count as an employee and therefore does not affect the Employee Track or the player&#039;s Money income. This 1 [Time] functions exactly the same as any other [Time] in the game.&lt;br /&gt;
&lt;br /&gt;
; Network Admin : During the Receive Income phase of each round, the owner of Network Admin receives an additional 2 [Info].&lt;br /&gt;
&lt;br /&gt;
=== Stage 2 – Tenant Improvements [Stage 2] ===&lt;br /&gt;
&lt;br /&gt;
; Niche Market : During the Conduct Business phase of each round, the owner of Niche Market is not required to drop the price of any of their products that do not sell at the Retail Outlets. This ability is optional and may be applied to one or more of the owner&#039;s products.&lt;br /&gt;
&lt;br /&gt;
; Premium Product : The owner of Premium Product receives an additional 2 [Money] for each product sold at the Retail Outlets. This includes any Liquidated products.&lt;br /&gt;
&lt;br /&gt;
; Public Relations : During the Reorganize phase at the end of each round, the owner of Public Relations does not move their Player marker down on the Popularity track.&lt;br /&gt;
&lt;br /&gt;
=== Stage 3 – Tenant Improvements [Stage 3] ===&lt;br /&gt;
&lt;br /&gt;
; Tenant Improvement Achievement : At the end of the game, the owner of Tenant Improvement Achievement scores an additional 1 [PP] for each Tenant Improvement they have purchased, including Tenant Improvement Achievement.&lt;br /&gt;
&lt;br /&gt;
== Floor Improvements ==&lt;br /&gt;
&lt;br /&gt;
There are two of each regular Floor Improvement tile, only one of each Achievement Floor tile.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT NOTE:&#039;&#039;&#039; In a 2 or 3 player game, only one copy of each Floor Improvement tile is available for purchase.&lt;br /&gt;
&lt;br /&gt;
When players expand their business with a new Floor, they place it above their Ground Floor, below their Specialty Tile. Each subsequent Floor will be placed above the last one etc.&lt;br /&gt;
&lt;br /&gt;
Each Floor Improvement tile is worth between 2 [PP] and 8 [PP] at the end of the game, as written on the different tiles. Most Achievement Floor tiles also grant additional bonus Prestige Points.&lt;br /&gt;
&lt;br /&gt;
In the first stage of the game, only Stage 1 [Stage 1] Improvements are available. Beginning in the third round, the Stage 2 [Stage 2] Improvements become available, and beginning with the sixth round, the Stage 3 [Stage 3] Improvements become available as well.&lt;br /&gt;
&lt;br /&gt;
Players may purchase one Improvement per Time marker in the Construction Company, and may never build an Improvement already on their Player board. If a player cannot afford to or chooses not to buy an Improvement, they simply move their Time marker to the General Stock.&lt;br /&gt;
&lt;br /&gt;
=== Stage 1 – Floor Improvements [Stage 1] ===&lt;br /&gt;
&lt;br /&gt;
; Empty Floor : The Empty Floor comes with one &#039;&#039;free&#039;&#039; Tenant Improvement of the owner&#039;s choice. The Tenant Improvement must be from the Stages currently available for purchase next to the Construction Company area of the game board. The Tenant Improvement is placed on one of the two spaces on the Empty Floor tile. The second space may be filled with another Tenant Improvement purchased at a later time.&lt;br /&gt;
&lt;br /&gt;
=== Stage 2 – Floor Improvements [Stage 2] ===&lt;br /&gt;
&lt;br /&gt;
; Assembly Line : Place 1 [Time] on Assembly Line to acquire 1 [Supply]. A newly acquired [Supply] must have a place to be stored in the Storage Closet or it is discarded. Assembly Line may be used a maximum of two times each round.&lt;br /&gt;
&lt;br /&gt;
; Conference Room : Place 2 [Time] on Conference Room to gain 3 [Info]. Conference Room may be used a maximum of two times each round.&lt;br /&gt;
&lt;br /&gt;
; Construction Admin : Place 3 [Time] on Construction Admin to place 1 [Time] from the General Stock in the next available space at the Construction Company. Construction Admin may be used a maximum of three times each round.&lt;br /&gt;
&lt;br /&gt;
; In-House Factory : Place 2 [Time] on In-House Factory and spend 1 [Supply] from your Storage Closet to place 1 [Time] from the General Stock in the next available space at the Factory. In-House Factory may be used a maximum of two times each round.&lt;br /&gt;
&lt;br /&gt;
; Investor : During the Receive Income phase of each round, the owner of Investor receives an additional 3 [Money].&lt;br /&gt;
&lt;br /&gt;
; I.T. Department : During the Receive Income phase of each round, the owner of I.T. Department receives an additional 4 [Info].&lt;br /&gt;
&lt;br /&gt;
; Marketing Department : Place 2 [Time] on Marketing Department to place 1 [Time] from the General Stock into the Broadcast box at the Advertising Agency. Marketing Department may be used a maximum of three times each round.&lt;br /&gt;
&lt;br /&gt;
; Online Store : Place 3 [Time] on Online Store and spend 1 [Supply] from your Storage Closet to gain 6 [Money]. Online Store may be used a maximum of two times each round.&lt;br /&gt;
&lt;br /&gt;
; Research Lab : Place 1 [Time] on Research Lab and spend 1 [Supply] from your Storage Closet to gain 3 [Money] / 3 [Info]. Research Lab may be used a maximum of three times each round.&lt;br /&gt;
&lt;br /&gt;
; Telecommunications : Place 1 [Time] on Telecommunications to gain 1 [Info]. Telecommunications may be used a maximum of three times each round.&lt;br /&gt;
&lt;br /&gt;
=== Stage 3 – Floor Improvements [Stage 3] ===&lt;br /&gt;
&lt;br /&gt;
; Corner Office Achievement : Corner Office Achievement is worth 8 [PP].&lt;br /&gt;
&lt;br /&gt;
; Corporate Merger Achievement : Corporate Merger Achievement is worth 8 [PP].&lt;br /&gt;
&lt;br /&gt;
; Executive Achievement : At the end of the game, the owner of Executive Achievement scores additional 2 [PP] for each &amp;quot;Achievement&amp;quot; Floor Improvement they have purchased, including Executive Achievement.&lt;br /&gt;
&lt;br /&gt;
; Improvement Achievement : At the end of the game, the owner of Improvement Achievement scores additional 1 [PP] for each Remodeled Room on their Ground Floor. Tenant Improvements do not count toward this bonus.&lt;br /&gt;
&lt;br /&gt;
; Marketing Achievement : At the end of the game, the owner of Marketing Achievement scores additional 2 [PP] for each Popularity level they have attained. The Popularity track has three levels, divided by vertical black lines.&lt;br /&gt;
&lt;br /&gt;
; Office Renovation : Place 2 [Time] on Office Renovation to remodel 1 Ground Floor room. Place the Remodeled Room tile over the Ground Floor room on the Player board. Office Renovation may be used a maximum of 3 times each round.&lt;br /&gt;
&lt;br /&gt;
; Production Achievement : At the end of the game, the owner of Production Achievement scores additional 3 [PP] for each Supply in their Storage Closet.&lt;br /&gt;
&lt;br /&gt;
; Retention Achievement : At the end of the game, the owner of Retention Achievement scores additional 1 [PP] for each employee in their staff, according to the CEO marker on the Employee track. It does not matter if the employees have been trained.&lt;br /&gt;
&lt;br /&gt;
; Skyline Achievement : At the end of the game, the owner of Skyline Achievement scores additional 1 [PP] for each Floor Improvement they have purchased, including Skyline Achievement.&lt;br /&gt;
&lt;br /&gt;
== Specialty Tiles ==&lt;br /&gt;
&lt;br /&gt;
The players start the game with one of these Specialty tiles, giving them different advantages.&lt;br /&gt;
&lt;br /&gt;
The Specialty tiles always are on top of the players&#039; buildings, representing the type of company controlled by the players. These Specialties are not considered to be floors and do &#039;&#039;not&#039;&#039; affect the costs for new Floor Improvements.&lt;br /&gt;
&lt;br /&gt;
; E-Commerce : The owner of this specialty starts each round with 1 additional [Time]. However, this player does not start the game with any Ground Floor rooms remodeled.&lt;br /&gt;
&lt;br /&gt;
; Emerging Technology (Research &amp;amp; Testing Room Speciality) : The owner of this specialty starts the game with the remodeled Research &amp;amp; Testing Room tile and places that tile on their Player board.&lt;br /&gt;
&lt;br /&gt;
; Industrial (Assembly Room Speciality) : The owner of this specialty starts the game with the remodeled Assembly Room tile and places that tile on their Player board.&lt;br /&gt;
&lt;br /&gt;
; Inheritance : The owner of this specialty starts the game with an additional 3 [Money] / 1 [Info], for a total of 3 [Money] / 8 [Info]. However, this player does not start the game with any Ground Floor rooms remodeled.&lt;br /&gt;
&lt;br /&gt;
; Non-Profit (Training Room Speciality) : The owner of this specialty starts the game with the remodeled Training Room tile and places that tile on their Player board.&lt;br /&gt;
&lt;br /&gt;
; Publishing (Advertising Room Speciality) : The owner of this specialty starts the game with the remodeled Advertising Room tile and places that tile on their Player board.&lt;br /&gt;
&lt;br /&gt;
; Retail (Storage Closet Speciality) : The owner of this specialty starts the game with the remodeled Storage Closet Room tile and places that tile on their Player board. Remember: A remodeled Storage Closet comes with a free [Supply], which means this player starts the game with 2 [Supply].&lt;br /&gt;
&lt;br /&gt;
; Web Based (Meeting Room Speciality) : The owner of this specialty starts the game with the remodeled Meeting Room tile and places that tile on their Player board.&lt;br /&gt;
&lt;br /&gt;
== Automa Rules ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ground Floor&#039;&#039;&#039; may also be played by 1 to 3 players by adding 1 or 2 Automas, competitive Entrepreneurs who are played by the game itself.&lt;br /&gt;
&lt;br /&gt;
All of the base game set up and game rules apply, with the following modifications.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: In the BGA adaptation, Automata may only be played in solo games, and at least 1 Automata &#039;&#039;must&#039;&#039; be selected in every solo game.&lt;br /&gt;
&lt;br /&gt;
=== Automa Set Up ===&lt;br /&gt;
&lt;br /&gt;
# Set up the game for the number of players playing, including any Automas. For example, if there is 1 human and 1 Automa, then set the game up for 2 players.&lt;br /&gt;
# Choose an Entrepreneur to represent each Automa. These Automas have different difficulty levels: &#039;&#039;Pei&#039;&#039; is easy, &#039;&#039;Gropius&#039;&#039; medium, and &#039;&#039;Hadid&#039;&#039; is hard to beat. By default, each Automa places its CEO on the first space on the Employee track and places four Time markers next to that CEO. &#039;&#039;Hadid&#039;&#039; also gets one of the Internship Program Tenant Improvements. When playing with 2 or 3 players, use the extra copy in the box, so the other Internship Program is available in the General Stock. This means that Hadid&#039;s CEO plays with 5 Time markers for the entire game.&lt;br /&gt;
# The players create each default Automa deck as follows: 1× Consulting Firm, 1× Advertising Agency, 1× Warehouse, 1× Factory, 1× Stock Exchange, 1× Construction Company. &#039;&#039;Hadid&#039;&#039; starts with an extra Factory in her deck. &#039;&#039;Pei&#039;&#039; starts with one Automa Office card in his deck. &#039;&#039;Gropius&#039;&#039; does not start with any additional cards in his deck. Place the remaining cards sorted by type into the General Stock.&lt;br /&gt;
# An Automa receives the &#039;&#039;E-Commerce&#039;&#039; Specialty, other Automas receive Specialty randomly.&lt;br /&gt;
# An Automa always starts as the first player. Randomize the player order for remaining humans and other Automas.&lt;br /&gt;
&lt;br /&gt;
=== Automa Conventions ===&lt;br /&gt;
&lt;br /&gt;
An Automa always follows the base game rules, with the following modifications.&lt;br /&gt;
&lt;br /&gt;
==== During the Whole Game ====&lt;br /&gt;
&lt;br /&gt;
* An Automa never keeps or gains any [Money], or [Info], or [Supply]. It has an unlimited pool of each of those.&lt;br /&gt;
* An Automa starts each round with a thoroughly shuffled deck.&lt;br /&gt;
* An Automa never activates any abilities of its floors or Tenant Improvements during the game.&lt;br /&gt;
* At the start of Stage 3 [Stage 3], add an extra Construction Company card into each Automa deck.&lt;br /&gt;
* When an Automa remodels or gains a Tenant Improvement, it does not matter where it goes, because Automas do not activate abilities anyway.&lt;br /&gt;
* If an Automa deck is ever exhausted during a turn, reshuffle its cards and continue the round.&lt;br /&gt;
&lt;br /&gt;
==== I) Receive Income ====&lt;br /&gt;
&lt;br /&gt;
* An Automa never receives income.&lt;br /&gt;
&lt;br /&gt;
==== II) Hire Employees ====&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Pei&#039;&#039; never hires employees.&lt;br /&gt;
* &#039;&#039;Hadid&#039;&#039; never hires employees.&lt;br /&gt;
* &#039;&#039;Gropius&#039;&#039; hires if the Job Market is at 7 [Money] / 7 [Info]. If Gropius hires, shuffle an extra Factory card into his Automa deck. Afterwards, Gropius never hires again.&lt;br /&gt;
&lt;br /&gt;
==== III) Schedule Business ====&lt;br /&gt;
&lt;br /&gt;
* When an Automa takes its turn, turn over the topmost card of its deck and by default place 1 [Time] on the best available space of the building specified on the revealed Automa card.&lt;br /&gt;
* &#039;&#039;&#039;F)&#039;&#039;&#039; When placing at the Stock Exchange, an Automa places 1 [Time] on a space in this priority: 1 [Money], then 1 [Money] / 1 [Info], then 1 [Info] / 2 [Money] and finally 1 [Info].&lt;br /&gt;
* When an Automa&#039;s turn is over, discard all revealed Automa cards into a discard pile. Note, each Automa will have their own individual deck and discard pile.&lt;br /&gt;
&lt;br /&gt;
==== IV) Conduct Business ====&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;B)&#039;&#039;&#039; When resolving the Advertising Agency, turn over the next Automa card and reference the bottom left corner to see what type of marketing is done.&lt;br /&gt;
* &#039;&#039;&#039;C)&#039;&#039;&#039; If a Marketing Bonus is awarded, an Automa takes bonuses in this priority: Remodel, Temp, Supply, Money, Info.&lt;br /&gt;
* &#039;&#039;&#039;E)&#039;&#039;&#039; When resolving the Factory, if all products are guaranteed to sell, then the Automa will place its 1 [Time] on the Retail Outlet at the highest price available. Otherwise, for each Automa Time marker turn over the next Automa card and reference the bottom right corner to see what type to place in.&lt;br /&gt;
* &#039;&#039;&#039;F)&#039;&#039;&#039; When resolving the Stock Exchange, an Automa only sells during Boom, Stable, or at a Buy Out. It stays in otherwise.&lt;br /&gt;
* &#039;&#039;&#039;I)&#039;&#039;&#039; When resolving the Construction Company, an Automa always buys a random Floor from the current stage during Boom and Stable. Otherwise it will buy a random Tenant Improvement from the current stage in all other economies. If an Automa goes to the Construction Company more than once in the same round, then in all subsequent visits it will buy a random Tenant Improvement from the current stage.&lt;br /&gt;
* &#039;&#039;&#039;I)&#039;&#039;&#039; When resolving the Construction Company during Stage 3, an Automa will always buy a random Achievement Floor from Stage 3 with each and every Time marker.&lt;br /&gt;
* Each time an Automa buys a Floor or Tenant Improvement, shuffle an extra Automa Office card into its deck.&lt;br /&gt;
* If an Automa reveals an Automa Office card on its turn, simply put 1 [Time] anywhere on its player board. It does not matter where it goes, because Automas do not activate abilities anyway.&lt;br /&gt;
&lt;br /&gt;
==== End of the Game ====&lt;br /&gt;
&lt;br /&gt;
* An Automa scores Prestige Points like any other player. When scoring their Achievement Floors, score them as if they are maxed out.&lt;br /&gt;
&lt;br /&gt;
== Bonus: Era Cards ==&lt;br /&gt;
&lt;br /&gt;
Before the game begins, the players shuffle the Era cards and choose one at random. The chosen Era will direct the construction of the Economic Forecast deck for the game.&lt;br /&gt;
&lt;br /&gt;
== Bonus: New Economic Forecast Cards ==&lt;br /&gt;
&lt;br /&gt;
The players may add these cards as desired. Check chapter [[#Set Up|Set Up]], bullet point 6 for details.&lt;br /&gt;
&lt;br /&gt;
=== Great Depression ===&lt;br /&gt;
&lt;br /&gt;
During the construction of the Economic Forecast deck, before shuffling each type of card, replace one Depression card with Great Depression. &#039;&#039;This means Great Depression might not be in the final deck.&#039;&#039; During a Great Depression there will be no customers, therefore no products will sell at the Retail Outlets. In addition, unemployment is at its highest, so during Reorganize the Status marker at the Job Market is moved all the way to the left (to the 7 [Money] / 7 [Info] space).&lt;br /&gt;
&lt;br /&gt;
=== Windfall ===&lt;br /&gt;
&lt;br /&gt;
During the construction of the Economic Forecast deck, before shuffling each type of card, replace one Boom card with Windfall. &#039;&#039;This means Windfall might not be in the final deck.&#039;&#039; During a Windfall, customers will be plentiful, therefore all products will sell at the Retail Outlets. In addition, unemployment is at its lowest, so during Reorganize the Status marker at the Job Market is moved all the way to the right (to the 7 [Money] / 7 [Info] space).&lt;br /&gt;
&lt;br /&gt;
== Bonus: Events ==&lt;br /&gt;
&lt;br /&gt;
Each Event card alters the rules for one of the Game board areas.&lt;br /&gt;
&lt;br /&gt;
Before the game begins, the players shuffle the Event deck and choose one Event card at random. The chosen Event will indicate which board area is affected for the game. Place the card on the board above the affected area as a reminder and reference.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Author:&#039;&#039;&#039; David Short&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1st edition Development:&#039;&#039;&#039; Seth Jaffee&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd edition Development:&#039;&#039;&#039; Henning Kröpke, Uli Blennemann&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Graphics:&#039;&#039;&#039; Harald Lieske&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Layout:&#039;&#039;&#039; Filip Stransky&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notable Playtesters:&#039;&#039;&#039; Nathan Emmerich, Chris Hall, Matt Manis, Josh Martin, Jon Peoble, Eileen Short, Mike Tunison&lt;br /&gt;
&lt;br /&gt;
Copyright 2018 Spielworxx, Nielande 12, D-48727 Billerbeck — www.spielworxx.de&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=30248</id>
		<title>Gamehelpbunnykingdomtown</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=30248"/>
		<updated>2026-06-13T03:58:24Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview and Aim of the Game ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Bunny Kingdom: Town&#039;&#039; is a tile-drafting and placement game played over 4 rounds.&lt;br /&gt;
&lt;br /&gt;
During each round, you&#039;ll be &#039;&#039;&#039;planning&#039;&#039;&#039; and &#039;&#039;&#039;constructing&#039;&#039;&#039; new Buildings to develop the Neighborhoods under your control.&lt;br /&gt;
&lt;br /&gt;
Choose your construction plans carefully to boost your strategy, but watch out: those you overlook could be just what your opponent needs!&lt;br /&gt;
&lt;br /&gt;
Each new Building you construct will bring you resources or increase your influence. Don&#039;t forget to satisfy the &#039;&#039;&#039;requests&#039;&#039;&#039; of your new townsfolk, which will remain secret until the end of the game and could completely change the outcome.&lt;br /&gt;
&lt;br /&gt;
During final scoring, the player with the most &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039; is the winner!&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
&lt;br /&gt;
At the start of the game, Upgrade Tiles are randomly drawn until the total cost totals 8 or more.&lt;br /&gt;
&lt;br /&gt;
Each player starts the game with 2 Coins.&lt;br /&gt;
&lt;br /&gt;
The initial bridges and plot cards are set up based on the game&#039;s chosen Setup Card.&lt;br /&gt;
&lt;br /&gt;
=== Setup Cards ===&lt;br /&gt;
&lt;br /&gt;
When setting up a game, you can choose a Setup Card (or select a random one). These determine which plots are initially available (the spaces where you can build your building) and where the game&#039;s bridges will be placed.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Card&lt;br /&gt;
!Choose For&lt;br /&gt;
!Plots and Bridges&lt;br /&gt;
|-&lt;br /&gt;
|1: A Golden Opportunity&lt;br /&gt;
|First game&lt;br /&gt;
|[[File:SetupCard01.jpg|thumb|Starting Plots and Bridges]]&lt;br /&gt;
|-&lt;br /&gt;
|2: New arrivals&lt;br /&gt;
|A game with spread-out plots&lt;br /&gt;
|[[File:SetupCard02.jpg|thumb|Starting Plots and Bridges]]&lt;br /&gt;
|-&lt;br /&gt;
|3: At the forest&#039;s edge&lt;br /&gt;
|A high-wood game&lt;br /&gt;
|[[File:SetupCard03.jpg|thumb|Starting Plots and Bridges]]&lt;br /&gt;
|-&lt;br /&gt;
|4: By the water&lt;br /&gt;
|Initial plots along the river&lt;br /&gt;
|[[File:SetupCard04.jpg|thumb|Starting Plots and Bridges]]&lt;br /&gt;
|-&lt;br /&gt;
|5: On the other side of the river&lt;br /&gt;
|A game with no bridges&lt;br /&gt;
|[[File:SetupCard05.jpg|thumb|Starting Plots (no Bridges)]]&lt;br /&gt;
|-&lt;br /&gt;
|6: Beyond the horizon&lt;br /&gt;
|A random setup&lt;br /&gt;
|[[File:SetupCard06.jpg|thumb|Starting Plots are randomly drawn. Players place 1 Bridge each.]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== The round ==&lt;br /&gt;
&lt;br /&gt;
A game of &#039;&#039;Bunny Kingdom: Town&#039;&#039; is played over &#039;&#039;&#039;4 rounds&#039;&#039;&#039;, with each player taking turns being the first player.&lt;br /&gt;
&lt;br /&gt;
Each round consists of a series of player &#039;&#039;&#039;turns&#039;&#039;&#039;, continuing until all available Building tiles have been taken.&lt;br /&gt;
&lt;br /&gt;
=== Preparing a new round ===&lt;br /&gt;
&lt;br /&gt;
At the start of each new round, complete the following steps.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Each player receives 2 Coins&#039;&#039;&#039; from the reserve. &#039;&#039;(You received 3 during setup, so you&#039;ll start the first round with 5.)&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Reveal the first 5 tiles from the Building pile&#039;&#039;&#039; and place them on the designated spaces on the board. &#039;&#039;These are the Buildings you can construct during this round.&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Each player draws 2 Request cards&#039;&#039;&#039; and chooses 1 which they place face down in front of them. Place the unchosen cards into the discard pile face-up.&lt;br /&gt;
&lt;br /&gt;
You can now begin the round.&lt;br /&gt;
&lt;br /&gt;
=== The turn ===&lt;br /&gt;
&lt;br /&gt;
Each player will now play their turn, starting with the first player. On your turn, &#039;&#039;&#039;you must perform the Plan action&#039;&#039;&#039;. You may then, if you wish, &#039;&#039;&#039;Construct one or more Buildings&#039;&#039;&#039;. Before or after either of these two actions, you may also &#039;&#039;&#039;Create one or more Upgrades&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Plan (mandatory) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This action allows you to obtain new Building tiles&#039;&#039;. On your turn, &#039;&#039;&#039;you must&#039;&#039;&#039; perform the Plan action. To do so, choose an available Building tile from the track and place it into your reserve. &#039;&#039;&#039;Do not reveal a new Building tile to replace the one you took!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Construct (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This action lets you construct Buildings from your reserve to develop the town and your Neighborhoods.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===== Placing a Building =====&lt;br /&gt;
&lt;br /&gt;
Once you have completed your Plan action, you may, if you wish, construct one or more Buildings. To construct a Building, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# Choose a Building tile from your reserve.&lt;br /&gt;
# Choose an available Plot card and immediately pay its cost in Coins as shown on the board, depending on its position on the track. Then add it to your reserve.&lt;br /&gt;
# Place your Building tile onto the space shown on the Plot card (as indicated by the presence of an Architect token). Place the Architect token above the Plot card’s track space. Place a Bunny from your reserve onto the Building you constructed. If the space contains a wood token, add it to your reserve.&lt;br /&gt;
&lt;br /&gt;
The first card on the track is free — you can take that Plot without paying any Coins.&lt;br /&gt;
&lt;br /&gt;
Some Buildings &#039;&#039;&#039;must&#039;&#039;&#039; be placed onto waterfront spaces (as shown by the waterfront icon). If there are no available waterfront Plots (or if they&#039;re too expensive), you cannot construct those Buildings. &#039;&#039;&#039;All other Buildings have no placement restrictions&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you cannot or do not wish to construct a Building, skip this step and keep the Buildings in your reserve for a future turn.&lt;br /&gt;
&lt;br /&gt;
If you constructed a Building, move on to &#039;&#039;&#039;Activating a Neighborhood&#039;&#039;&#039;. Otherwise, go straight to &#039;&#039;&#039;End of the turn&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Activating a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Activating a Neighborhood lets you collect resources and increase your influence by gainaing precious Golden Carrots&#039;&#039;. Each time you construct a Building, apply any &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effects it has, then calculate your Neighborhood&#039;s influence.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;Neighborhood&#039;&#039;&#039;&lt;br /&gt;
:A group of orthogonally adjacent Buildings under your control is called a Neighborhood. Buildings on different sides of the river are not part of the same Neighborhood, unless they are connected by a Bridge token.&lt;br /&gt;
&lt;br /&gt;
===== Building triggers =====&lt;br /&gt;
&lt;br /&gt;
Each Building has either a &#039;&#039;&#039;When Constructed&#039;&#039;&#039; or a &#039;&#039;&#039;When Activated&#039;&#039;&#039; effect which triggers at a specific moment when activating a Neighborhood.&lt;br /&gt;
&lt;br /&gt;
;When Constructed&lt;br /&gt;
:These Buildings have a one-off effect that is triggered only when they are first placed onto a Plot. They do not reactivate multiple times during the game, unless they return to your reserve and are placed again later.&lt;br /&gt;
&lt;br /&gt;
;When Activated&lt;br /&gt;
:When a Neighborhood is activated, all of its Buildings’ effects are triggered at once.&lt;br /&gt;
&lt;br /&gt;
===== Calculating the influence of a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
After constructing a Building and applying its &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effect, calculate the influence of the Neighborhood it was added to:&lt;br /&gt;
&lt;br /&gt;
Multiply the number of active &#039;&#039;&#039;stars&#039;&#039;&#039; on the Buildings in the Neighborhood by the number of &#039;&#039;&#039;different Building types&#039;&#039;&#039; (which are not Illegal ) present in that Neighborhood. The total obtained represents the number of &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039;you gain for that Neighborhood. Move your Bunny forward that number of spaces on the score track.&lt;br /&gt;
&lt;br /&gt;
;Stars&lt;br /&gt;
:Stars represent a Building&#039;s prestige and the wealth it brings to its Neighborhood. Some Stars only count towards a Neighborhood&#039;s influence if the Neighborhood contains at least one Building of the type shown. If it doesn&#039;t, then the Star isn&#039;t active (and isn&#039;t counted).&lt;br /&gt;
&lt;br /&gt;
;Building Types&lt;br /&gt;
:Buildings have different &#039;&#039;&#039;types&#039;&#039;&#039;. The more different types of Building a Neighborhood has (giving it a variety of different shops and services), the more influential it will be. There are &#039;&#039;&#039;5 different Building types&#039;&#039;&#039; that contribute to a Neighborhood&#039;s influence:&lt;br /&gt;
:* Leisure&lt;br /&gt;
:* Work&lt;br /&gt;
:* Civic&lt;br /&gt;
:* Residential&lt;br /&gt;
:* Knowledge&lt;br /&gt;
:&#039;&#039;&#039;Illegal Buildings&#039;&#039;&#039; do not contribute to influence.&lt;br /&gt;
&lt;br /&gt;
;The Park&lt;br /&gt;
:The &#039;&#039;&#039;Park&#039;&#039;&#039; is a joker tile. It can be counted as any Building type. You can choose its type each time you calculate its Neighborhood&#039;s influence. Certain Request cards may also require you to choose its type at the end of the game; in that case, you can only choose its type once.&lt;br /&gt;
&lt;br /&gt;
===== Constructing additional Buildings =====&lt;br /&gt;
&lt;br /&gt;
As long as you have Buildings in your reserve, you can keep placing them during the &#039;&#039;&#039;Construct&#039;&#039;&#039; phase. Each additional Building you place costs costs 1 extra Coin in addition to the cost of the Plot. Other than this additional cost, proceed as normal to construct it. New Plot cards will be revealed at the end of the turn only.&lt;br /&gt;
&lt;br /&gt;
Keeping Buildings in reserve for later can often be a good idea. A better location may become available, or a certain Plot may become less expensive. It’s up to you to choose the best strategy to optimize the development of your Neighborhoods!&lt;br /&gt;
&lt;br /&gt;
==== Create (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Upgrades bring you additional bonuses that make it easier to develop your Neighborhoods.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At any time during your turn&#039;&#039;&#039;, before or after your Plan or Construct actions, you can create as many Upgrades as you wish by spending Wood. All spent Wood is put back into the reserve. To create an Upgrade, complete the following steps&lt;br /&gt;
&lt;br /&gt;
# Choose 1 available Upgrade tile.&lt;br /&gt;
# Pay its cost in &#039;&#039;&#039;Wood&#039;&#039;&#039;.&lt;br /&gt;
# Place it onto one of the 3 slots on your side of the board.&lt;br /&gt;
&lt;br /&gt;
You have &#039;&#039;&#039;3 Upgrade slots&#039;&#039;&#039;. Once you have created 3, you cannot buy any more. Make sure you choose carefully, as each Upgrade can have considerable impact on your strategy. The Upgrades revealed during setup will be the only ones available for the entire game.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;When purchased&#039;&#039;&#039; Upgrades: apply the effect immediately.&lt;br /&gt;
* &#039;&#039;&#039;All the time&#039;&#039;&#039; Upgrades: apply the effect whenever it&#039;s possible.&lt;br /&gt;
&lt;br /&gt;
=== End of the turn ===&lt;br /&gt;
&lt;br /&gt;
At the end of your turn, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Slide the Plot cards along&#039;&#039;&#039;: slide all the Plot cards on the track, reducing each card&#039;s cost.&lt;br /&gt;
# &#039;&#039;&#039;Reveal new Plot cards&#039;&#039;&#039;: fill the empty spaces on the track with new cards from the pile. Use Architect tokens to indicate the new Plots available on the board.&lt;br /&gt;
&lt;br /&gt;
Check whether the &#039;&#039;&#039;End of the round&#039;&#039;&#039; has been triggered. If it hasn’t, then it’s now your opponent’s turn.&lt;br /&gt;
&lt;br /&gt;
== End of the round ==&lt;br /&gt;
&lt;br /&gt;
If you take the last available Building tile from the board, the end of the round is triggered. End your turn as normal, then check the pile of Building tiles:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles is not empty&#039;&#039;&#039;, prepare a new round.&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles pile is empty&#039;&#039;&#039;, and you have just finished the 4th round, go to &#039;&#039;&#039;End of the game&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== End of the game ==&lt;br /&gt;
&lt;br /&gt;
At the end of the game, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Reveal your Request cards&#039;&#039;&#039;: Starting with the player in the lowest position on the score track, reveal your Request cards one by one and check if your meet their scoring conditions.&lt;br /&gt;
# &#039;&#039;&#039;Determine the winner&#039;&#039;&#039;: The player with the most Golden Carrots wins and becomes the mayor of the new town! In the case of a draw, the player with the most coins wins. If the draw persists, the two players share their victory!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: apply the effects of the &#039;&#039;&#039;Community Leader&#039;&#039;&#039; and &#039;&#039;&#039;Watchmaker&#039;&#039;&#039; Request cards at end of game, &#039;&#039;&#039;not&#039;&#039;&#039; when you first obtain them.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Design&#039;&#039;&#039;: Richard Garfield&lt;br /&gt;
* &#039;&#039;&#039;Illustrations&#039;&#039;&#039;: Jiahui Eva Gao&lt;br /&gt;
* &#039;&#039;&#039;Project management&#039;&#039;&#039;: Adrien Fenouillet&lt;br /&gt;
* &#039;&#039;&#039;Graphic Design&#039;&#039;&#039;: Charlie Metz&lt;br /&gt;
* &#039;&#039;&#039;Proofreading&#039;&#039;&#039;: Xavier Taverne, Robin Leplumey&lt;br /&gt;
* &#039;&#039;&#039;Editorial assistant&#039;&#039;&#039;: Camille Cherchour&lt;br /&gt;
* &#039;&#039;&#039;3D visuals&#039;&#039;&#039;: Valentin Jacoberger&lt;br /&gt;
* &#039;&#039;&#039;Translation&#039;&#039;&#039;: Georgina Fenouillet&lt;br /&gt;
&lt;br /&gt;
Published by &#039;&#039;&#039;IELLO&#039;&#039;&#039; — 9, avenue des Érables, lot 341, 54180 Heillecourt, France &amp;amp;middot; [https://iello.fr iello.fr] &amp;amp;middot; contact@iello.fr&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=30176</id>
		<title>Gamehelpbunnykingdomtown</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=30176"/>
		<updated>2026-06-10T09:01:46Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: Added setup cards&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview and Aim of the Game ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Bunny Kingdom: Town&#039;&#039; is a tile-drafting and placement game played over 4 rounds.&lt;br /&gt;
&lt;br /&gt;
During each round, you&#039;ll be &#039;&#039;&#039;planning&#039;&#039;&#039; and &#039;&#039;&#039;constructing&#039;&#039;&#039; new Buildings to develop the Neighborhoods under your control.&lt;br /&gt;
&lt;br /&gt;
Choose your construction plans carefully to boost your strategy, but watch out: those you overlook could be just what your opponent needs!&lt;br /&gt;
&lt;br /&gt;
Each new Building you construct will bring you resources or increase your influence. Don&#039;t forget to satisfy the &#039;&#039;&#039;requests&#039;&#039;&#039; of your new townsfolk, which will remain secret until the end of the game and could completely change the outcome.&lt;br /&gt;
&lt;br /&gt;
During final scoring, the player with the most &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039; is the winner!&lt;br /&gt;
&lt;br /&gt;
== Setup Cards ==&lt;br /&gt;
&lt;br /&gt;
When setting up a game, you can choose a Setup Card (or select a random one). These determine which plots are initially available (the spaces where you can build your building) and where the game&#039;s bridges will be placed.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Card&lt;br /&gt;
!Choose For&lt;br /&gt;
!Plots and Bridges&lt;br /&gt;
|-&lt;br /&gt;
|1: A Golden Opportunity&lt;br /&gt;
|First game&lt;br /&gt;
|[[File:SetupCard01.jpg|thumb|Starting Plots and Bridges]]&lt;br /&gt;
|-&lt;br /&gt;
|2: New arrivals&lt;br /&gt;
|A game with spread-out plots&lt;br /&gt;
|[[File:SetupCard02.jpg|thumb|Starting Plots and Bridges]]&lt;br /&gt;
|-&lt;br /&gt;
|3: At the forest&#039;s edge&lt;br /&gt;
|A high-wood game&lt;br /&gt;
|[[File:SetupCard03.jpg|thumb|Starting Plots and Bridges]]&lt;br /&gt;
|-&lt;br /&gt;
|4: By the water&lt;br /&gt;
|Initial plots along the river&lt;br /&gt;
|[[File:SetupCard04.jpg|thumb|Starting Plots and Bridges]]&lt;br /&gt;
|-&lt;br /&gt;
|5: On the other side of the river&lt;br /&gt;
|A game with no bridges&lt;br /&gt;
|[[File:SetupCard05.jpg|thumb|Starting Plots (no Bridges)]]&lt;br /&gt;
|-&lt;br /&gt;
|6: Beyond the horizon&lt;br /&gt;
|A random setup&lt;br /&gt;
|[[File:SetupCard06.jpg|thumb|Starting Plots are randomly drawn. Players place 1 Bridge each.]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== The round ==&lt;br /&gt;
&lt;br /&gt;
A game of &#039;&#039;Bunny Kingdom: Town&#039;&#039; is played over &#039;&#039;&#039;4 rounds&#039;&#039;&#039;, with each player taking turns being the first player.&lt;br /&gt;
&lt;br /&gt;
Each round consists of a series of player &#039;&#039;&#039;turns&#039;&#039;&#039;, continuing until all available Building tiles have been taken.&lt;br /&gt;
&lt;br /&gt;
=== Preparing a new round ===&lt;br /&gt;
&lt;br /&gt;
At the start of each new round, complete the following steps.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Each player receives 2 Coins&#039;&#039;&#039; from the reserve. &#039;&#039;(You received 3 during setup, so you&#039;ll start the first round with 5.)&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Reveal the first 5 tiles from the Building pile&#039;&#039;&#039; and place them on the designated spaces on the board. &#039;&#039;These are the Buildings you can construct during this round.&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Each player draws 2 Request cards&#039;&#039;&#039; and chooses 1 which they place face down in front of them. Place the unchosen cards into the discard pile face-up.&lt;br /&gt;
&lt;br /&gt;
You can now begin the round.&lt;br /&gt;
&lt;br /&gt;
=== The turn ===&lt;br /&gt;
&lt;br /&gt;
Each player will now play their turn, starting with the first player. On your turn, &#039;&#039;&#039;you must perform the Plan action&#039;&#039;&#039;. You may then, if you wish, &#039;&#039;&#039;Construct one or more Buildings&#039;&#039;&#039;. Before or after either of these two actions, you may also &#039;&#039;&#039;Create one or more Upgrades&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Plan (mandatory) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This action allows you to obtain new Building tiles&#039;&#039;. On your turn, &#039;&#039;&#039;you must&#039;&#039;&#039; perform the Plan action. To do so, choose an available Building tile from the track and place it into your reserve. &#039;&#039;&#039;Do not reveal a new Building tile to replace the one you took!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Construct (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This action lets you construct Buildings from your reserve to develop the town and your Neighborhoods.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===== Placing a Building =====&lt;br /&gt;
&lt;br /&gt;
Once you have completed your Plan action, you may, if you wish, construct one or more Buildings. To construct a Building, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# Choose a Building tile from your reserve.&lt;br /&gt;
# Choose an available Plot card and immediately pay its cost in Coins as shown on the board, depending on its position on the track. Then add it to your reserve.&lt;br /&gt;
# Place your Building tile onto the space shown on the Plot card (as indicated by the presence of an Architect token). Place the Architect token above the Plot card’s track space. Place a Bunny from your reserve onto the Building you constructed. If the space contains a wood token, add it to your reserve.&lt;br /&gt;
&lt;br /&gt;
The first card on the track is free — you can take that Plot without paying any Coins.&lt;br /&gt;
&lt;br /&gt;
Some Buildings &#039;&#039;&#039;must&#039;&#039;&#039; be placed onto waterfront spaces (as shown by the waterfront icon). If there are no available waterfront Plots (or if they&#039;re too expensive), you cannot construct those Buildings. &#039;&#039;&#039;All other Buildings have no placement restrictions&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you cannot or do not wish to construct a Building, skip this step and keep the Buildings in your reserve for a future turn.&lt;br /&gt;
&lt;br /&gt;
If you constructed a Building, move on to &#039;&#039;&#039;Activating a Neighborhood&#039;&#039;&#039;. Otherwise, go straight to &#039;&#039;&#039;End of the turn&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Activating a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Activating a Neighborhood lets you collect resources and increase your influence by gainaing precious Golden Carrots&#039;&#039;. Each time you construct a Building, apply any &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effects it has, then calculate your Neighborhood&#039;s influence.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;Neighborhood&#039;&#039;&#039;&lt;br /&gt;
:A group of orthogonally adjacent Buildings under your control is called a Neighborhood. Buildings on different sides of the river are not part of the same Neighborhood, unless they are connected by a Bridge token.&lt;br /&gt;
&lt;br /&gt;
===== Building triggers =====&lt;br /&gt;
&lt;br /&gt;
Each Building has either a &#039;&#039;&#039;When Constructed&#039;&#039;&#039; or a &#039;&#039;&#039;When Activated&#039;&#039;&#039; effect which triggers at a specific moment when activating a Neighborhood.&lt;br /&gt;
&lt;br /&gt;
;When Constructed&lt;br /&gt;
:These Buildings have a one-off effect that is triggered only when they are first placed onto a Plot. They do not reactivate multiple times during the game, unless they return to your reserve and are placed again later.&lt;br /&gt;
&lt;br /&gt;
;When Activated&lt;br /&gt;
:When a Neighborhood is activated, all of its Buildings’ effects are triggered at once.&lt;br /&gt;
&lt;br /&gt;
===== Calculating the influence of a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
After constructing a Building and applying its &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effect, calculate the influence of the Neighborhood it was added to:&lt;br /&gt;
&lt;br /&gt;
Multiply the number of active &#039;&#039;&#039;stars&#039;&#039;&#039; on the Buildings in the Neighborhood by the number of &#039;&#039;&#039;different Building types&#039;&#039;&#039; (which are not Illegal ) present in that Neighborhood. The total obtained represents the number of &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039;you gain for that Neighborhood. Move your Bunny forward that number of spaces on the score track.&lt;br /&gt;
&lt;br /&gt;
;Stars&lt;br /&gt;
:Stars represent a Building&#039;s prestige and the wealth it brings to its Neighborhood. Some Stars only count towards a Neighborhood&#039;s influence if the Neighborhood contains at least one Building of the type shown. If it doesn&#039;t, then the Star isn&#039;t active (and isn&#039;t counted).&lt;br /&gt;
&lt;br /&gt;
;Building Types&lt;br /&gt;
:Buildings have different &#039;&#039;&#039;types&#039;&#039;&#039;. The more different types of Building a Neighborhood has (giving it a variety of different shops and services), the more influential it will be. There are &#039;&#039;&#039;5 different Building types&#039;&#039;&#039; that contribute to a Neighborhood&#039;s influence:&lt;br /&gt;
:* Leisure&lt;br /&gt;
:* Work&lt;br /&gt;
:* Civic&lt;br /&gt;
:* Residential&lt;br /&gt;
:* Knowledge&lt;br /&gt;
:&#039;&#039;&#039;Illegal Buildings&#039;&#039;&#039; do not contribute to influence.&lt;br /&gt;
&lt;br /&gt;
;The Park&lt;br /&gt;
:The &#039;&#039;&#039;Park&#039;&#039;&#039; is a joker tile. It can be counted as any Building type. You can choose its type each time you calculate its Neighborhood&#039;s influence. Certain Request cards may also require you to choose its type at the end of the game; in that case, you can only choose its type once.&lt;br /&gt;
&lt;br /&gt;
===== Constructing additional Buildings =====&lt;br /&gt;
&lt;br /&gt;
As long as you have Buildings in your reserve, you can keep placing them during the &#039;&#039;&#039;Construct&#039;&#039;&#039; phase. Each additional Building you place costs costs 1 extra Coin in addition to the cost of the Plot. Other than this additional cost, proceed as normal to construct it. New Plot cards will be revealed at the end of the turn only.&lt;br /&gt;
&lt;br /&gt;
Keeping Buildings in reserve for later can often be a good idea. A better location may become available, or a certain Plot may become less expensive. It’s up to you to choose the best strategy to optimize the development of your Neighborhoods!&lt;br /&gt;
&lt;br /&gt;
==== Create (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Upgrades bring you additional bonuses that make it easier to develop your Neighborhoods.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At any time during your turn&#039;&#039;&#039;, before or after your Plan or Construct actions, you can create as many Upgrades as you wish by spending Wood. All spent Wood is put back into the reserve. To create an Upgrade, complete the following steps&lt;br /&gt;
&lt;br /&gt;
# Choose 1 available Upgrade tile.&lt;br /&gt;
# Pay its cost in &#039;&#039;&#039;Wood&#039;&#039;&#039;.&lt;br /&gt;
# Place it onto one of the 3 slots on your side of the board.&lt;br /&gt;
&lt;br /&gt;
You have &#039;&#039;&#039;3 Upgrade slots&#039;&#039;&#039;. Once you have created 3, you cannot buy any more. Make sure you choose carefully, as each Upgrade can have considerable impact on your strategy. The Upgrades revealed during setup will be the only ones available for the entire game.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;When purchased&#039;&#039;&#039; Upgrades: apply the effect immediately.&lt;br /&gt;
* &#039;&#039;&#039;All the time&#039;&#039;&#039; Upgrades: apply the effect whenever it&#039;s possible.&lt;br /&gt;
&lt;br /&gt;
=== End of the turn ===&lt;br /&gt;
&lt;br /&gt;
At the end of your turn, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Slide the Plot cards along&#039;&#039;&#039;: slide all the Plot cards on the track, reducing each card&#039;s cost.&lt;br /&gt;
# &#039;&#039;&#039;Reveal new Plot cards&#039;&#039;&#039;: fill the empty spaces on the track with new cards from the pile. Use Architect tokens to indicate the new Plots available on the board.&lt;br /&gt;
&lt;br /&gt;
Check whether the &#039;&#039;&#039;End of the round&#039;&#039;&#039; has been triggered. If it hasn’t, then it’s now your opponent’s turn.&lt;br /&gt;
&lt;br /&gt;
== End of the round ==&lt;br /&gt;
&lt;br /&gt;
If you take the last available Building tile from the board, the end of the round is triggered. End your turn as normal, then check the pile of Building tiles:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles is not empty&#039;&#039;&#039;, prepare a new round.&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles pile is empty&#039;&#039;&#039;, and you have just finished the 4th round, go to &#039;&#039;&#039;End of the game&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== End of the game ==&lt;br /&gt;
&lt;br /&gt;
At the end of the game, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Reveal your Request cards&#039;&#039;&#039;: Starting with the player in the lowest position on the score track, reveal your Request cards one by one and check if your meet their scoring conditions.&lt;br /&gt;
# &#039;&#039;&#039;Determine the winner&#039;&#039;&#039;: The player with the most Golden Carrots wins and becomes the mayor of the new town! In the case of a draw, the player with the most coins wins. If the draw persists, the two players share their victory!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: apply the effects of the &#039;&#039;&#039;Community Leader&#039;&#039;&#039; and &#039;&#039;&#039;Watchmaker&#039;&#039;&#039; Request cards at end of game, &#039;&#039;&#039;not&#039;&#039;&#039; when you first obtain them.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Design&#039;&#039;&#039;: Richard Garfield&lt;br /&gt;
* &#039;&#039;&#039;Illustrations&#039;&#039;&#039;: Jiahui Eva Gao&lt;br /&gt;
* &#039;&#039;&#039;Project management&#039;&#039;&#039;: Adrien Fenouillet&lt;br /&gt;
* &#039;&#039;&#039;Graphic Design&#039;&#039;&#039;: Charlie Metz&lt;br /&gt;
* &#039;&#039;&#039;Proofreading&#039;&#039;&#039;: Xavier Taverne, Robin Leplumey&lt;br /&gt;
* &#039;&#039;&#039;Editorial assistant&#039;&#039;&#039;: Camille Cherchour&lt;br /&gt;
* &#039;&#039;&#039;3D visuals&#039;&#039;&#039;: Valentin Jacoberger&lt;br /&gt;
* &#039;&#039;&#039;Translation&#039;&#039;&#039;: Georgina Fenouillet&lt;br /&gt;
&lt;br /&gt;
Published by &#039;&#039;&#039;IELLO&#039;&#039;&#039; — 9, avenue des Érables, lot 341, 54180 Heillecourt, France &amp;amp;middot; [https://iello.fr iello.fr] &amp;amp;middot; contact@iello.fr&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=File:SetupCard06.jpg&amp;diff=30175</id>
		<title>File:SetupCard06.jpg</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=File:SetupCard06.jpg&amp;diff=30175"/>
		<updated>2026-06-10T08:59:59Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bunny Kingdown Town Setup Card 6&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=File:SetupCard05.jpg&amp;diff=30174</id>
		<title>File:SetupCard05.jpg</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=File:SetupCard05.jpg&amp;diff=30174"/>
		<updated>2026-06-10T08:59:09Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bunny Kingdown Town Setup Card 5&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=File:SetupCard04.jpg&amp;diff=30173</id>
		<title>File:SetupCard04.jpg</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=File:SetupCard04.jpg&amp;diff=30173"/>
		<updated>2026-06-10T08:58:38Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bunny Kingdown Town Setup Card 4&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=File:SetupCard03.jpg&amp;diff=30172</id>
		<title>File:SetupCard03.jpg</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=File:SetupCard03.jpg&amp;diff=30172"/>
		<updated>2026-06-10T08:57:57Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bunny Kingdown Town Setup Card 3&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=File:SetupCard02.jpg&amp;diff=30171</id>
		<title>File:SetupCard02.jpg</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=File:SetupCard02.jpg&amp;diff=30171"/>
		<updated>2026-06-10T08:56:46Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bunny Kingdown Town Setup Card 2&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=File:SetupCard01.jpg&amp;diff=30170</id>
		<title>File:SetupCard01.jpg</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=File:SetupCard01.jpg&amp;diff=30170"/>
		<updated>2026-06-10T08:55:42Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bunny Kingdown Town Setup Card 1&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=29784</id>
		<title>Gamehelpbunnykingdomtown</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=29784"/>
		<updated>2026-05-08T23:21:45Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* B. Activating a Neighborhood */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview and Aim of the Game ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Bunny Kingdom: Town&#039;&#039; is a tile-drafting and placement game played over 4 rounds.&lt;br /&gt;
&lt;br /&gt;
During each round, you&#039;ll be &#039;&#039;&#039;planning&#039;&#039;&#039; and &#039;&#039;&#039;constructing&#039;&#039;&#039; new Buildings to develop the Neighborhoods under your control.&lt;br /&gt;
&lt;br /&gt;
Choose your construction plans carefully to boost your strategy, but watch out: those you overlook could be just what your opponent needs!&lt;br /&gt;
&lt;br /&gt;
Each new Building you construct will bring you resources or increase your influence. Don&#039;t forget to satisfy the &#039;&#039;&#039;requests&#039;&#039;&#039; of your new townsfolk, which will remain secret until the end of the game and could completely change the outcome.&lt;br /&gt;
&lt;br /&gt;
During final scoring, the player with the most &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039; is the winner!&lt;br /&gt;
&lt;br /&gt;
== The round ==&lt;br /&gt;
&lt;br /&gt;
A game of &#039;&#039;Bunny Kingdom: Town&#039;&#039; is played over &#039;&#039;&#039;4 rounds&#039;&#039;&#039;, with each player taking turns being the first player.&lt;br /&gt;
&lt;br /&gt;
Each round consists of a series of player &#039;&#039;&#039;turns&#039;&#039;&#039;, continuing until all available Building tiles have been taken.&lt;br /&gt;
&lt;br /&gt;
=== Preparing a new round ===&lt;br /&gt;
&lt;br /&gt;
At the start of each new round, complete the following steps.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Each player receives 2 Coins&#039;&#039;&#039; from the reserve. &#039;&#039;(You received 3 during setup, so you&#039;ll start the first round with 5.)&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Reveal the first 5 tiles from the Building pile&#039;&#039;&#039; and place them on the designated spaces on the board. &#039;&#039;These are the Buildings you can construct during this round.&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Each player draws 2 Request cards&#039;&#039;&#039; and chooses 1 which they place face down in front of them. Place the unchosen cards into the discard pile face-up.&lt;br /&gt;
&lt;br /&gt;
You can now begin the round.&lt;br /&gt;
&lt;br /&gt;
=== The turn ===&lt;br /&gt;
&lt;br /&gt;
Each player will now play their turn, starting with the first player. On your turn, &#039;&#039;&#039;you must perform the Plan action&#039;&#039;&#039;. You may then, if you wish, &#039;&#039;&#039;Construct one or more Buildings&#039;&#039;&#039;. Before or after either of these two actions, you may also &#039;&#039;&#039;Create one or more Upgrades&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Plan (mandatory) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This action allows you to obtain new Building tiles&#039;&#039;. On your turn, &#039;&#039;&#039;you must&#039;&#039;&#039; perform the Plan action. To do so, choose an available Building tile from the track and place it into your reserve. &#039;&#039;&#039;Do not reveal a new Building tile to replace the one you took!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Construct (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This action lets you construct Buildings from your reserve to develop the town and your Neighborhoods.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===== Placing a Building =====&lt;br /&gt;
&lt;br /&gt;
Once you have completed your Plan action, you may, if you wish, construct one or more Buildings. To construct a Building, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# Choose a Building tile from your reserve.&lt;br /&gt;
# Choose an available Plot card and immediately pay its cost in Coins as shown on the board, depending on its position on the track. Then add it to your reserve.&lt;br /&gt;
# Place your Building tile onto the space shown on the Plot card (as indicated by the presence of an Architect token). Place the Architect token above the Plot card’s track space. Place a Bunny from your reserve onto the Building you constructed. If the space contains a wood token, add it to your reserve.&lt;br /&gt;
&lt;br /&gt;
The first card on the track is free — you can take that Plot without paying any Coins.&lt;br /&gt;
&lt;br /&gt;
Some Buildings &#039;&#039;&#039;must&#039;&#039;&#039; be placed onto waterfront spaces (as shown by the waterfront icon). If there are no available waterfront Plots (or if they&#039;re too expensive), you cannot construct those Buildings. &#039;&#039;&#039;All other Buildings have no placement restrictions&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you cannot or do not wish to construct a Building, skip this step and keep the Buildings in your reserve for a future turn.&lt;br /&gt;
&lt;br /&gt;
If you constructed a Building, move on to &#039;&#039;&#039;Activating a Neighborhood&#039;&#039;&#039;. Otherwise, go straight to &#039;&#039;&#039;End of the turn&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Activating a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Activating a Neighborhood lets you collect resources and increase your influence by gainaing precious Golden Carrots&#039;&#039;. Each time you construct a Building, apply any &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effects it has, then calculate your Neighborhood&#039;s influence.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;Neighborhood&#039;&#039;&#039;&lt;br /&gt;
:A group of orthogonally adjacent Buildings under your control is called a Neighborhood. Buildings on different sides of the river are not part of the same Neighborhood, unless they are connected by a Bridge token.&lt;br /&gt;
&lt;br /&gt;
===== Building triggers =====&lt;br /&gt;
&lt;br /&gt;
Each Building has either a &#039;&#039;&#039;When Constructed&#039;&#039;&#039; or a &#039;&#039;&#039;When Activated&#039;&#039;&#039; effect which triggers at a specific moment when activating a Neighborhood.&lt;br /&gt;
&lt;br /&gt;
;When Constructed&lt;br /&gt;
:These Buildings have a one-off effect that is triggered only when they are first placed onto a Plot. They do not reactivate multiple times during the game, unless they return to your reserve and are placed again later.&lt;br /&gt;
&lt;br /&gt;
;When Activated&lt;br /&gt;
:When a Neighborhood is activated, all of its Buildings’ effects are triggered at once.&lt;br /&gt;
&lt;br /&gt;
===== Calculating the influence of a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
After constructing a Building and applying its &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effect, calculate the influence of the Neighborhood it was added to:&lt;br /&gt;
&lt;br /&gt;
Multiply the number of active &#039;&#039;&#039;stars&#039;&#039;&#039; on the Buildings in the Neighborhood by the number of &#039;&#039;&#039;different Building types&#039;&#039;&#039; (which are not Illegal ) present in that Neighborhood. The total obtained represents the number of &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039;you gain for that Neighborhood. Move your Bunny forward that number of spaces on the score track.&lt;br /&gt;
&lt;br /&gt;
;Stars&lt;br /&gt;
:Stars represent a Building&#039;s prestige and the wealth it brings to its Neighborhood. Some Stars only count towards a Neighborhood&#039;s influence if the Neighborhood contains at least one Building of the type shown. If it doesn&#039;t, then the Star isn&#039;t active (and isn&#039;t counted).&lt;br /&gt;
&lt;br /&gt;
;Building Types&lt;br /&gt;
:Buildings have different &#039;&#039;&#039;types&#039;&#039;&#039;. The more different types of Building a Neighborhood has (giving it a variety of different shops and services), the more influential it will be. There are &#039;&#039;&#039;5 different Building types&#039;&#039;&#039; that contribute to a Neighborhood&#039;s influence:&lt;br /&gt;
:* Leisure&lt;br /&gt;
:* Work&lt;br /&gt;
:* Civic&lt;br /&gt;
:* Residential&lt;br /&gt;
:* Knowledge&lt;br /&gt;
:&#039;&#039;&#039;Illegal Buildings&#039;&#039;&#039; do not contribute to influence.&lt;br /&gt;
&lt;br /&gt;
;The Park&lt;br /&gt;
:The &#039;&#039;&#039;Park&#039;&#039;&#039; is a joker tile. It can be counted as any Building type. You can choose its type each time you calculate its Neighborhood&#039;s influence. Certain Request cards may also require you to choose its type at the end of the game; in that case, you can only choose its type once.&lt;br /&gt;
&lt;br /&gt;
===== Constructing additional Buildings =====&lt;br /&gt;
&lt;br /&gt;
As long as you have Buildings in your reserve, you can keep placing them during the &#039;&#039;&#039;Construct&#039;&#039;&#039; phase. Each additional Building you place costs costs 1 extra Coin in addition to the cost of the Plot. Other than this additional cost, proceed as normal to construct it. New Plot cards will be revealed at the end of the turn only.&lt;br /&gt;
&lt;br /&gt;
Keeping Buildings in reserve for later can often be a good idea. A better location may become available, or a certain Plot may become less expensive. It’s up to you to choose the best strategy to optimize the development of your Neighborhoods!&lt;br /&gt;
&lt;br /&gt;
==== Create (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Upgrades bring you additional bonuses that make it easier to develop your Neighborhoods.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At any time during your turn&#039;&#039;&#039;, before or after your Plan or Construct actions, you can create as many Upgrades as you wish by spending Wood. All spent Wood is put back into the reserve. To create an Upgrade, complete the following steps&lt;br /&gt;
&lt;br /&gt;
# Choose 1 available Upgrade tile.&lt;br /&gt;
# Pay its cost in &#039;&#039;&#039;Wood&#039;&#039;&#039;.&lt;br /&gt;
# Place it onto one of the 3 slots on your side of the board.&lt;br /&gt;
&lt;br /&gt;
You have &#039;&#039;&#039;3 Upgrade slots&#039;&#039;&#039;. Once you have created 3, you cannot buy any more. Make sure you choose carefully, as each Upgrade can have considerable impact on your strategy. The Upgrades revealed during setup will be the only ones available for the entire game.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;When purchased&#039;&#039;&#039; Upgrades: apply the effect immediately.&lt;br /&gt;
* &#039;&#039;&#039;All the time&#039;&#039;&#039; Upgrades: apply the effect whenever it&#039;s possible.&lt;br /&gt;
&lt;br /&gt;
=== End of the turn ===&lt;br /&gt;
&lt;br /&gt;
At the end of your turn, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Slide the Plot cards along&#039;&#039;&#039;: slide all the Plot cards on the track, reducing each card&#039;s cost.&lt;br /&gt;
# &#039;&#039;&#039;Reveal new Plot cards&#039;&#039;&#039;: fill the empty spaces on the track with new cards from the pile. Use Architect tokens to indicate the new Plots available on the board.&lt;br /&gt;
&lt;br /&gt;
Check whether the &#039;&#039;&#039;End of the round&#039;&#039;&#039; has been triggered. If it hasn’t, then it’s now your opponent’s turn.&lt;br /&gt;
&lt;br /&gt;
== End of the round ==&lt;br /&gt;
&lt;br /&gt;
If you take the last available Building tile from the board, the end of the round is triggered. End your turn as normal, then check the pile of Building tiles:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles is not empty&#039;&#039;&#039;, prepare a new round.&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles pile is empty&#039;&#039;&#039;, and you have just finished the 4th round, go to &#039;&#039;&#039;End of the game&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== End of the game ==&lt;br /&gt;
&lt;br /&gt;
At the end of the game, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Reveal your Request cards&#039;&#039;&#039;: Starting with the player in the lowest position on the score track, reveal your Request cards one by one and check if your meet their scoring conditions.&lt;br /&gt;
# &#039;&#039;&#039;Determine the winner&#039;&#039;&#039;: The player with the most Golden Carrots wins and becomes the mayor of the new town! In the case of a draw, the player with the most coins wins. If the draw persists, the two players share their victory!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: apply the effects of the &#039;&#039;&#039;Community Leader&#039;&#039;&#039; and &#039;&#039;&#039;Watchmaker&#039;&#039;&#039; Request cards at end of game, &#039;&#039;&#039;not&#039;&#039;&#039; when you first obtain them.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Design&#039;&#039;&#039;: Richard Garfield&lt;br /&gt;
* &#039;&#039;&#039;Illustrations&#039;&#039;&#039;: Jiahui Eva Gao&lt;br /&gt;
* &#039;&#039;&#039;Project management&#039;&#039;&#039;: Adrien Fenouillet&lt;br /&gt;
* &#039;&#039;&#039;Graphic Design&#039;&#039;&#039;: Charlie Metz&lt;br /&gt;
* &#039;&#039;&#039;Proofreading&#039;&#039;&#039;: Xavier Taverne, Robin Leplumey&lt;br /&gt;
* &#039;&#039;&#039;Editorial assistant&#039;&#039;&#039;: Camille Cherchour&lt;br /&gt;
* &#039;&#039;&#039;3D visuals&#039;&#039;&#039;: Valentin Jacoberger&lt;br /&gt;
* &#039;&#039;&#039;Translation&#039;&#039;&#039;: Georgina Fenouillet&lt;br /&gt;
&lt;br /&gt;
Published by &#039;&#039;&#039;IELLO&#039;&#039;&#039; — 9, avenue des Érables, lot 341, 54180 Heillecourt, France &amp;amp;middot; [https://iello.fr iello.fr] &amp;amp;middot; contact@iello.fr&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=29783</id>
		<title>Gamehelpbunnykingdomtown</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=29783"/>
		<updated>2026-05-08T23:21:32Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* A. Placing a Building */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview and Aim of the Game ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Bunny Kingdom: Town&#039;&#039; is a tile-drafting and placement game played over 4 rounds.&lt;br /&gt;
&lt;br /&gt;
During each round, you&#039;ll be &#039;&#039;&#039;planning&#039;&#039;&#039; and &#039;&#039;&#039;constructing&#039;&#039;&#039; new Buildings to develop the Neighborhoods under your control.&lt;br /&gt;
&lt;br /&gt;
Choose your construction plans carefully to boost your strategy, but watch out: those you overlook could be just what your opponent needs!&lt;br /&gt;
&lt;br /&gt;
Each new Building you construct will bring you resources or increase your influence. Don&#039;t forget to satisfy the &#039;&#039;&#039;requests&#039;&#039;&#039; of your new townsfolk, which will remain secret until the end of the game and could completely change the outcome.&lt;br /&gt;
&lt;br /&gt;
During final scoring, the player with the most &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039; is the winner!&lt;br /&gt;
&lt;br /&gt;
== The round ==&lt;br /&gt;
&lt;br /&gt;
A game of &#039;&#039;Bunny Kingdom: Town&#039;&#039; is played over &#039;&#039;&#039;4 rounds&#039;&#039;&#039;, with each player taking turns being the first player.&lt;br /&gt;
&lt;br /&gt;
Each round consists of a series of player &#039;&#039;&#039;turns&#039;&#039;&#039;, continuing until all available Building tiles have been taken.&lt;br /&gt;
&lt;br /&gt;
=== Preparing a new round ===&lt;br /&gt;
&lt;br /&gt;
At the start of each new round, complete the following steps.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Each player receives 2 Coins&#039;&#039;&#039; from the reserve. &#039;&#039;(You received 3 during setup, so you&#039;ll start the first round with 5.)&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Reveal the first 5 tiles from the Building pile&#039;&#039;&#039; and place them on the designated spaces on the board. &#039;&#039;These are the Buildings you can construct during this round.&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Each player draws 2 Request cards&#039;&#039;&#039; and chooses 1 which they place face down in front of them. Place the unchosen cards into the discard pile face-up.&lt;br /&gt;
&lt;br /&gt;
You can now begin the round.&lt;br /&gt;
&lt;br /&gt;
=== The turn ===&lt;br /&gt;
&lt;br /&gt;
Each player will now play their turn, starting with the first player. On your turn, &#039;&#039;&#039;you must perform the Plan action&#039;&#039;&#039;. You may then, if you wish, &#039;&#039;&#039;Construct one or more Buildings&#039;&#039;&#039;. Before or after either of these two actions, you may also &#039;&#039;&#039;Create one or more Upgrades&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Plan (mandatory) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This action allows you to obtain new Building tiles&#039;&#039;. On your turn, &#039;&#039;&#039;you must&#039;&#039;&#039; perform the Plan action. To do so, choose an available Building tile from the track and place it into your reserve. &#039;&#039;&#039;Do not reveal a new Building tile to replace the one you took!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Construct (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This action lets you construct Buildings from your reserve to develop the town and your Neighborhoods.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===== Placing a Building =====&lt;br /&gt;
&lt;br /&gt;
Once you have completed your Plan action, you may, if you wish, construct one or more Buildings. To construct a Building, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# Choose a Building tile from your reserve.&lt;br /&gt;
# Choose an available Plot card and immediately pay its cost in Coins as shown on the board, depending on its position on the track. Then add it to your reserve.&lt;br /&gt;
# Place your Building tile onto the space shown on the Plot card (as indicated by the presence of an Architect token). Place the Architect token above the Plot card’s track space. Place a Bunny from your reserve onto the Building you constructed. If the space contains a wood token, add it to your reserve.&lt;br /&gt;
&lt;br /&gt;
The first card on the track is free — you can take that Plot without paying any Coins.&lt;br /&gt;
&lt;br /&gt;
Some Buildings &#039;&#039;&#039;must&#039;&#039;&#039; be placed onto waterfront spaces (as shown by the waterfront icon). If there are no available waterfront Plots (or if they&#039;re too expensive), you cannot construct those Buildings. &#039;&#039;&#039;All other Buildings have no placement restrictions&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you cannot or do not wish to construct a Building, skip this step and keep the Buildings in your reserve for a future turn.&lt;br /&gt;
&lt;br /&gt;
If you constructed a Building, move on to &#039;&#039;&#039;Activating a Neighborhood&#039;&#039;&#039;. Otherwise, go straight to &#039;&#039;&#039;End of the turn&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===== B. Activating a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Activating a Neighborhood lets you collect resources and increase your influence by gainaing precious Golden Carrots&#039;&#039;. Each time you construct a Building, apply any &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effects it has, then calculate your Neighborhood&#039;s influence.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;Neighborhood&#039;&#039;&#039;&lt;br /&gt;
:A group of orthogonally adjacent Buildings under your control is called a Neighborhood. Buildings on different sides of the river are not part of the same Neighborhood, unless they are connected by a Bridge token.&lt;br /&gt;
&lt;br /&gt;
===== Building triggers =====&lt;br /&gt;
&lt;br /&gt;
Each Building has either a &#039;&#039;&#039;When Constructed&#039;&#039;&#039; or a &#039;&#039;&#039;When Activated&#039;&#039;&#039; effect which triggers at a specific moment when activating a Neighborhood.&lt;br /&gt;
&lt;br /&gt;
;When Constructed&lt;br /&gt;
:These Buildings have a one-off effect that is triggered only when they are first placed onto a Plot. They do not reactivate multiple times during the game, unless they return to your reserve and are placed again later.&lt;br /&gt;
&lt;br /&gt;
;When Activated&lt;br /&gt;
:When a Neighborhood is activated, all of its Buildings’ effects are triggered at once.&lt;br /&gt;
&lt;br /&gt;
===== Calculating the influence of a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
After constructing a Building and applying its &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effect, calculate the influence of the Neighborhood it was added to:&lt;br /&gt;
&lt;br /&gt;
Multiply the number of active &#039;&#039;&#039;stars&#039;&#039;&#039; on the Buildings in the Neighborhood by the number of &#039;&#039;&#039;different Building types&#039;&#039;&#039; (which are not Illegal ) present in that Neighborhood. The total obtained represents the number of &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039;you gain for that Neighborhood. Move your Bunny forward that number of spaces on the score track.&lt;br /&gt;
&lt;br /&gt;
;Stars&lt;br /&gt;
:Stars represent a Building&#039;s prestige and the wealth it brings to its Neighborhood. Some Stars only count towards a Neighborhood&#039;s influence if the Neighborhood contains at least one Building of the type shown. If it doesn&#039;t, then the Star isn&#039;t active (and isn&#039;t counted).&lt;br /&gt;
&lt;br /&gt;
;Building Types&lt;br /&gt;
:Buildings have different &#039;&#039;&#039;types&#039;&#039;&#039;. The more different types of Building a Neighborhood has (giving it a variety of different shops and services), the more influential it will be. There are &#039;&#039;&#039;5 different Building types&#039;&#039;&#039; that contribute to a Neighborhood&#039;s influence:&lt;br /&gt;
:* Leisure&lt;br /&gt;
:* Work&lt;br /&gt;
:* Civic&lt;br /&gt;
:* Residential&lt;br /&gt;
:* Knowledge&lt;br /&gt;
:&#039;&#039;&#039;Illegal Buildings&#039;&#039;&#039; do not contribute to influence.&lt;br /&gt;
&lt;br /&gt;
;The Park&lt;br /&gt;
:The &#039;&#039;&#039;Park&#039;&#039;&#039; is a joker tile. It can be counted as any Building type. You can choose its type each time you calculate its Neighborhood&#039;s influence. Certain Request cards may also require you to choose its type at the end of the game; in that case, you can only choose its type once.&lt;br /&gt;
&lt;br /&gt;
===== Constructing additional Buildings =====&lt;br /&gt;
&lt;br /&gt;
As long as you have Buildings in your reserve, you can keep placing them during the &#039;&#039;&#039;Construct&#039;&#039;&#039; phase. Each additional Building you place costs costs 1 extra Coin in addition to the cost of the Plot. Other than this additional cost, proceed as normal to construct it. New Plot cards will be revealed at the end of the turn only.&lt;br /&gt;
&lt;br /&gt;
Keeping Buildings in reserve for later can often be a good idea. A better location may become available, or a certain Plot may become less expensive. It’s up to you to choose the best strategy to optimize the development of your Neighborhoods!&lt;br /&gt;
&lt;br /&gt;
==== Create (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Upgrades bring you additional bonuses that make it easier to develop your Neighborhoods.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At any time during your turn&#039;&#039;&#039;, before or after your Plan or Construct actions, you can create as many Upgrades as you wish by spending Wood. All spent Wood is put back into the reserve. To create an Upgrade, complete the following steps&lt;br /&gt;
&lt;br /&gt;
# Choose 1 available Upgrade tile.&lt;br /&gt;
# Pay its cost in &#039;&#039;&#039;Wood&#039;&#039;&#039;.&lt;br /&gt;
# Place it onto one of the 3 slots on your side of the board.&lt;br /&gt;
&lt;br /&gt;
You have &#039;&#039;&#039;3 Upgrade slots&#039;&#039;&#039;. Once you have created 3, you cannot buy any more. Make sure you choose carefully, as each Upgrade can have considerable impact on your strategy. The Upgrades revealed during setup will be the only ones available for the entire game.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;When purchased&#039;&#039;&#039; Upgrades: apply the effect immediately.&lt;br /&gt;
* &#039;&#039;&#039;All the time&#039;&#039;&#039; Upgrades: apply the effect whenever it&#039;s possible.&lt;br /&gt;
&lt;br /&gt;
=== End of the turn ===&lt;br /&gt;
&lt;br /&gt;
At the end of your turn, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Slide the Plot cards along&#039;&#039;&#039;: slide all the Plot cards on the track, reducing each card&#039;s cost.&lt;br /&gt;
# &#039;&#039;&#039;Reveal new Plot cards&#039;&#039;&#039;: fill the empty spaces on the track with new cards from the pile. Use Architect tokens to indicate the new Plots available on the board.&lt;br /&gt;
&lt;br /&gt;
Check whether the &#039;&#039;&#039;End of the round&#039;&#039;&#039; has been triggered. If it hasn’t, then it’s now your opponent’s turn.&lt;br /&gt;
&lt;br /&gt;
== End of the round ==&lt;br /&gt;
&lt;br /&gt;
If you take the last available Building tile from the board, the end of the round is triggered. End your turn as normal, then check the pile of Building tiles:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles is not empty&#039;&#039;&#039;, prepare a new round.&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles pile is empty&#039;&#039;&#039;, and you have just finished the 4th round, go to &#039;&#039;&#039;End of the game&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== End of the game ==&lt;br /&gt;
&lt;br /&gt;
At the end of the game, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Reveal your Request cards&#039;&#039;&#039;: Starting with the player in the lowest position on the score track, reveal your Request cards one by one and check if your meet their scoring conditions.&lt;br /&gt;
# &#039;&#039;&#039;Determine the winner&#039;&#039;&#039;: The player with the most Golden Carrots wins and becomes the mayor of the new town! In the case of a draw, the player with the most coins wins. If the draw persists, the two players share their victory!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: apply the effects of the &#039;&#039;&#039;Community Leader&#039;&#039;&#039; and &#039;&#039;&#039;Watchmaker&#039;&#039;&#039; Request cards at end of game, &#039;&#039;&#039;not&#039;&#039;&#039; when you first obtain them.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Design&#039;&#039;&#039;: Richard Garfield&lt;br /&gt;
* &#039;&#039;&#039;Illustrations&#039;&#039;&#039;: Jiahui Eva Gao&lt;br /&gt;
* &#039;&#039;&#039;Project management&#039;&#039;&#039;: Adrien Fenouillet&lt;br /&gt;
* &#039;&#039;&#039;Graphic Design&#039;&#039;&#039;: Charlie Metz&lt;br /&gt;
* &#039;&#039;&#039;Proofreading&#039;&#039;&#039;: Xavier Taverne, Robin Leplumey&lt;br /&gt;
* &#039;&#039;&#039;Editorial assistant&#039;&#039;&#039;: Camille Cherchour&lt;br /&gt;
* &#039;&#039;&#039;3D visuals&#039;&#039;&#039;: Valentin Jacoberger&lt;br /&gt;
* &#039;&#039;&#039;Translation&#039;&#039;&#039;: Georgina Fenouillet&lt;br /&gt;
&lt;br /&gt;
Published by &#039;&#039;&#039;IELLO&#039;&#039;&#039; — 9, avenue des Érables, lot 341, 54180 Heillecourt, France &amp;amp;middot; [https://iello.fr iello.fr] &amp;amp;middot; contact@iello.fr&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=29782</id>
		<title>Gamehelpbunnykingdomtown</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpbunnykingdomtown&amp;diff=29782"/>
		<updated>2026-05-08T23:21:01Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: Created page with &amp;quot;== Overview and Aim of the Game ==  &amp;#039;&amp;#039;Bunny Kingdom: Town&amp;#039;&amp;#039; is a tile-drafting and placement game played over 4 rounds.  During each round, you&amp;#039;ll be &amp;#039;&amp;#039;&amp;#039;planning&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;constructing&amp;#039;&amp;#039;&amp;#039; new Buildings to develop the Neighborhoods under your control.  Choose your construction plans carefully to boost your strategy, but watch out: those you overlook could be just what your opponent needs!  Each new Building you construct will bring you resources or increase your influence...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview and Aim of the Game ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Bunny Kingdom: Town&#039;&#039; is a tile-drafting and placement game played over 4 rounds.&lt;br /&gt;
&lt;br /&gt;
During each round, you&#039;ll be &#039;&#039;&#039;planning&#039;&#039;&#039; and &#039;&#039;&#039;constructing&#039;&#039;&#039; new Buildings to develop the Neighborhoods under your control.&lt;br /&gt;
&lt;br /&gt;
Choose your construction plans carefully to boost your strategy, but watch out: those you overlook could be just what your opponent needs!&lt;br /&gt;
&lt;br /&gt;
Each new Building you construct will bring you resources or increase your influence. Don&#039;t forget to satisfy the &#039;&#039;&#039;requests&#039;&#039;&#039; of your new townsfolk, which will remain secret until the end of the game and could completely change the outcome.&lt;br /&gt;
&lt;br /&gt;
During final scoring, the player with the most &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039; is the winner!&lt;br /&gt;
&lt;br /&gt;
== The round ==&lt;br /&gt;
&lt;br /&gt;
A game of &#039;&#039;Bunny Kingdom: Town&#039;&#039; is played over &#039;&#039;&#039;4 rounds&#039;&#039;&#039;, with each player taking turns being the first player.&lt;br /&gt;
&lt;br /&gt;
Each round consists of a series of player &#039;&#039;&#039;turns&#039;&#039;&#039;, continuing until all available Building tiles have been taken.&lt;br /&gt;
&lt;br /&gt;
=== Preparing a new round ===&lt;br /&gt;
&lt;br /&gt;
At the start of each new round, complete the following steps.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Each player receives 2 Coins&#039;&#039;&#039; from the reserve. &#039;&#039;(You received 3 during setup, so you&#039;ll start the first round with 5.)&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Reveal the first 5 tiles from the Building pile&#039;&#039;&#039; and place them on the designated spaces on the board. &#039;&#039;These are the Buildings you can construct during this round.&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Each player draws 2 Request cards&#039;&#039;&#039; and chooses 1 which they place face down in front of them. Place the unchosen cards into the discard pile face-up.&lt;br /&gt;
&lt;br /&gt;
You can now begin the round.&lt;br /&gt;
&lt;br /&gt;
=== The turn ===&lt;br /&gt;
&lt;br /&gt;
Each player will now play their turn, starting with the first player. On your turn, &#039;&#039;&#039;you must perform the Plan action&#039;&#039;&#039;. You may then, if you wish, &#039;&#039;&#039;Construct one or more Buildings&#039;&#039;&#039;. Before or after either of these two actions, you may also &#039;&#039;&#039;Create one or more Upgrades&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Plan (mandatory) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This action allows you to obtain new Building tiles&#039;&#039;. On your turn, &#039;&#039;&#039;you must&#039;&#039;&#039; perform the Plan action. To do so, choose an available Building tile from the track and place it into your reserve. &#039;&#039;&#039;Do not reveal a new Building tile to replace the one you took!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Construct (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This action lets you construct Buildings from your reserve to develop the town and your Neighborhoods.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===== A. Placing a Building =====&lt;br /&gt;
&lt;br /&gt;
Once you have completed your Plan action, you may, if you wish, construct one or more Buildings. To construct a Building, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# Choose a Building tile from your reserve.&lt;br /&gt;
# Choose an available Plot card and immediately pay its cost in Coins as shown on the board, depending on its position on the track. Then add it to your reserve.&lt;br /&gt;
# Place your Building tile onto the space shown on the Plot card (as indicated by the presence of an Architect token). Place the Architect token above the Plot card’s track space. Place a Bunny from your reserve onto the Building you constructed. If the space contains a wood token, add it to your reserve.&lt;br /&gt;
&lt;br /&gt;
The first card on the track is free — you can take that Plot without paying any Coins.&lt;br /&gt;
&lt;br /&gt;
Some Buildings &#039;&#039;&#039;must&#039;&#039;&#039; be placed onto waterfront spaces (as shown by the waterfront icon). If there are no available waterfront Plots (or if they&#039;re too expensive), you cannot construct those Buildings. &#039;&#039;&#039;All other Buildings have no placement restrictions&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you cannot or do not wish to construct a Building, skip this step and keep the Buildings in your reserve for a future turn.&lt;br /&gt;
&lt;br /&gt;
If you constructed a Building, move on to &#039;&#039;&#039;Activating a Neighborhood&#039;&#039;&#039;. Otherwise, go straight to &#039;&#039;&#039;End of the turn&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===== B. Activating a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Activating a Neighborhood lets you collect resources and increase your influence by gainaing precious Golden Carrots&#039;&#039;. Each time you construct a Building, apply any &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effects it has, then calculate your Neighborhood&#039;s influence.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;Neighborhood&#039;&#039;&#039;&lt;br /&gt;
:A group of orthogonally adjacent Buildings under your control is called a Neighborhood. Buildings on different sides of the river are not part of the same Neighborhood, unless they are connected by a Bridge token.&lt;br /&gt;
&lt;br /&gt;
===== Building triggers =====&lt;br /&gt;
&lt;br /&gt;
Each Building has either a &#039;&#039;&#039;When Constructed&#039;&#039;&#039; or a &#039;&#039;&#039;When Activated&#039;&#039;&#039; effect which triggers at a specific moment when activating a Neighborhood.&lt;br /&gt;
&lt;br /&gt;
;When Constructed&lt;br /&gt;
:These Buildings have a one-off effect that is triggered only when they are first placed onto a Plot. They do not reactivate multiple times during the game, unless they return to your reserve and are placed again later.&lt;br /&gt;
&lt;br /&gt;
;When Activated&lt;br /&gt;
:When a Neighborhood is activated, all of its Buildings’ effects are triggered at once.&lt;br /&gt;
&lt;br /&gt;
===== Calculating the influence of a Neighborhood =====&lt;br /&gt;
&lt;br /&gt;
After constructing a Building and applying its &#039;&#039;&#039;When Constructed&#039;&#039;&#039; effect, calculate the influence of the Neighborhood it was added to:&lt;br /&gt;
&lt;br /&gt;
Multiply the number of active &#039;&#039;&#039;stars&#039;&#039;&#039; on the Buildings in the Neighborhood by the number of &#039;&#039;&#039;different Building types&#039;&#039;&#039; (which are not Illegal ) present in that Neighborhood. The total obtained represents the number of &#039;&#039;&#039;Golden Carrots&#039;&#039;&#039;you gain for that Neighborhood. Move your Bunny forward that number of spaces on the score track.&lt;br /&gt;
&lt;br /&gt;
;Stars&lt;br /&gt;
:Stars represent a Building&#039;s prestige and the wealth it brings to its Neighborhood. Some Stars only count towards a Neighborhood&#039;s influence if the Neighborhood contains at least one Building of the type shown. If it doesn&#039;t, then the Star isn&#039;t active (and isn&#039;t counted).&lt;br /&gt;
&lt;br /&gt;
;Building Types&lt;br /&gt;
:Buildings have different &#039;&#039;&#039;types&#039;&#039;&#039;. The more different types of Building a Neighborhood has (giving it a variety of different shops and services), the more influential it will be. There are &#039;&#039;&#039;5 different Building types&#039;&#039;&#039; that contribute to a Neighborhood&#039;s influence:&lt;br /&gt;
:* Leisure&lt;br /&gt;
:* Work&lt;br /&gt;
:* Civic&lt;br /&gt;
:* Residential&lt;br /&gt;
:* Knowledge&lt;br /&gt;
:&#039;&#039;&#039;Illegal Buildings&#039;&#039;&#039; do not contribute to influence.&lt;br /&gt;
&lt;br /&gt;
;The Park&lt;br /&gt;
:The &#039;&#039;&#039;Park&#039;&#039;&#039; is a joker tile. It can be counted as any Building type. You can choose its type each time you calculate its Neighborhood&#039;s influence. Certain Request cards may also require you to choose its type at the end of the game; in that case, you can only choose its type once.&lt;br /&gt;
&lt;br /&gt;
===== Constructing additional Buildings =====&lt;br /&gt;
&lt;br /&gt;
As long as you have Buildings in your reserve, you can keep placing them during the &#039;&#039;&#039;Construct&#039;&#039;&#039; phase. Each additional Building you place costs costs 1 extra Coin in addition to the cost of the Plot. Other than this additional cost, proceed as normal to construct it. New Plot cards will be revealed at the end of the turn only.&lt;br /&gt;
&lt;br /&gt;
Keeping Buildings in reserve for later can often be a good idea. A better location may become available, or a certain Plot may become less expensive. It’s up to you to choose the best strategy to optimize the development of your Neighborhoods!&lt;br /&gt;
&lt;br /&gt;
==== Create (optional) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Upgrades bring you additional bonuses that make it easier to develop your Neighborhoods.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At any time during your turn&#039;&#039;&#039;, before or after your Plan or Construct actions, you can create as many Upgrades as you wish by spending Wood. All spent Wood is put back into the reserve. To create an Upgrade, complete the following steps&lt;br /&gt;
&lt;br /&gt;
# Choose 1 available Upgrade tile.&lt;br /&gt;
# Pay its cost in &#039;&#039;&#039;Wood&#039;&#039;&#039;.&lt;br /&gt;
# Place it onto one of the 3 slots on your side of the board.&lt;br /&gt;
&lt;br /&gt;
You have &#039;&#039;&#039;3 Upgrade slots&#039;&#039;&#039;. Once you have created 3, you cannot buy any more. Make sure you choose carefully, as each Upgrade can have considerable impact on your strategy. The Upgrades revealed during setup will be the only ones available for the entire game.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;When purchased&#039;&#039;&#039; Upgrades: apply the effect immediately.&lt;br /&gt;
* &#039;&#039;&#039;All the time&#039;&#039;&#039; Upgrades: apply the effect whenever it&#039;s possible.&lt;br /&gt;
&lt;br /&gt;
=== End of the turn ===&lt;br /&gt;
&lt;br /&gt;
At the end of your turn, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Slide the Plot cards along&#039;&#039;&#039;: slide all the Plot cards on the track, reducing each card&#039;s cost.&lt;br /&gt;
# &#039;&#039;&#039;Reveal new Plot cards&#039;&#039;&#039;: fill the empty spaces on the track with new cards from the pile. Use Architect tokens to indicate the new Plots available on the board.&lt;br /&gt;
&lt;br /&gt;
Check whether the &#039;&#039;&#039;End of the round&#039;&#039;&#039; has been triggered. If it hasn’t, then it’s now your opponent’s turn.&lt;br /&gt;
&lt;br /&gt;
== End of the round ==&lt;br /&gt;
&lt;br /&gt;
If you take the last available Building tile from the board, the end of the round is triggered. End your turn as normal, then check the pile of Building tiles:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles is not empty&#039;&#039;&#039;, prepare a new round.&lt;br /&gt;
* &#039;&#039;&#039;If the pile of Building tiles pile is empty&#039;&#039;&#039;, and you have just finished the 4th round, go to &#039;&#039;&#039;End of the game&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== End of the game ==&lt;br /&gt;
&lt;br /&gt;
At the end of the game, complete the following steps:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Reveal your Request cards&#039;&#039;&#039;: Starting with the player in the lowest position on the score track, reveal your Request cards one by one and check if your meet their scoring conditions.&lt;br /&gt;
# &#039;&#039;&#039;Determine the winner&#039;&#039;&#039;: The player with the most Golden Carrots wins and becomes the mayor of the new town! In the case of a draw, the player with the most coins wins. If the draw persists, the two players share their victory!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: apply the effects of the &#039;&#039;&#039;Community Leader&#039;&#039;&#039; and &#039;&#039;&#039;Watchmaker&#039;&#039;&#039; Request cards at end of game, &#039;&#039;&#039;not&#039;&#039;&#039; when you first obtain them.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Design&#039;&#039;&#039;: Richard Garfield&lt;br /&gt;
* &#039;&#039;&#039;Illustrations&#039;&#039;&#039;: Jiahui Eva Gao&lt;br /&gt;
* &#039;&#039;&#039;Project management&#039;&#039;&#039;: Adrien Fenouillet&lt;br /&gt;
* &#039;&#039;&#039;Graphic Design&#039;&#039;&#039;: Charlie Metz&lt;br /&gt;
* &#039;&#039;&#039;Proofreading&#039;&#039;&#039;: Xavier Taverne, Robin Leplumey&lt;br /&gt;
* &#039;&#039;&#039;Editorial assistant&#039;&#039;&#039;: Camille Cherchour&lt;br /&gt;
* &#039;&#039;&#039;3D visuals&#039;&#039;&#039;: Valentin Jacoberger&lt;br /&gt;
* &#039;&#039;&#039;Translation&#039;&#039;&#039;: Georgina Fenouillet&lt;br /&gt;
&lt;br /&gt;
Published by &#039;&#039;&#039;IELLO&#039;&#039;&#039; — 9, avenue des Érables, lot 341, 54180 Heillecourt, France &amp;amp;middot; [https://iello.fr iello.fr] &amp;amp;middot; contact@iello.fr&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Main_game_logic:_Game.php&amp;diff=29776</id>
		<title>Main game logic: Game.php</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Main_game_logic:_Game.php&amp;diff=29776"/>
		<updated>2026-05-08T11:33:54Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Sending private data to some players */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
This is the main file for your game logic. Here you initialize the game, persist data, implement the rules and notify the client interface of changes.&lt;br /&gt;
&lt;br /&gt;
This is the main  class that implements the &amp;quot;server&amp;quot; callbacks. As it is a server it cannot initiate any data communicate with the game client (running in browser) and only can respond to client using notifications.&lt;br /&gt;
&lt;br /&gt;
Your php class instance won&#039;t be in memory between two callbacks, every time client send a request a new class will be created, constructor will be called and eventually your callback function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this file is now named Game.php, located in the modules/php directory. If you see it named yourgamename.game.php in the root dir, it&#039;s the legacy usage. In the legacy usage, the namepaces don&#039;t exists.&lt;br /&gt;
&lt;br /&gt;
== File Structure ==&lt;br /&gt;
&lt;br /&gt;
The details of how the file is structured are described directly with comments in the code skeleton provided to you.&lt;br /&gt;
 &lt;br /&gt;
Here is the basic structure:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;__construct&#039;&#039;&#039;: the game constructor, where you define global variables and initiaze class members.&lt;br /&gt;
* &#039;&#039;&#039;setupNewGame&#039;&#039;&#039;: initial setup of the game. Takes an array of players, indexed by player_id. Structure of each player includes player_name, player_canal, player_avatar, and flags indicating admin/ai/premium/order/language/beginner.&lt;br /&gt;
* &#039;&#039;&#039;getAllDatas&#039;&#039;&#039;: where you retrieve all game data during a complete reload of the game. Return value must be associative array. Value of &#039;players&#039; is reserved for returning players data from players table, if you set it it must follow certain rules &lt;br /&gt;
        $result [&#039;players&#039;] = $this-&amp;gt;getCollectionFromDb(&amp;quot;SELECT `player_id` `id`, `player_score` `score`, `player_no` `no`, `player_color` `color` FROM `player`&amp;quot;);&lt;br /&gt;
        // Returned value must include [&#039;players&#039;][$player_id]][&#039;score&#039;] for scores to populate when F5 is pressed.&lt;br /&gt;
getAllDatas accepts a magic parameter &amp;lt;code&amp;gt;int $currentPlayerId&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;int $currentPlayerNo&amp;lt;/code&amp;gt;) to fetch the information from the point of view of the current player id (or no). It should not have any other parameter.&lt;br /&gt;
* &#039;&#039;&#039;getGameProgression&#039;&#039;&#039;: where you compute the game progression indicator. Returns a number indicating percent of progression (0-100). Used to calculate ELO changes of remaining players when a player quits, or as a conceding requirement (in non-tournament 2 player games, a player may concede if the progression is at least 50%).&lt;br /&gt;
* Utility functions: your utility functions.&lt;br /&gt;
* Player actions: the entry points for players actions ([https://en.doc.boardgamearena.com/Players_actions:_yourgamename.action.php more info here]). &lt;br /&gt;
* Game state arguments: methods to return additional data on specific game states ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#args more info here]).&lt;br /&gt;
* Game state actions: the logic to run when entering a new game state ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#action more info here]).&lt;br /&gt;
* &#039;&#039;&#039;initTable&#039;&#039;&#039;: (not part of template) - this function is called for every php callback by the framework and it can be implement by the game (empty by default). You can use it in rare cases where you need to read database and manipulate some data before any ANY php entry functions are called (such as getAllDatas,action*,st*, etc). Note: it is not called before arg* methods &lt;br /&gt;
* &#039;&#039;&#039;zombieTurn&#039;&#039;&#039;: what to do it&#039;s the turn of a zombie player.&lt;br /&gt;
* &#039;&#039;&#039;upgradeTableDb&#039;&#039;&#039;: function to migrate database if you change it after release on production.&lt;br /&gt;
* &#039;&#039;&#039;getGameName&#039;&#039;&#039;: returns the game name. This will be setup when you create the project. If you are copying files in from another project, make sure you keep this function intact. It must return the right game name, or lots of things will be broken.&lt;br /&gt;
&lt;br /&gt;
== Accessing player information ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: In the following methods, be mindful of the difference between the &amp;quot;active&amp;quot; player and the &amp;quot;current&amp;quot; player. The &#039;&#039;&#039;active&#039;&#039;&#039; player is the player whose turn it is - not necessarily the player who sent a request! The &#039;&#039;&#039;current&#039;&#039;&#039; player is the player who sent the request and will see the results returned by your methods: not necessarily the player whose turn it is!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; getPlayerCount() (or getPlayersNumber() that is an alias )&lt;br /&gt;
: Returns the number of players playing at the table&lt;br /&gt;
: Note: doesn&#039;t work in the beggining of setupNewGame (use count($players) instead). It will work after initialization of player table.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;getActivePlayerId(): string&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot;, whatever what is the current state type.&lt;br /&gt;
: Note: it does NOT mean that this player is active right now, because state type could be &amp;quot;game&amp;quot; or &amp;quot;multiplayer&amp;quot;&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in getArgs / onEnteringState / act functions, and shouldn&#039;t be needed anywhere else.&lt;br /&gt;
&lt;br /&gt;
; getActivePlayerName()&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot; name&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
&lt;br /&gt;
; getPlayerNameById($player_id)&lt;br /&gt;
: Get the name by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerNameByNo($playerNo)&lt;br /&gt;
: Get the name by no&lt;br /&gt;
&lt;br /&gt;
; getPlayerColorById($player_id)&lt;br /&gt;
: Get the color by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerNoById($player_id)&lt;br /&gt;
: Get &#039;player_no&#039; (number) by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerIdByNo(int $playerNo) int&lt;br /&gt;
: Get the player id by player no.&lt;br /&gt;
&lt;br /&gt;
; loadPlayersBasicInfos()&lt;br /&gt;
: Get an associative array with generic data about players (ie: not game specific data).&lt;br /&gt;
: The key of the associative array is the player id. The returned table is cached, so ok to call multiple times without performance concerns.&lt;br /&gt;
: The content of each value is:&lt;br /&gt;
: * player_name - the name of the player&lt;br /&gt;
: * player_color (ex: ff0000) - the color code of the player (as string)&lt;br /&gt;
: * player_no - the position of the player at the start of the game in natural table order, i.e. 1,2,3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                $players = $this-&amp;gt;loadPlayersBasicInfos();&lt;br /&gt;
                foreach ($players as $player_id =&amp;gt; $info) {&lt;br /&gt;
                    $player_color = $info[&#039;player_color&#039;];&lt;br /&gt;
                    ...&lt;br /&gt;
                }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: if you want array of player ids only you can do this:&lt;br /&gt;
    $player_ids =  array_keys($this-&amp;gt;loadPlayersBasicInfos());  &lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerId(bool $bReturnNullIfNotLogged = false) string&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot;. The current player is the one from which the action originated (the one who sent the request).&lt;br /&gt;
: &#039;&#039;&#039;Be careful&#039;&#039;&#039;: This is not necessarily the active player!&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in act functions, and also in getAllDatas, and shouldn&#039;t be needed anywhere.&lt;br /&gt;
: &#039;&#039;&#039;Very important&#039;&#039;&#039;: in your setupNewGame and zombieTurn function, you must never use getCurrentPlayerId() or getCurrentPlayerName(), &lt;br /&gt;
: otherwise it will fail with a &amp;quot;Not logged&amp;quot; error message (these actions are triggered from the main site and propagated to the gameserver from a server, not from a browser. As a consequence, there is no current player associated to these actions).&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerName(bool $bReturnEmptyIfNotLogged = false) string&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; name. &lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Can be easily replaced by $this-&amp;gt;getPlayerNameById($currentPlayerId);&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerColor()&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; color. &lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Can be easily replaced by $this-&amp;gt;getPlayerColorById($currentPlayerId);&lt;br /&gt;
&lt;br /&gt;
; isCurrentPlayerZombie()&lt;br /&gt;
: Check the &amp;quot;current_player&amp;quot; zombie status. If true, player is zombie, i.e. left or was kicked out of the game.&lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Should never be needed, zombie players should behave like real players, and everything specific to zombie should be set in the zombie method only.&lt;br /&gt;
&lt;br /&gt;
; isSpectator()&lt;br /&gt;
: Check the &amp;quot;current_player&amp;quot; spectator status. If true, the user accessing the game is a spectator (not part of the game). For this user, the interface should display all public information, and no private information (like a friend sitting at the same table as players and just spectating the game).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For player score and tiebreaker, see [[Main game logic: Game.php#Manage player scores and Tie breaker]]&lt;br /&gt;
&lt;br /&gt;
== Accessing the database ==&lt;br /&gt;
&lt;br /&gt;
The main game logic should be the only point from which you should access the game database. You access your database using SQL queries with the methods below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BGA uses [http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-transactions.html database transactions]. This means that your database changes WON&#039;T BE APPLIED to the database until your request ends normally (web request, not database request). Using transactions is in fact very useful for you; at any time, if your game logic detects that something is wrong (example: a disallowed move), you just have to throw an exception and all changes to the game situation will be removed. This also means that you need not (and in fact cannot) use your own transactions for multiple related database operations.&lt;br /&gt;
&lt;br /&gt;
However there are sets of database operation that will do implicit commit (most common mistake is to use &amp;quot;TRUNCATE&amp;quot;), you cannot use these operations during the game, it breaks the unrolling of transactions and will lead to nasty issues&lt;br /&gt;
(https://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit).&lt;br /&gt;
&lt;br /&gt;
All methods below are part of game class (and view class) and can be accessed using $this-&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; DbQuery( string $sql )&lt;br /&gt;
: This is the generic method to access the database.&lt;br /&gt;
: It can execute any type of SELECT/UPDATE/DELETE/REPLACE/INSERT query on the database. Returns result of the query.&lt;br /&gt;
: For SELECT queries, the specialized methods below are much better.&lt;br /&gt;
: Do not use method for TRUNCATE, DROP and other table altering operations. See disclamer above about implicit commits. If you really need TRUNCATE use DELETE FROM xxx instead.&lt;br /&gt;
&lt;br /&gt;
; getUniqueValueFromDB( string $sql )&lt;br /&gt;
: Returns a unique value from DB or null if no value is found.&lt;br /&gt;
: $sql must be a SELECT query.&lt;br /&gt;
: Raise an exception if more than 1 row is returned.&lt;br /&gt;
&lt;br /&gt;
; getCollectionFromDB( string $sql, bool $bSingleValue=false ) array&lt;br /&gt;
: Returns an associative array of rows for a sql SELECT query.&lt;br /&gt;
: The key of the resulting associative array is the first field specified in the SELECT query.&lt;br /&gt;
: The value of the resulting associative array is an associative array with all the field specified in the SELECT query and associated values.&lt;br /&gt;
: First column must be a primary or alternate key (semantically, it does not actually have to declared in sql as such).&lt;br /&gt;
: The resulting collection can be empty (it won&#039;t be null).&lt;br /&gt;
: If you specified $bSingleValue=true and if your SQL query requests 2 fields A and B, the method returns an associative array &amp;quot;A=&amp;gt;B&amp;quot;, otherwise its A=&amp;gt;[A,B]&lt;br /&gt;
: Note: The name a bit misleading, it really return associative array, i.e. map and NOT a collection. You cannot use it to get list of values which may have duplicates (hence primary key requirement on first column). If you need simple array use getObjectListFromDB() method.&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getCollectionFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player`&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 1234 =&amp;gt; [ &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ],&lt;br /&gt;
 1235 =&amp;gt; [ &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 ]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getCollectionFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name` FROM `player`&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 1234 =&amp;gt; &#039;myuser0&#039;,&lt;br /&gt;
 1235 =&amp;gt; &#039;myuser1&#039;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyCollectionFromDB(string $sql) array&lt;br /&gt;
: Same as getCollectionFromDB($sdl), but raise an exception if the collection is empty. Note: this function does NOT have 2nd argument as previous one does.&lt;br /&gt;
&lt;br /&gt;
; getObjectFromDB(string $sql) array&lt;br /&gt;
: Returns one row for the sql SELECT query as an associative array or null if there is no result (where fields are keys mapped to values)&lt;br /&gt;
: Raise an exception if the query return more than one row (you can use LIMIT 1 in the query to avoid the exception)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player` WHERE `player_id` = &#039;$player_id&#039;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
  &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 &lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyObjectFromDB(string $sql) array&lt;br /&gt;
: Similar to previous one, but raise an exception if no row is found&lt;br /&gt;
&lt;br /&gt;
; getObjectListFromDB(string $sql, bool $bUniqueValue=false) array&lt;br /&gt;
: Return an array of rows for a sql SELECT query.&lt;br /&gt;
: The result is the same as &amp;quot;getCollectionFromDB&amp;quot; except that the result is a simple array (and not an associative array).&lt;br /&gt;
: The result can be empty.&lt;br /&gt;
: If you specified $bUniqueValue=true and if your SQL query request 1 field, the method returns directly an array of values.&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectListFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player`&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 [ &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ],&lt;br /&gt;
 [ &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 ]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectListFromDB( &amp;quot;SELECT `player_name` `name` FROM `player`&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 &#039;myuser0&#039;,&lt;br /&gt;
 &#039;myuser1&#039;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getDoubleKeyCollectionFromDB(string $sql, bool $bSingleValue=false) array&lt;br /&gt;
: Return an associative array of associative array, from a SQL SELECT query.&lt;br /&gt;
: First array level correspond to first column specified in SQL query.&lt;br /&gt;
: Second array level correspond to second column specified in SQL query.&lt;br /&gt;
: If $bSingleValue = true, keep only third column on result&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; DbGetLastId()&lt;br /&gt;
: Return the PRIMARY key of the last inserted row (see PHP mysql_insert_id function).&lt;br /&gt;
&lt;br /&gt;
; DbAffectedRow() int&lt;br /&gt;
: Return the number of row affected by the last operation&lt;br /&gt;
&lt;br /&gt;
; escapeStringForDB(string $string) string&lt;br /&gt;
: You must use this function on every string type data in your database that contains unsafe data.&lt;br /&gt;
: (unsafe = can be modified by a player).&lt;br /&gt;
: This method makes sure that no SQL injection will be done through the string used, &#039;&#039;&#039;as long as the SQL statement uses single quotes around the string.  This is important!&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;Note: if you using standard types in ajax actions, like AT_alphanum it is sanitized before arrival. This function is only needed if you manage to get an unchecked string, like in the games where user has to enter text as a response.&#039;&#039;&lt;br /&gt;
&#039;&#039;Note: This function does not escape % and _ by default, which are wildcards if used in an SQL &amp;quot;LIKE&amp;quot; statement. The developer must determine if this is desirable behavior.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: see Editing [[Game database model: dbmodel.sql]] to know how to define your database model.&lt;br /&gt;
&lt;br /&gt;
== Use bga globals ==&lt;br /&gt;
Sometimes, you want a single global value for your game, and you don&#039;t want to create a DB table specifically for it.&lt;br /&gt;
&lt;br /&gt;
You can do this with the BGA framework &amp;quot;globals&amp;quot;. Your value will be stored in the &amp;quot;bga_globals&amp;quot; table in the database, and you can access it with simple methods.&lt;br /&gt;
&lt;br /&gt;
The keys are strings, so you might want to store them in constants to avoid mistakes (the key must be at maximum 50 characters long).&lt;br /&gt;
&lt;br /&gt;
The variable can be of any type (number, string, array, object) and will be stored as a JSON (so functions cannot be stored, and circular references on objects will trigger an Exception when storing).&lt;br /&gt;
&lt;br /&gt;
Having a string key and a JSON serialization allows you to debug easily by looking at the bga_globals table content.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: this globals module doesn&#039;t use cache, so every call to one of the following methods makes a DB request.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;set(string $name, $mixed $obj): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Define the value of a global variable.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const FIRST_PLAYER_ID = &amp;quot;firstPlayerId&amp;quot;;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(FIRST_PLAYER_ID, array_keys($players)[0]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;get(string $name, $mixed $defaultValue = null, ?string $class = null): mixed&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the value of a global variable. Returns `null` if not set, except specified otherwise in the optional `$defaultValue`.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$currentFirstPlayerId = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(FIRST_PLAYER_ID);&lt;br /&gt;
...&lt;br /&gt;
$selectedCardsIds = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(SELECTED_CARDS_IDS, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can specify the expected class type, if you save a class and don&#039;t want it returned as a stdClass.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$undo = new Undo($playerId, $moves);&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(UNDO, $undo);&lt;br /&gt;
&lt;br /&gt;
$undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO); // will return an stdClass&lt;br /&gt;
$undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO, class: Undo::class); // will return an Undo class&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: your class should be a plain object with no mandatory constructor params. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Undo {&lt;br /&gt;
    public function __construct(&lt;br /&gt;
        public ?int $playerId = null,&lt;br /&gt;
        public ?array $moves = null,&lt;br /&gt;
    ) {}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;getAll(...$names): array&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the value of all global variables, as a key=&amp;gt;value array. You can set a list of names to only get matching variables. In that case, non-existent keys will not be set in the returned array, so if you have a key with null value, it means the key has been set to null previously.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$variables = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll();&lt;br /&gt;
...&lt;br /&gt;
$diceVariables = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll(DIE1, DIE2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use with PHP&#039;s [https://www.php.net/extract extract()] function to quickly assign multiple variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
extract($this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll(&#039;endTime&#039;, &#039;hour&#039;, &#039;vipWelcome&#039;));&lt;br /&gt;
// $endTime, $hour, and $vipWelcome (may) now exist&lt;br /&gt;
&lt;br /&gt;
if (!empty($endTime)) {&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;delete(...$names): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Delete a global variable or a list of global variables stored in database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;delete(SELECTED_CARDS_IDS);&lt;br /&gt;
...&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;delete(SELECTED_CARDS_IDS, UNDO, AFTER_DISCARD_RETURN_STATE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;has(string $name): bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Indicates if a global variable is stored in database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cardSelectionIsStarted = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;has(SELECTED_CARDS_IDS);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;inc(string $name, $int $inc): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increments the value of a global variable, and return the incremented value. Will trigger an exception if the variable is not a numeric value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;inc(PLAYED_ACTIONS_IN_CURRENT_TURN, 1);&lt;br /&gt;
...&lt;br /&gt;
$totalSpent = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;inc(SPENT_COINS_IN_CURRENT_TURN, $cardCost);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use globals (numbers only / game options) ==&lt;br /&gt;
&lt;br /&gt;
Before the `$this-&amp;gt;globals`, you could only store numeric values as globals. Theses &amp;quot;GameStateValues&amp;quot; are stored in the &amp;quot;global&amp;quot; table in the database, and you can access it with simple methods.&lt;br /&gt;
&lt;br /&gt;
All methods below are members of the game class and should be accessed via $this-&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;initGameStateLabels(array $labelsMap): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method should be located at the beginning of constructor of &#039;&#039;yourgamename.game.php&#039;&#039;. This is where you define the globals used in your game logic, by assigning them IDs.&lt;br /&gt;
&lt;br /&gt;
You can define up to 80 globals, with IDs from 10 to 89 (inclusive, there can be gaps). &lt;br /&gt;
Also you must use this method to access value of game options [[Game_options_and_preferences:_gameoptions.inc.php]], in that case, IDs need to be between 100 and 199.&lt;br /&gt;
You must &#039;&#039;&#039;not&#039;&#039;&#039; use globals outside the range defined above, as those values are used by other components of the framework.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   function __construct() {&lt;br /&gt;
        parent::__construct();&lt;br /&gt;
        $this-&amp;gt;initGameStateLabels([ &lt;br /&gt;
                &amp;quot;my_first_global_variable&amp;quot; =&amp;gt; 10,&lt;br /&gt;
                &amp;quot;my_second_global_variable&amp;quot; =&amp;gt; 11,&lt;br /&gt;
                &amp;quot;my_game_variant&amp;quot; =&amp;gt; 100&lt;br /&gt;
        ]);&lt;br /&gt;
         // other code ...&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: The methods below WILL throw an exception if label is not defined using the call above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateInitialValue( string $label, int $value ): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Initialize global value. This is not required if you ok with default value if 0. This should be called from setupNewGame function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getGameStateValue( string $label, int $default = 0): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Retrieve the value of a global. Returns $default if global is not been initialized (by setGameStateInitialValue).&lt;br /&gt;
&lt;br /&gt;
NOTE: this method use globals &amp;quot;cache&amp;quot; if you directly manipulated globals table OR call this function after undoRestorePoint() - it won&#039;t work as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $value = $this-&amp;gt;getGameStateValue(&#039;my_first_global_variable&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateValue( string $label, int $value ): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Set the current value of a global. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $this-&amp;gt;setGameStateValue(&#039;my_first_global_variable&#039;, 42);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;incGameStateValue( string $label, int $increment ): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increment the current value of a global. If increment is negative, decrement the value of the global.&lt;br /&gt;
&lt;br /&gt;
Return the final value of the global. If global was not initialized it will initialize it as 0.&lt;br /&gt;
&lt;br /&gt;
NOTE: this method use globals &amp;quot;cache&amp;quot; if you directly manipulated globals table OR call this function after undoRestorePoint() - it won&#039;t work as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $value = $this-&amp;gt;incGameStateValue(&#039;my_first_global_variable&#039;, 1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BGA predefined globals ===&lt;br /&gt;
&lt;br /&gt;
BGA already defines some globals in the &#039;&#039;global&#039;&#039; database table. You should not change them directly but it can be useful to know what they mean when debugging:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! global_id !! label !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Current state &lt;br /&gt;
|-&lt;br /&gt;
| 2 || || Active player id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || next_move_id || Next move number&lt;br /&gt;
|-&lt;br /&gt;
| 4 ||  || Game id&lt;br /&gt;
|-&lt;br /&gt;
| 5 ||  || Table creator id&lt;br /&gt;
|-&lt;br /&gt;
| 6 || playerturn_nbr || Player turn number&lt;br /&gt;
|-&lt;br /&gt;
| 7 || gameprogression || Game progression&lt;br /&gt;
|-&lt;br /&gt;
| 8 || initial_reflexion_time || Initial reflection time&lt;br /&gt;
|-&lt;br /&gt;
| 9 || additional_reflexion_time || Additional reflection time&lt;br /&gt;
|-&lt;br /&gt;
| 200 || reflexion_time_profile ||  Game speed&lt;br /&gt;
Real-time games:&lt;br /&gt;
* 0 = Real-time • Fast paced&lt;br /&gt;
* 1 = Real-time • Normal speed&lt;br /&gt;
* 2 = Real-time • Slow speed&lt;br /&gt;
* 9 = No time limit • with friends only&lt;br /&gt;
&lt;br /&gt;
Turn-based games:&lt;br /&gt;
* 10 = Fast Turn-based • 24 moves per day&lt;br /&gt;
* 11 = Fast Turn-based • 12 moves per day&lt;br /&gt;
* 12 = Fast Turn-based • 8 moves per day&lt;br /&gt;
* 13 = Turn-based • 4 moves per day&lt;br /&gt;
* 14 = Turn-based • 3 moves per day&lt;br /&gt;
* 15 = Turn-based • 2 moves per day&lt;br /&gt;
* 17 = Turn-based • 1 move per day&lt;br /&gt;
* 19 = Turn-based • 1 move per 2 days&lt;br /&gt;
* 20 = No time limit • with friends only&lt;br /&gt;
|-&lt;br /&gt;
| 201 || bgaranking_mode || Game mode&lt;br /&gt;
* 0 = Normal mode&lt;br /&gt;
* 1 = Friendly mode (no ELO)&lt;br /&gt;
* 2 = Arena mode&lt;br /&gt;
|-&lt;br /&gt;
| 207 || game_language ||GAMESTATE_GAME_LANG&lt;br /&gt;
|-&lt;br /&gt;
| 300 || game_db_version ||GAMESTATE_GAMEVERSION: Current version of the game (when in production)&lt;br /&gt;
|-&lt;br /&gt;
| 301 || game_result_neutralized ||GAMESTATE_GAME_RESULT_NEUTRALIZED&lt;br /&gt;
|-&lt;br /&gt;
| 302 || neutralized_player_id ||GAMESTATE_NEUTRALIZED_PLAYER_ID&lt;br /&gt;
|-&lt;br /&gt;
| 304 || undo_moves_stored ||GAMESTATE_UNDO_MOVES_STORED&lt;br /&gt;
|-&lt;br /&gt;
| 305 || undo_moves_player ||GAMESTATE_UNDO_MOVES_PLAYER&lt;br /&gt;
|-&lt;br /&gt;
| 306 || lock_screen_timestamp ||GAMESTATE_LOCK_TIMESTAMP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game states and active players ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Activate player handling ===&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;activeNextPlayer()&lt;br /&gt;
: Make the next player active in the natural player order.&lt;br /&gt;
: Note: you must transition to a state in the action triggering this call, so the change of active player is notified to the front.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;activePrevPlayer()&lt;br /&gt;
: Make the previous player active (in the natural player order).&lt;br /&gt;
: Note: you must transition to a state in the action triggering this call, so the change of active player is notified to the front.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;changeActivePlayer( $player_id )&lt;br /&gt;
: You can call this method to make any player active.&lt;br /&gt;
: Note: you must transition to a state in the action triggering this call, so the change of active player is notified to the front.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;getActivePlayerId() string&lt;br /&gt;
: Return the &amp;quot;active_player&amp;quot; id&lt;br /&gt;
: Note: it does NOT mean that this player is active right now, because state type could be GAME or MULTIPLE_ACTIVE_PLAYER&lt;br /&gt;
: Note: avoid using this method in a MULTIPLE_ACTIVE_PLAYER state because it does not mean anything.&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in getArgs / onEnteringState / act functions, and shouldn&#039;t be needed anywhere else.&lt;br /&gt;
&lt;br /&gt;
=== Multiple activate player handling ===&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive()&lt;br /&gt;
: All playing players are made active. Update notification is sent to all players (this will trigger &#039;&#039;&#039;onUpdateActionButtons&#039;&#039;&#039;).&lt;br /&gt;
: Usually, you use this method at the beginning of a game state (e.g., &amp;quot;stGameState&amp;quot;) which transitions to a MULTIPLE_ACTIVE_PLAYER state in which multiple players have to perform some action. Do not use this method if you going to make some more changes in the active player list. (I.e., if you want to take away MULTIPLE_ACTIVE_PLAYER status immediately afterwards, use setPlayersMultiactive instead.)&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function st_MultiPlayerInit() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;stMakeEveryoneActive()&lt;br /&gt;
:this method can be used in state machine to make everybody active as &amp;quot;st&amp;quot; method of multiplayeractive state, it just calls $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive()&lt;br /&gt;
&lt;br /&gt;
This is to be used in state declaration:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    2 =&amp;gt; array(&lt;br /&gt;
    		&amp;quot;name&amp;quot; =&amp;gt; &amp;quot;playerTurnPlace&amp;quot;,&lt;br /&gt;
    		&amp;quot;description&amp;quot; =&amp;gt; \clienttranslate(&#039;Other player must place ships&#039;),&lt;br /&gt;
    		&amp;quot;descriptionmyturn&amp;quot; =&amp;gt; \clienttranslate(&#039;${you} must place ships (click on YOUR SHIPS board to place)&#039;),&lt;br /&gt;
    		&amp;quot;type&amp;quot; =&amp;gt; MULTIPLE_ACTIVE_PLAYER,&lt;br /&gt;
                &#039;action&#039; =&amp;gt; &#039;stMakeEveryoneActive&#039;,&lt;br /&gt;
                &#039;args&#039; =&amp;gt; &#039;arg_playerTurnPlace&#039;,&lt;br /&gt;
    	     	&amp;quot;possibleactions&amp;quot; =&amp;gt; array( &amp;quot;actionBla&amp;quot; ),&lt;br /&gt;
                &amp;quot;transitions&amp;quot; =&amp;gt; array( &amp;quot;next&amp;quot; =&amp;gt; 4, &amp;quot;last&amp;quot; =&amp;gt; 99)&lt;br /&gt;
    ),&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setAllPlayersNonMultiactive( $next_state )&lt;br /&gt;
: All playing players are made inactive. Transition to next state, by transition name or State class name.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive( $players, $next_state, $bExclusive = false )&lt;br /&gt;
: Make a specific list of players active during a multiactive gamestate. Update notification is sent to all players whose state changed.&lt;br /&gt;
: &amp;quot;players&amp;quot; is the array of player id that should be made active. If &amp;quot;players&amp;quot; is not empty the value of &amp;quot;next_state&amp;quot; will be ignored (you can put whatever you want)&lt;br /&gt;
: If &amp;quot;bExclusive&amp;quot; parameter is not set or false it doesn&#039;t deactivate other previously active players. If its set to true, the players who will be multiactive at the end are only these in &amp;quot;$players&amp;quot; array&lt;br /&gt;
&lt;br /&gt;
: In case &amp;quot;players&amp;quot; is empty, the method trigger the &amp;quot;next_state&amp;quot; transition, by transition name or State class name, to go to the next game state.&lt;br /&gt;
: returns true if state transition happened, false otherwise&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $player_id, $next_state )&lt;br /&gt;
: During a multiactive game state, make the specified player inactive.&lt;br /&gt;
: Usually, you call this method during a multiactive game state after a player did his action. It is also possible to call it directly from multiplayer action handler.&lt;br /&gt;
: If this player was the last active player, the method trigger the &amp;quot;next_state&amp;quot; transition, by transition name or State class name, to go to the next game state.&lt;br /&gt;
: returns true if state transition happened, false otherwise&lt;br /&gt;
Example of usage (see state declaration of playerTurnPlace above):&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actionBla($args) {&lt;br /&gt;
        $this-&amp;gt;checkAction(&#039;actionBla&#039;);&lt;br /&gt;
        // handle the action using $this-&amp;gt;getCurrentPlayerId()&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $this-&amp;gt;getCurrentPlayerId(), &#039;next&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getActivePlayerList()&lt;br /&gt;
: With this method you can retrieve the list of the active player at any time.&lt;br /&gt;
: During a GAME type gamestate, it will return a void array.&lt;br /&gt;
: During a ACTIVE_PLAYER type gamestate, it will return an array with one value (the active player id).&lt;br /&gt;
: During a MULTIPLE_ACTIVE_PLAYER type gamestate, it will return an array of the active players id.&lt;br /&gt;
: Note: you should only use this method in the latter case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;  $this-&amp;gt;gamestate-&amp;gt;updateMultiactiveOrNextState( $next_state_if_none )&lt;br /&gt;
: Sends update notification about multiplayer changes. All multiactive set* functions above do that, however if you want to change state manually using db queries for complex calculations, you have to call this yourself after. Do not call this if you calling one of the other setters above. Next state param is a transition name or State class name.&lt;br /&gt;
Example: you have player teams and you want to activate all players in one team&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;0&#039;&amp;quot;;&lt;br /&gt;
        $this-&amp;gt;DbQuery( $sql );&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;1&#039; WHERE `player_id` = &#039;$player_id&#039; AND `player_team` = &#039;$team_no&#039;&amp;quot;;&lt;br /&gt;
        $this-&amp;gt;DbQuery( $sql );&lt;br /&gt;
        &lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;updateMultiactiveOrNextState( &#039;error&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; updating database manually&lt;br /&gt;
: Use this helper function to change multiactive state without sending notification&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    /**&lt;br /&gt;
     * Changes values of multiactivity in db, does not sent notifications.&lt;br /&gt;
     * To send notifications after use updateMultiactiveOrNextState&lt;br /&gt;
     * @param number $player_id, player id &amp;lt;=0 or null - means ALL&lt;br /&gt;
     * @param number $value - 1 multiactive, 0 non multiactive&lt;br /&gt;
     */&lt;br /&gt;
    function dbSetPlayerMultiactive($player_id = -1, $value = 1) {&lt;br /&gt;
        if (! $value)&lt;br /&gt;
            $value = 0;&lt;br /&gt;
        else&lt;br /&gt;
            $value = 1;&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;$value&#039; WHERE `player_zombie` = 0 and `player_eliminated` = 0&amp;quot;;&lt;br /&gt;
        if ($player_id &amp;gt; 0) {&lt;br /&gt;
            $sql .= &amp;quot; AND `player_id` = $player_id&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $this-&amp;gt;DbQuery($sql);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;$this-&amp;gt;gamestate-&amp;gt;isPlayerActive($player_id)&lt;br /&gt;
:Return true if specified player is active right now.&lt;br /&gt;
:This method take into account game state type, ie nobody is active if game state is &amp;quot;game&amp;quot; and several players can be active if game state is &amp;quot;multiplayer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;$this-&amp;gt;bIndependantMultiactiveTable&lt;br /&gt;
:This flag can be set to true in constructor of game.php to force creation of second table to handle multiplayer states (normally these are in player table), this is very advanced feature.&lt;br /&gt;
:ONLY use it after you deploy you game to production if you receive unusual amount of bug report with dead lock symptoms DURING multiactiveplayer states&lt;br /&gt;
    function __construct() {&lt;br /&gt;
      ...&lt;br /&gt;
      $this-&amp;gt;bIndependantMultiactiveTable=true;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== States functions ===&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextState( $transition )&lt;br /&gt;
: Change current state to a new state. Important: the $transition parameter is the name of the transition (or the state class name), and NOT the name of the target game state, see [[Your game state machine: states.inc.php]] for more information about states.&lt;br /&gt;
:&#039;&#039;with State classes, you should not need it and you can just return the class name of the next state.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$this-&amp;gt;gamestate-&amp;gt;jumpToState($stateNum)&#039;&#039;&#039;&lt;br /&gt;
: Change current state to a new state. Important: the $stateNum parameter is the key of the state. See [[Your game state machine: states.inc.php]] for more information about states.&lt;br /&gt;
: Note: this is very advanced method, it should not be used in normal cases. Specific advanced cases include - jumping to specific state from &amp;quot;do_anytime&amp;quot; actions, jumping to dispatcher state or jumping to recovery state from zombie player function&lt;br /&gt;
:&#039;&#039;with State classes, you should not need it and you can just return the class name of the next state.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;checkAction( $actionName, $bThrowException=true )&lt;br /&gt;
: Check if the current player can perform a specific action in the current game state, and optionally throw an exception if they can&#039;t.&lt;br /&gt;
: The action is valid if it is listed in the &amp;quot;possibleactions&amp;quot; array for the current game state (see game state description).&lt;br /&gt;
: This method MUST be the first one called in ALL your PHP methods that handle player actions that are not using [[Main game logic: yourgamename.game.php#Actions (autowired)|Action autowiring]], in order to make sure a player doesn&#039;t perform an action not allowed by the rules at the point in the game.  It should not be called from methods where the current player is not necessarily the active player, otherwise it may fail with an &amp;quot;It is not your turn&amp;quot; exception.&lt;br /&gt;
: If &amp;quot;bThrowException&amp;quot; is set to &amp;quot;false&amp;quot;, the function returns &#039;&#039;&#039;false&#039;&#039;&#039; in case of failure instead of throwing an exception. This is useful when several actions are possible, in order to test each of them without throwing exceptions.&lt;br /&gt;
:&#039;&#039;With auto-wired actions, you should not need it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction( $action )&lt;br /&gt;
: (rarely used)&lt;br /&gt;
: This works exactly like &amp;quot;checkAction&amp;quot; (above), except that it does NOT check if the current player is active.&lt;br /&gt;
: &#039;&#039;&#039;Note: This does NOT check either spectator or eliminated status, so those checks must be done manually.&#039;&#039;&#039;&lt;br /&gt;
: This is used specifically in certain game states when you want to authorize additional actions for players that are not active at the moment.&lt;br /&gt;
: Example: in &#039;&#039;Libertalia&#039;&#039;, you want to authorize players to change their mind about the card played. They are of course not active at the time they change their mind, so you cannot use &amp;quot;checkAction&amp;quot;; use &amp;quot;checkPossibleAction&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
This is how PHP action looks that returns player to active state (only for multiplayeractive states). To be able to execute this on client do not call checkAction on js side for this specific action.&lt;br /&gt;
&lt;br /&gt;
   function actUnpass(int $currentPlayerId) {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction(&#039;actUnpass&#039;); // player changed mind about passing while others were thinking&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive([$currentPlayerId], &#039;error&#039;, false);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()&lt;br /&gt;
: Returns the current main state, ignoring private parallel states.&lt;br /&gt;
: To get the state as an array, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()-&amp;gt;toArray()&amp;lt;/code&amp;gt; and it will get a result similar to $this-&amp;gt;gamestate-&amp;gt;state()&lt;br /&gt;
: To get the state name, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()-&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentMainStateId()&lt;br /&gt;
: Returns the current main state id, ignoring private parallel states. (previously, it was the state_id() function, that returned the state numer as a string).&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentState(int $playerId)&lt;br /&gt;
: Returns the current state for a player. If the player is in private parallel state, it means the current private state for this player.&lt;br /&gt;
: To get the state as an array, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentState($playerId)-&amp;gt;toArray()&amp;lt;/code&amp;gt;&lt;br /&gt;
: To get the state name, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentState($playerId)-&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentStateId(int $playerId)&lt;br /&gt;
: Returns the current state id for a player. If the player is in private parallel state, it means the current private state for this player.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;isMultiactiveState()&lt;br /&gt;
: Return true if we are in MULTIPLE_ACTIVE_PLAYER state, false otherwise&lt;br /&gt;
&lt;br /&gt;
=== Private parallel states ===&lt;br /&gt;
&lt;br /&gt;
See the overview of private parallel states [[Your_game_state_machine:_states.inc.php#Private_parallel_states|here]].&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers()&lt;br /&gt;
: All active players in a multiactive state are entering a first private state defined in the master state&#039;s initialprivate parameter.&lt;br /&gt;
: Every time you need to start a private parallel states you need to call this or similar methods below.&lt;br /&gt;
: Note: at least one player needs to be active (see [[#Multiple_activate_player_handling|above]]) and current game state must be a multiactive state with initialprivate parameter defined&lt;br /&gt;
: Note: initialprivate parameter of master state should be set to the id of the first private state. This private state needs to be defined in states.php with the type set to &#039;private&#039;.&lt;br /&gt;
: Note: this method is usually preceded with activating some or all players&lt;br /&gt;
: Note: initializing private state can run action or args methods of the initial private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stStartPlayerTurn() {&lt;br /&gt;
        // This is usually done in master state action method&lt;br /&gt;
        &lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers();&lt;br /&gt;
&lt;br /&gt;
        // in some cases you can move immediately some or all players to different private states&lt;br /&gt;
        if ($someCondition) {&lt;br /&gt;
            //move all players to different state &lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers(&amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($other condition) {&lt;br /&gt;
            //move single player to different state&lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($specificPlayerId, &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForPlayers($playerIds)&lt;br /&gt;
: Players with specified ids are entering a first private state defined in the master state initialprivate parameter.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateState($playerId)&lt;br /&gt;
: Player with the specified id is entering a first private state defined in the master state initialprivate parameter.&lt;br /&gt;
: Everytime you need to start a private parallel states you need to call this or similar methods above&lt;br /&gt;
: Note: player needs to be active (see [[#Multiple_activate_player_handling|above]]) and current game state must be a multiactive state with initialprivate parameter defined&lt;br /&gt;
: Note: initialprivate parameter of master state should be set to the id of the first private state. This private state needs to be defined in states.php with the type set to &#039;private&#039;.&lt;br /&gt;
: Note: this method is usually preceded with activating that player&lt;br /&gt;
: Note: initializing private state can run action or args methods of the initial private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function st_ChangeMind() {&lt;br /&gt;
        // This player finished his move before, but now decides change something while other players are still active&lt;br /&gt;
        // We activate the player and initialize his private state&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive([$this-&amp;gt;getCurrentPlayerId()], &amp;quot;&amp;quot;);&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateState(this-&amp;gt;getCurrentPlayerId());&lt;br /&gt;
&lt;br /&gt;
        // It is also possible to move the player to some other specific state immediately&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers($transition)&lt;br /&gt;
: All active players will transition to next private state by specified transition&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: transition should lead to another private state (i.e. a state with type defined as &#039;private&#039;&lt;br /&gt;
: Note: transition should be defined in private state in which the players currently are, or be a state class name.&lt;br /&gt;
: Note: this method can run action or args methods of the target state&lt;br /&gt;
: Note: this is usually used after initializing the private state to move players to specific private state according to the game logic&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stStartPlayerTurn() {&lt;br /&gt;
        // This is usually done in master state action method&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers();&lt;br /&gt;
&lt;br /&gt;
        if ($specificOption) {&lt;br /&gt;
            //move all players to different state &lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers(&amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForPlayers($playerIds, $transition)&lt;br /&gt;
: Players with specified ids will transition to next private state specified by provided transition, by transition name or State class name.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($playerId, $transition)&lt;br /&gt;
: Player with specified id will transition to next private state specified by provided transition, by transition name or State class name.&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: transition should lead to another private state (i.e. a state with type defined as &#039;private&#039;&lt;br /&gt;
: Note: transition should be defined in private state in which the players currently are. &lt;br /&gt;
: Note: this method can run action or args methods of the target state for specified player&lt;br /&gt;
: Note: this is usually used after some player actions to move to next private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actSomeAction() {&lt;br /&gt;
        $this-&amp;gt;checkAction(&amp;quot;actSomeAction&amp;quot;); //needs to be defined in the current state&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForAllPlayers()&lt;br /&gt;
: All players private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used &lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this is usually used to clean up after leaving a master state in which private states were used, but can be used in other cases when we want to exit private parallel states and use a regular multiactive state for all players&lt;br /&gt;
: Note: After unseting private state only actions on master state are possible&lt;br /&gt;
: Note: Usually it is not necessary to unset private states as they will be initialized to first private state when private states are needed again. Nevertheless it is generally better to clean private state after exiting private parallel states to avoid bugs. &lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stNextRound() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForAllPlayers();&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForPlayers($playerIds, $transition)&lt;br /&gt;
: For players with specified ids private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateState($playerId)&lt;br /&gt;
: For player with specified id private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used &lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this is usually used when deactivating player to clean up their parallel state&lt;br /&gt;
: Note: After unseting private state only actions on master state are possible&lt;br /&gt;
: Note: Usually it is not necessary to unset private state as it will be initialized to first private state when private states are needed again. Nevertheless it is generally better to clean private state when not needed to avoid bugs. &lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function done() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $this-&amp;gt;getCurrentPlayerId(), &amp;quot;newTurn&amp;quot; );&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;unsetPrivateState($this-&amp;gt;getCurrentPlayerId());&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPrivateState($playerId, $newStateId)&lt;br /&gt;
: For player with specified id a new private state would be set&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this should be rarely used as it doesn&#039;t check if the transition is allowed (it doesn&#039;t even specifies transition). This can be useful in very complex cases when standard state machine is not adequate (i.e. specific cards can lead to some micro action in various states where defining transitions back and forth can become very tedious.) NewStateId can also be a state class name.&lt;br /&gt;
: Note: this method can run action or args methods of the target state for specified player&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actSomeAction() {&lt;br /&gt;
        $this-&amp;gt;checkAction(&amp;quot;actSomeAction&amp;quot;); //needs to be defined in the current state&lt;br /&gt;
&lt;br /&gt;
        if ($playerHaveSpecificCard)&lt;br /&gt;
            return $this-&amp;gt;gamestate-&amp;gt;setPrivateState($this-&amp;gt;getCurrentPlayerId(), 35);&lt;br /&gt;
&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);        &lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getPrivateState($playerId) &lt;br /&gt;
: This return the private state or null if not initialized or not in private state&lt;br /&gt;
&lt;br /&gt;
==== State Arguments in Private parallel states ====&lt;br /&gt;
&lt;br /&gt;
The args method called for private states will have the player_id passed to it, allowing you to customise the arguments returned for that player.&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function argMyPrivateState($player_id) {&lt;br /&gt;
        return array(&lt;br /&gt;
          &#039;my_data&#039; =&amp;gt; $this-&amp;gt;getPlayerSpecificData($player_id)&lt;br /&gt;
        );&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inactive Players ====&lt;br /&gt;
&lt;br /&gt;
During Private Parallel State, active players will be managed by the private state that is current assigned to them.&lt;br /&gt;
&lt;br /&gt;
Inactive players will be managed by the master MULTIPLE_ACTIVE_PLAYER state, so your client should respond to that state in order to display any status message advising players that they are waiting for others to have their turn, or to add any buttons that allow players to potentially &amp;quot;break in&amp;quot; and become active.&lt;br /&gt;
&lt;br /&gt;
== Actions (autowired) ==&lt;br /&gt;
The action function should be prefixed by &amp;quot;act&amp;quot; and match the names specified in the &amp;quot;possibleactions&amp;quot; field on the state file.&lt;br /&gt;
&lt;br /&gt;
If your actions start with &amp;quot;act&amp;quot;, they will be autowired, that means you can declare action functions on the game.php file and call them directly from the front (with bgaPerformAction). You don&#039;t need to use action.php file anymore. The query param from the front request will be matched with the PHP variable of the same name, and it needs to be properly typed. This works for basic types: int, bool, float, string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public function actPlayCard(int $cardId) { ... }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This function can be called from front-side with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.bgaPerformAction(&#039;actPlayCard&#039;, {&lt;br /&gt;
  cardId: this.selectedCardId // the &amp;quot;cardId&amp;quot; param match the PHP variable name&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note: if you also declare the function in the action.php, it will be used instead of the autowiring)&lt;br /&gt;
&lt;br /&gt;
If you want more complex types like int array or JSON, you&#039;ll need to specify it using the Param attributes. Same if the PHP variable name is different from the front query param, or if you want to specify the tests that should be realized on the parameter before calling the function.&lt;br /&gt;
&lt;br /&gt;
=== Possible attributes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BoolParam(?string $name = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\BoolParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actRaiseBet(#[BoolParam(name: &#039;raise&#039;)] bool $raiseBet)&lt;br /&gt;
&lt;br /&gt;
public function actRaiseBet(#[BoolParam(name: &#039;raise&#039;)] bool $raise) // NOTE: it&#039;s the same as actRaiseBet(bool $raise) if PHP var name and param name are the same&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IntParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\IntParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actPlayCard(#[IntParam(name: &#039;id&#039;)] int $cardId)&lt;br /&gt;
&lt;br /&gt;
public function actSpendGold(#[IntParam(min: 1)] int $gold) // will trigger an exception if param is &amp;lt; 1&lt;br /&gt;
&lt;br /&gt;
public function actPlaceCardOnSpot(int $cardId, #[IntParam(min: 1, max: 5)] int $spot) // will trigger an exception if spot is not in 1 to 5 range&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FloatParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Works the same way as IntParam, import is &amp;lt;code&amp;gt;use \Bga\GameFramework\Actions\Types\FloatParam;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;StringParam(?string $name = null, public ?bool $alphanum = false, public ?bool $alphanum_dash = false, public ?bool $base64 = false, public ?array $enum)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\StringParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actSubmitWord(#[StringParam(alphanum: true)] string $word) // will trigger an exception if the word is not alphanum&lt;br /&gt;
&lt;br /&gt;
public function actChooseAction(#[StringParam(enum: [&#039;move&#039;, &#039;attack&#039;, &#039;pass&#039;])] string $action)  // will trigger an exception if the parameter doesn&#039;t match a value in the enum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: You should do one of the tests of the attribute, or test it yourself on the function, to ensure the user is not sending forbidden characters to the function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IntArrayParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\IntArrayParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actDiscardCards(#[IntArrayParam()] array $ids)&lt;br /&gt;
&lt;br /&gt;
public function actDiscardCards(#[IntArrayParam(min: 2, max: 8)] array $ids)  // will trigger an exception if the array length is not in the 2 to 8 range. It doesn&#039;t check the min/max of the array values!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function can be called from front-side with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const selectedCardIds = [8, 12, 25];&lt;br /&gt;
this.bgaPerformAction(&#039;actDiscardCards&#039;, {&lt;br /&gt;
  ids: selectedCardIds&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;JsonParam(?string $name = null, public ?bool $associative = true, public ?bool $alphanum = true)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\JsonParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam()] array $answer) {} // force conversion to array during PHP json decode&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(associative: false)] object $answer) {} // force conversion to object during PHP json decode&lt;br /&gt;
&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(associative: null)] mixed $answer) {} // default PHP json decode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 On client side:&lt;br /&gt;
&lt;br /&gt;
      const lala ={a: 2, b: &amp;quot;string&amp;quot;, c: [1,2,4]};&lt;br /&gt;
      this.bgaPerformAction(&amp;quot;actPlanComplexStuff&amp;quot;, {&lt;br /&gt;
        answer: JSON.stringify(lala)&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to decode the Json to a PHP class, similar to what is done with $this-&amp;gt;globals-&amp;gt;get with class parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\JsonParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
class Answer {&lt;br /&gt;
    public function __construct(&lt;br /&gt;
        public int $a,&lt;br /&gt;
        public string $b,&lt;br /&gt;
        public array $c,&lt;br /&gt;
    ) {}&lt;br /&gt;
}&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(class: Answer::class)] $answer) {} // specifying the class to map the json to&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam] Answer $answer) {} // same result, but the class is detected automatically by the framework thanks to the typed param.&lt;br /&gt;
&lt;br /&gt;
public function actPlanMultipleComplexStuff(#[JsonParam(class: Answer::class)] array $answers) {} // can decode an array of Answer::class&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== checkAction ===&lt;br /&gt;
The autowiring also triggers the checkAction, so you don&#039;t have to call it at the beginning of the function. If you need a function that should not trigger checkAction (an action that can be played during someone else turn), you can disable it this way: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\CheckAction;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#[CheckAction(false)]&lt;br /&gt;
public function actSetAutopass(bool $autopass) { ... }&lt;br /&gt;
&lt;br /&gt;
#[CheckAction(false)]&lt;br /&gt;
public function actCancelChooseAction() {&lt;br /&gt;
  $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction(&#039;actCancelChooseAction&#039;);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you disable &amp;lt;code&amp;gt;checkAction&amp;lt;/code&amp;gt;, you probably need to call &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;checkPossibleAction&amp;lt;/code&amp;gt; instead at the beginning of your function. You likely also want to disable client checkAction calls implied by bgaPerformAction.&lt;br /&gt;
&lt;br /&gt;
=== act prefix ===&lt;br /&gt;
The act prefix needed to activate the autowiring is not just to have some consistency in naming, it&#039;s also intended to protect your code. If we let autowired action to any function, a player may do a request to &#039;setPlayerScore&#039; function, even if you never intended for it to be called front side, and it would allow almost undetectable cheating for anyone reading the code of your game.&lt;br /&gt;
&lt;br /&gt;
== Players turn order ==&lt;br /&gt;
&lt;br /&gt;
When table is created the &amp;quot;natural&amp;quot; player order is assigned to player at random, and stored in &amp;quot;read-only&amp;quot; field &amp;quot;player_no&amp;quot;.&lt;br /&gt;
If you need to create a custom order you should never change natural order but have a separate data structure. &lt;br /&gt;
For example you can alter the players table to add another &amp;quot;custom_order&amp;quot; field, you can use state globals or you can use your natural board database, &lt;br /&gt;
to store meeple_color/position_location pair.&lt;br /&gt;
BGA currently does not provide any API to create/store custom player order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getNextPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return an associative array which associate each player with the next player around the table.&lt;br /&gt;
&lt;br /&gt;
In addition, key 0 is associated to the first player to play.&lt;br /&gt;
&lt;br /&gt;
Example: if three player with ID 1000, 2000 and 3000 are around the table, in this order, the method returns:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   array( &lt;br /&gt;
    1000 =&amp;gt; 2000, &lt;br /&gt;
    2000 =&amp;gt; 3000, &lt;br /&gt;
    3000 =&amp;gt; 1000, &lt;br /&gt;
    0 =&amp;gt; 1000 &lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPrevPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, but the associative array associate the previous player around the table. However there no 0 index here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerAfter( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing after given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerBefore( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing before given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
Note: There is no API to modify this order, if you have custom player order you have to maintain it in your database&lt;br /&gt;
and have custom function to access it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;createNextPlayerTable( $players, $bLoop=true )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using $players array creates a map of current =&amp;gt; next as in example from getNextPlayerTable(), however you can use custom order here. &lt;br /&gt;
If parmeter $bLoop is set to true then last player will points to first (creaing a loop), false otherwise.&lt;br /&gt;
In any case index 0 points to first player (first element of $players array). $players is array of player ids in desired order.&lt;br /&gt;
&lt;br /&gt;
Note: This function &#039;&#039;&#039;DOES NOT&#039;&#039;&#039; change the order in database, it only creates a map using key/values as descibed.&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function getNextPlayerTableCustom() {&lt;br /&gt;
        $starting = $this-&amp;gt;getStartingPlayer(); // custom function to get starting player&lt;br /&gt;
        $player_ids = $this-&amp;gt;getPlayerIdsInOrder($starting); // custom function to create players array starting from starting player&lt;br /&gt;
        return $this-&amp;gt;createNextPlayerTable($player_ids, false); // create next player table in custom order&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$table = $this-&amp;gt;createNextPlayerTable([3000,2000,1000], false);&lt;br /&gt;
&lt;br /&gt;
will return:&lt;br /&gt;
   [ &lt;br /&gt;
    3000 =&amp;gt; 2000, &lt;br /&gt;
    2000 =&amp;gt; 1000, &lt;br /&gt;
    1000 =&amp;gt; null,&lt;br /&gt;
    0 =&amp;gt; 3000 &lt;br /&gt;
   ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
&lt;br /&gt;
To understand notifications, please read [http://www.slideshare.net/boardgamearena/the-bga-framework-at-a-glance The BGA Framework at a glance] first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Notifications are crutial part of BGA framework. Everything which players see, including all changes which happen on frontend (including setup), are done via notfications.&lt;br /&gt;
&lt;br /&gt;
Some notifications are built into the framework, and others are custom, game specific notifications. Generally, you should not send or handle framework notifications, except exposed APIs.&lt;br /&gt;
&lt;br /&gt;
Example of framework notifications:&lt;br /&gt;
* game setup (first time client connects to game)&lt;br /&gt;
* game state change&lt;br /&gt;
* active player change&lt;br /&gt;
Example of custom notifications:&lt;br /&gt;
* game piece moved&lt;br /&gt;
* player scored points&lt;br /&gt;
&lt;br /&gt;
Notifications are queued, i.e. sent at the very end of the action, when it ends normally. It means that if you throw an exception for any reason (i.e: move is not allowed), no notifications will be sent to players.&lt;br /&gt;
&lt;br /&gt;
Notification can be sent from the following functions (and transive calls):&lt;br /&gt;
&lt;br /&gt;
* action handler (act* in State classes or Game.php). It is a MUST actually. At least one notification must be sent (but it includes state transition which sends it)&lt;br /&gt;
* game state transition (onEnteringState in State classes)&lt;br /&gt;
* setupNewGame (after player tables setup is finished)&lt;br /&gt;
&lt;br /&gt;
Notification cannot be sent from the following:&lt;br /&gt;
* .view.php&lt;br /&gt;
* .action.php&lt;br /&gt;
* material.inc.php&lt;br /&gt;
* constructor of .game.php&lt;br /&gt;
* arg* methods of .game.php&lt;br /&gt;
&lt;br /&gt;
There are conceptually two types of notification:&lt;br /&gt;
* public - sent to all clients who are listening - that includes all players in the table as well as spectators&lt;br /&gt;
* private - sent only to a single player&lt;br /&gt;
&lt;br /&gt;
The bundle of notifications sent at the end of an action is considered a single &amp;quot;move&amp;quot; and the table&#039;s move counter increases.&lt;br /&gt;
If you are ONLY sending private notifications during action handling, they will not have an associated &amp;lt;code&amp;gt;move_id&amp;lt;/code&amp;gt; (to avoid this, add simple public notification with empty message). &lt;br /&gt;
In the rare case that you want to change this behavior, you can apply some hackery described in [[BGA_Studio_Cookbook]]&lt;br /&gt;
&lt;br /&gt;
Note: the total notification size is now limited to 128K. It seems a lot, but don&#039;t forget that notification are bundled and only send at the end of an action which also INCLUDES all game state transitions that follow.&lt;br /&gt;
&lt;br /&gt;
The notifications are handled on JS side by subscribing to notifications (only do it for custom notifications!). See [Game_interface_logic:_yourgamename.js#Notifications]&lt;br /&gt;
&lt;br /&gt;
Do not put HTML in the notifications. If you want to have pretty pictures in the log check this [[BGA_Studio_Cookbook#Inject_images_and_styled_html_in_the_log]].&lt;br /&gt;
&lt;br /&gt;
=== Notify ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;all(string $notification_type,string | NotificationMessage $message,array $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Send a notification to all players of the game and spectators (public).&lt;br /&gt;
&lt;br /&gt;
* notification_type: A string that defines the type of your notification.&lt;br /&gt;
&lt;br /&gt;
Your game interface Javascript logic will use this to know what is the type of the received notification (and to trigger the corresponding method).&lt;br /&gt;
&lt;br /&gt;
* message: A string that defines what is to be displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
You can use an empty string here (&#039;&#039;). In this case, nothing is displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
Unless its empty, use &amp;quot;\clienttranslate&amp;quot; method to make sure string is translated.&lt;br /&gt;
&lt;br /&gt;
You can use arguments in your $notification_log string, that refers to values defines in the &amp;quot;$notification_args&amp;quot; argument (see below). &lt;br /&gt;
Note: Make sure you only use single quotes (&#039;), otherwise PHP will try to interpolate the variable and will ignore the values in the args array.&lt;br /&gt;
&lt;br /&gt;
* notification_args: The arguments of your notifications, as an associative array.&lt;br /&gt;
&lt;br /&gt;
This array will be transmitted to the game interface logic, in order the game interface can be updated.&lt;br /&gt;
&lt;br /&gt;
Complete notify all example (from &amp;quot;Reversi&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all( &amp;quot;playDisc&amp;quot;, clienttranslate( &#039;${player_name} plays a disc and turns over ${returned_nbr} disc(s)&#039; ),&lt;br /&gt;
 array(&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id),&lt;br /&gt;
        &#039;returned_nbr&#039; =&amp;gt; count( $turnedOverDiscs ),&lt;br /&gt;
        &#039;x&#039; =&amp;gt; $x,&lt;br /&gt;
        &#039;y&#039; =&amp;gt; $y&lt;br /&gt;
     ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see in the example above the use of the &amp;quot;\clienttranslate&amp;quot; method, and the use of 2 arguments &amp;quot;player_name&amp;quot; and &amp;quot;returned_nbr&amp;quot; in the notification log.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: NO private data must be sent with this method, as a cheater could see it even if it is not used explicitly by the game interface logic. If you want to send private information to a player, please use notify-&amp;gt;player below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: this array is serialized to be sent to the browsers, and will be saved with the notification to be able to replay the game later. If it is too big, it can make notifications slower / less reliable, and replay archives very big (to the point of failing). So as a general rule, you should send only the minimum of information necessary to update the client interface with no overhead in order to keep the notifications as light as possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: When the game page is reloaded (i.e. F5 or when loading turn based game) all previous notifications are replayed as history notifications. These notifications do not trigger notification handlers and are used basically to build the game log. Because of that most of the notification arguments (except i18n, player_id and all arguments referenced in the message), are removed from these history notifications. If you need additional arguments in history notifications you can add special field &amp;lt;b&amp;gt;preserve&amp;lt;/b&amp;gt; to notification arguments, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all( &amp;quot;playDisc&amp;quot;, clienttranslate( &#039;${player_name} plays a disc and turns over ${returned_nbr} disc(s)&#039; ),&lt;br /&gt;
 array(&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id),&lt;br /&gt;
        &#039;returned_nbr&#039; =&amp;gt; count( $turnedOverDiscs ),&lt;br /&gt;
        &#039;x&#039; =&amp;gt; $x,&lt;br /&gt;
        &#039;y&#039; =&amp;gt; $y,&lt;br /&gt;
        &#039;preserve&#039; =&amp;gt; [ &#039;x&#039;, &#039;y&#039; ]&lt;br /&gt;
     ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, fields x and y will be preserved when replaying history notification at the game load.&lt;br /&gt;
&lt;br /&gt;
NOTE: The ONLY reason &#039;preserve&#039; is useful if you have custom method to render notifications in game log which changes some text arguments into html (i.e. to insert the images instead of plain text). Do not use preserve &amp;quot;just in case&amp;quot; - it will only bloat the logs and make game load VERY slow.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: If both public and private notifications are sent to the same player in the same action (AJAX call), they will initially appear in the log in the order in which they were called, but they are placed into the game log in the following order: All private notifications first, then all public notifications. This means that when the page is refreshed, or when a player loads an asynchronous game, if you have called any public notifications &#039;&#039;before&#039;&#039; the last private notification, they will appear out of order in the log.&lt;br /&gt;
&lt;br /&gt;
==== Recursive Notifications ====&lt;br /&gt;
&lt;br /&gt;
If your notification contains some phrases that build programmatically you may need to use recursive notifications. In this case the argument can be not only the string but&lt;br /&gt;
an array itself, which contains &#039;log&#039; and &#039;args&#039;, i.e.&lt;br /&gt;
&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;message&#039;, clienttranslate(&#039;Game moves ${token_name_rec}&#039;),&lt;br /&gt;
                   [&#039;token_name_rec&#039; =&amp;gt; [&#039;log&#039; =&amp;gt; &#039;${token_name} #${token_number}&#039;,&lt;br /&gt;
                                       &#039;args&#039;=&amp;gt; [&#039;token_name&#039; =&amp;gt; \clienttranslate(&#039;Boo&#039;), &#039;token_number&#039; =&amp;gt; $number, &#039;i18n&#039; =&amp;gt; [&#039;token_name&#039;] ]&lt;br /&gt;
                                      ]&lt;br /&gt;
                   ]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Sending private data to some players ====&lt;br /&gt;
&lt;br /&gt;
Sometimes you want to notify all players of a message but not have it appear in the log of specific players (for example, have every player see &amp;quot;Player X draws a card&amp;quot; but have Player X will get a private notification &amp;quot;You draw the Ace of Spades&amp;quot;, so you want them to see a different message and get some private data.&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; arg to send private data to designated players, in a similar fashion of the onEnteringState &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; flag. &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; is an array that have the player id to send private information to, and the value if the different notification using NotificationMessage to send both the replacing log and the args that will be accessible on front side in args._private.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        use Bga\GameFramework\NotificationMessage;&lt;br /&gt;
&lt;br /&gt;
        (...)&lt;br /&gt;
&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;cardPicked&#039;, clienttranslate(&#039;${player_name} takes a secret card from the deck&#039;), [&lt;br /&gt;
            &#039;playerId&#039; =&amp;gt; $playerId,&lt;br /&gt;
            &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($playerId),&lt;br /&gt;
            &#039;_private&#039; =&amp;gt; [&lt;br /&gt;
                $playerId =&amp;gt; new NotificationMessage(clienttranslate(&#039;You take ${_private.card_name} from the deck&#039;), [&lt;br /&gt;
                    &#039;card&#039; =&amp;gt; $card,&lt;br /&gt;
                    &#039;card_name&#039; =&amp;gt; $this-&amp;gt;getCardName($card),&lt;br /&gt;
                    &#039;i18n&#039; =&amp;gt; [&#039;card_name&#039;]&lt;br /&gt;
                ]),&lt;br /&gt;
            ],&lt;br /&gt;
        ]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the message uses &amp;lt;code&amp;gt;${_private.card_name}&amp;lt;/code&amp;gt; to access the data in the private args.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t need to change the log, but only send private args, you can send an array of args instead of the NotificationMessage object.&lt;br /&gt;
&lt;br /&gt;
If you add &amp;lt;code&amp;gt;_merge_private =&amp;gt; true&amp;lt;/code&amp;gt; next to &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt;, the private informations will be accessible in `args` instead of `args._private`.&lt;br /&gt;
&lt;br /&gt;
If you want all your &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; objects to be merged (state args and notif args), call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;alwaysMergePrivate();&amp;lt;/code&amp;gt; in your Game constructor instead of adding the &amp;lt;code&amp;gt;_merge_private&amp;lt;/code&amp;gt; flag on each arg.&lt;br /&gt;
&lt;br /&gt;
==== Using player names  ====&lt;br /&gt;
&lt;br /&gt;
The variable for player name must be ${player_name} in order to be highlighted with the player color in the game log, it has to have matching &#039;player_id&#039; argument in $notification_args. If you want a second player name in the log, name the variable ${player_name2} and $player_id2, etc.  For the multiple player case, usage of player_id and player_name is not mandatory i.e. skipping to player_id1 and player_name1 is fine.&lt;br /&gt;
&lt;br /&gt;
Special handling of arguments:&lt;br /&gt;
* ${player_name}  - this will be wrapped in html and text shown using color of the corresponding player, some colors also have reserved background. This will apply recursively as well.&lt;br /&gt;
* ${player_name1}, ${player_name2}, ${player_name3}, etc. work the same as above&lt;br /&gt;
In order for this to work you must pass corresponding player_idX AND player_nameX in args i.e.&lt;br /&gt;
&lt;br /&gt;
    $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&lt;br /&gt;
      &#039;buyAndPassCard&#039;,&lt;br /&gt;
      clienttranslate(&#039;${player_name} buys ${card_name} and passes it to ${player_name2}&#039;),&lt;br /&gt;
      [&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player1[&#039;id&#039;],&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $player1[&#039;name&#039;],&lt;br /&gt;
        &#039;player_id2&#039; =&amp;gt; $player2[&#039;id&#039;],&lt;br /&gt;
        &#039;player_name2&#039; =&amp;gt; $player2[&#039;name&#039;],&lt;br /&gt;
        ...&lt;br /&gt;
      ]&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
Note: player_name is not translatable, never add it to i18n array&lt;br /&gt;
&lt;br /&gt;
=== NotifyPlayer ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;player(int $player_id, string $notification_type, string | NotificationMessage $message, $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, except that the notification is sent to one player only. The player must be the player at the game table.&lt;br /&gt;
&lt;br /&gt;
This method should be used only if you send some private information to a player, NOT wanting to send a public notification at the same time for the same reason. See paragraph &#039;&#039;&#039;Sending private data to some players&#039;&#039;&#039; that should cover most of your need to send a private notif.&lt;br /&gt;
&lt;br /&gt;
Important: the variable for player name must be ${player_name} in order to be highlighted with the player color in the game log. Since its a private notification it may be more appropriate to use &amp;quot;you&amp;quot; insted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;player($player_id,&#039;message&#039;, clienttranslate(&#039;You draw ${card_name}&#039;), [ ... ]);&lt;br /&gt;
or&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;player($player_id,&#039;message&#039;, clienttranslate(&#039;${player_name} draws ${card_name}&#039;), [ &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id), ... ]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Spectators cannot be notified using this method, because their player ID is not available via loadPlayersBasicInfos() or otherwise. You must use notify-&amp;gt;all() for any notification that spectators should get.&lt;br /&gt;
&lt;br /&gt;
=== Notification decorators ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;addDecorator(callable $fn)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a decorator function that will be called on notification args before each call of notify-&amp;gt;all and notify-&amp;gt;player. &#039;&#039;Note: it won&#039;t work with deprecated functions notifyAllPlayers and notifyPlayer.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To avoid duplicating the code in your notification args, you can register decorators in your Game __construct function.&lt;br /&gt;
 // in construct :&lt;br /&gt;
 $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator(fn(string $message, array $args) =&amp;gt; $this-&amp;gt;decoratePlayerNameNotifArg($message, $args));&lt;br /&gt;
 // could also be written this (ugly) way : $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator([$this, &#039;decoratePlayerNameNotifArg&#039;]);&lt;br /&gt;
 &lt;br /&gt;
 // with the Utils functions&lt;br /&gt;
 public function decoratePlayerNameNotifArg(string $message, array $args): array {&lt;br /&gt;
     // if the notif message contains ${player_name} but it isn&#039;t set in the args, add it on args from $args[&#039;player_id&#039;]&lt;br /&gt;
     if (isset($args[&#039;player_id&#039;]) &amp;amp;&amp;amp; !isset($args[&#039;player_name&#039;]) &amp;amp;&amp;amp; str_contains($message, &#039;${player_name}&#039;)) {&lt;br /&gt;
         $args[&#039;player_name&#039;] = $this-&amp;gt;getPlayerNameById($args[&#039;player_id&#039;]);&lt;br /&gt;
     }&lt;br /&gt;
     return $args;&lt;br /&gt;
 }&lt;br /&gt;
With this example, you can call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&amp;quot;pass&amp;quot;, clienttranslate(&#039;${player_name} passes&#039;), [ &amp;quot;player_id&amp;quot; =&amp;gt; $player_id ]);&amp;lt;/code&amp;gt; and the front will receive the player_name arg along the player_id one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also declare it as an inline function :&lt;br /&gt;
 // in construct :&lt;br /&gt;
 this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator(function(string $message, array $args) {&lt;br /&gt;
     // if the notif message contains ${card_name} but it isn&#039;t set in the args, add it on args from $args[&#039;card&#039;]&lt;br /&gt;
     // also set it up for translations by adding it to the i18n array&lt;br /&gt;
     if (isset($args[&#039;card&#039;]) &amp;amp;&amp;amp; !isset($args[&#039;card_name&#039;]) &amp;amp;&amp;amp; str_contains($message, &#039;${card_name}&#039;)) {&lt;br /&gt;
         $args[&#039;card_name&#039;] = $args[&#039;card&#039;]-&amp;gt;name;&lt;br /&gt;
         $args[&#039;i18n&#039;][] = [&#039;card_name&#039;];&lt;br /&gt;
     }&lt;br /&gt;
     return $args;&lt;br /&gt;
 });&lt;br /&gt;
With this example, you can call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&amp;quot;playCard&amp;quot;, clienttranslate(&#039;${player_name} plays ${card_name}&#039;), [ &amp;quot;player_id&amp;quot; =&amp;gt; $player_id, card =&amp;gt; $card ]);&amp;lt;/code&amp;gt; and the front will receive the card_name arg with the flag to translate it.&lt;br /&gt;
&lt;br /&gt;
== Randomization ==&lt;br /&gt;
&lt;br /&gt;
A large number of board games rely on random, most often based on dice, cards shuffling, picking some item in a bag, and so on. This is very important to ensure a high level of randomness for each of these situations.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s are a list of techniques you should use in these situations, from the best to the worst.&lt;br /&gt;
&lt;br /&gt;
=== Dice and bga_rand ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;\bga_rand( min, max )&#039;&#039;&#039; &lt;br /&gt;
This is a BGA framework function that provides you a random number between &amp;quot;min&amp;quot; and &amp;quot;max&amp;quot; (inclusive), using the best available random method available on the system.&lt;br /&gt;
&lt;br /&gt;
This is the preferred function you should use, because we are updating it when a better method is introduced.&lt;br /&gt;
&lt;br /&gt;
As of now, bga_rand is based on the PHP function &amp;quot;random_int&amp;quot;, which ensures a cryptographic level of randomness.&lt;br /&gt;
&lt;br /&gt;
In particular, it is &#039;&#039;&#039;mandatory&#039;&#039;&#039; to use it for all &#039;&#039;&#039;dice throw&#039;&#039;&#039; (ie: games using other methods for dice throwing will be rejected by BGA during review).&lt;br /&gt;
&lt;br /&gt;
Note: rand() and mt_rand() are deprecated on BGA and should not be used anymore, as their randomness is not as good as &amp;quot;bga_rand&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Arrays ===&lt;br /&gt;
&lt;br /&gt;
PHP&#039;s [https://www.php.net/array_rand array_rand()] and [https://www.php.net/shuffle shuffle()] functions are not cryptographically secure. Instead, the following code based on PHP&#039;s [https://www.php.net/random_int random_int()] provides a better method to choose a random key, value, or slice of an array. (the slice preserves keys)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    private function getRandomKey(array $array)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomKey(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $rand = random_int(0, $size - 1);&lt;br /&gt;
        $slice = array_slice($array, $rand, 1, true);&lt;br /&gt;
        foreach ($slice as $key =&amp;gt; $value) {&lt;br /&gt;
            return $key;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private function getRandomValue(array $array)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomValue(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $rand = random_int(0, $size - 1);&lt;br /&gt;
        $slice = array_slice($array, $rand, 1, true);&lt;br /&gt;
        foreach ($slice as $key =&amp;gt; $value) {&lt;br /&gt;
            return $value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private function getRandomSlice(array $array, int $count)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomSlice(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        if ($count &amp;lt; 1 || $count &amp;gt; $size) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomSlice(): Invalid count $count for array with size $size&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $slice = [];&lt;br /&gt;
        $randUnique = [];&lt;br /&gt;
        while (count($randUnique) &amp;lt; $count) {&lt;br /&gt;
            $rand = random_int(0, $size - 1);&lt;br /&gt;
            if (array_key_exists($rand, $randUnique)) {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
            $randUnique[$rand] = true;&lt;br /&gt;
            $slice += array_slice($array, $rand, 1, true);&lt;br /&gt;
        }&lt;br /&gt;
        return $slice;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== shuffle and cards shuffling ===&lt;br /&gt;
&lt;br /&gt;
To shuffle items, like a pile of cards, the best way is to use the BGA PHP [[Deck]] component and to use &amp;quot;shuffle&amp;quot; method. This ensures that the best available shuffling method is used, and that if in the future we improve it your game will be up to date.&lt;br /&gt;
&lt;br /&gt;
As of now, the Deck component shuffle method is based on PHP &amp;quot;shuffle&amp;quot; method, which has quite good randomness (even if not as good as bga_rand). In consequence, we accept other shuffling methods during reviews, as long as they are based on PHP &amp;quot;shuffle&amp;quot; function (or similar, like &amp;quot;array_rand&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Other methods ===&lt;br /&gt;
&lt;br /&gt;
Mysql &amp;quot;RAND()&amp;quot; function has not enough randomness to be a valid method to get a random element on BGA. This function has been used in some existing games and has given acceptable results, but now it should be avoided and you should use other methods instead.&lt;br /&gt;
&lt;br /&gt;
== Game statistics ==&lt;br /&gt;
&lt;br /&gt;
There are 2 types of statistics:&lt;br /&gt;
* a &amp;quot;player&amp;quot; statistic is a statistic associated to a player&lt;br /&gt;
* a &amp;quot;table&amp;quot; statistic is a statistic not associated to a player (global statistic for this game).&lt;br /&gt;
&lt;br /&gt;
See [[Game statistics: stats.json]] to see how you define statistics for your game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;init(string|array $nameOrNames, int|float|bool $value)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;init(string|array $nameOrNames, int|float|bool $value, bool $updateTableStat = false)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : initStat( $table_or_player, $name, $value)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a statistic entry with a default value.&lt;br /&gt;
&lt;br /&gt;
This method must be called for each statistic of your game, in your setupNewGame method.&lt;br /&gt;
If you neglect to call this for a statistic, and also do not update the value during the course of a certain game using xxxStats-&amp;gt;set or xxxStats-&amp;gt;inc, the value of the stat will be undefined rather than 0. This will result in it being ignored at the end of the game, as if it didn&#039;t apply to that particular game, and excluded from cumulative statistics. As a consequence - if do not want statistic to be applied, do not init it, or call set or inc on it.&lt;br /&gt;
&lt;br /&gt;
&#039;$nameOrNames&#039; is the name of your statistic, as it has been defined in your stats.inc.php file, or an array of those names.&lt;br /&gt;
&lt;br /&gt;
&#039;$value&#039; is the initial value of the statistic.&lt;br /&gt;
&lt;br /&gt;
&#039;updateTableStat&#039; for playerStats initiates the tableStats of the same name, so if you store for example &#039;playedTurns&#039; in both &#039;table&#039; and &#039;player&#039; call only &amp;lt;code&amp;gt;bga-&amp;gt;playerStats-&amp;gt;init(&#039;playedTurns&#039;, 0, true)&amp;lt;/code&amp;gt; and it will init for both &#039;table&#039; and &#039;player&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;set(string $name, int|float|bool $value)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;set(string $name, int|float|bool $value, int $player_id)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;setAll(string $name, int|float|bool $value)&#039;&#039;&#039; (same as set, but for all players at once)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : setStat( $value, $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set a statistic $name to $value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;inc(string $name, int|float $delta)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;inc(string $name, int|float $delta, int $player_id, bool $updateTableStat = false)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;incAll(string $name, int|float $delta)&#039;&#039;&#039; (same as inc, but for all players at once)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : incStat( $delta, $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Increment (or decrement) specified statistic value by $delta value. Same behavior as setStat function, except you cannot increment boolean values. &#039;updateTableStat&#039; will also inc the tableStats of the same name.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;get(string $name): int|float|bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;get(string $name, int $player_id): int|float|bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : getStat( $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Return the value of statistic specified by $name. Useful when creating derivative statistics such as average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;getAll(string $name): array&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Returns the values for all players, as an associative array $player_id =&amp;gt; $value&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
See [[Translations]]&lt;br /&gt;
&lt;br /&gt;
== Manage player scores and Tie breaker ==&lt;br /&gt;
&lt;br /&gt;
=== Normal scoring ===&lt;br /&gt;
&lt;br /&gt;
At the end of the game, players automatically get a rank depending on their score: the player with the biggest score is #1, the player with the second biggest score is #2, and so on...&lt;br /&gt;
&lt;br /&gt;
During the game, you update player&#039;s score using $this-&amp;gt;bga-&amp;gt;playerScore. bga-&amp;gt;playerScore is a [[PlayerCounter and TableCounter|PlayerCounter]], so it has the same methods.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  // +2 points to active player&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;inc($activePlayerId, 2);&lt;br /&gt;
&lt;br /&gt;
  // Set score of active player to 5&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;set($activePlayerId, 5);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tie breaker ===&lt;br /&gt;
&lt;br /&gt;
Tie breaker is used when two players get the same score at the end of a game.&lt;br /&gt;
&lt;br /&gt;
Tie breaker is using $this-&amp;gt;bga-&amp;gt;playerScoreAux. It is updated exactly like $this-&amp;gt;bga-&amp;gt;playerScore. bga-&amp;gt;playerScoreAux is a [[PlayerCounter and TableCounter|PlayerCounter]], so it has the same methods.&lt;br /&gt;
&lt;br /&gt;
Tie breaker score is displayed only for players who are tied at the end of the game. Most of the time, it is not supposed to be displayed explicitly during the game.&lt;br /&gt;
&lt;br /&gt;
When you are using &amp;quot;playerScoreAux&amp;quot; functionality, you must describe the formula to use in your gameinfos.jsonc file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         &amp;quot;tie_breaker_description&amp;quot;: &amp;quot;Describe here your tie breaker formula&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This description will be used as a tooltip to explain to players how this auxiliary score has been calculated.&lt;br /&gt;
&lt;br /&gt;
Note: if you need to need you score_aux to be reverse (lowest value wins), please contact Studio support to get a solution.&lt;br /&gt;
&lt;br /&gt;
See also [https://en.doc.boardgamearena.com/Game_meta-information:_gameinfos.jsonc#Multiple_tie_breaker_management Multiple Tie Breaker Management].&lt;br /&gt;
&lt;br /&gt;
=== Reverse scoring and reverse tie-breaker ===&lt;br /&gt;
&lt;br /&gt;
If your game has a reverse scoring (lowest value wins) or reverse tie-breaker (lowest tie-breaker wins), you need to set-up a GameResult object to tell BGA this specificity.&lt;br /&gt;
&lt;br /&gt;
On your last state (usually EndScore.php), instead of returning 99 to go the end game, return a GameResult. returning a GameResult object in a State class will then go the end game.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use Bga\GameFramework\GameResult\GameResult;&lt;br /&gt;
use Bga\GameFramework\GameResult\Player;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
    public function onEnteringState() {&lt;br /&gt;
        ...&lt;br /&gt;
&lt;br /&gt;
        $playersDb = $this-&amp;gt;game-&amp;gt;getCollectionFromDb(&amp;quot;SELECT * FROM `player`&amp;quot;);&lt;br /&gt;
        $players = Player::fromPlayersDb($playersDb);&lt;br /&gt;
        return GameResult::individualRanking($players, reverseScore: true);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For reverse tie-breaker, it will be `reverseScoreAux: true`.&lt;br /&gt;
&lt;br /&gt;
If your game has running tables with negative scores to handle reverse scoring and you want to use the reverse scoring, add this just before the return line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        if ($this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;getMin() &amp;lt; 0) {&lt;br /&gt;
            foreach ($players as &amp;amp;$player) {&lt;br /&gt;
                $player-&amp;gt;score = -$player-&amp;gt;score;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So game started before the change will reverse the score (negative to positive) before creating the GameResult object.&lt;br /&gt;
And anywhere you change the score, you must continue the way it was started :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $addedPoints = 3;&lt;br /&gt;
        if ($this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;getMin() &amp;lt; 0) {&lt;br /&gt;
            $addedPoints = -$addedPoints;&lt;br /&gt;
        }&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;inc($playerId, $addedPoints);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If there are negative score, the game will continue with negative scores, else it will continue with positive scores.&lt;br /&gt;
&lt;br /&gt;
=== Result neutralization ===&lt;br /&gt;
&lt;br /&gt;
when a player quits a running table, the results of the game will be neutralized (everyone has score set to 1, except the first quitter that will be at 0 and will be ranked last in addition to reputation drop). We cannot keep the ranking among the remaining players, as the quitter being replaced by a zombie might unbalance the rest of the game interaction, for example the player playing just after can get advantages with the situation.&lt;br /&gt;
&lt;br /&gt;
For some games where there is almost no interaction between player, like some roll &amp;amp; write games, there is no real reason to neutralize the game results when a player quits. In that case, you can ask the Studio Support to activate the &amp;quot;Keep ranking on player quit&amp;quot; flag for your game. The zombie mode must be fully functional to allow the game to continue with leavers. Note that the BGA team might refuse to activate it, if it is considered the zombie player will unbalance the results of the remaining players.&lt;br /&gt;
&lt;br /&gt;
When this flag is activated, a player quitting a game will still be penalized, but the ranking you set at the end of the game will stay, and the eliminated player(s) will have their score set to -1. It also means if a second player quits the game, he will also be penalized, because he has no reason to quit and can continue the game. If the game ends with 2 remaining players, it&#039;s now possible for one of them to concede.&lt;br /&gt;
&lt;br /&gt;
To request this mode, click on &amp;quot;Contact us / Support&amp;quot; at the bottom of the page in Studio and then work through to a &amp;quot;My problem has not been solved&amp;quot; and then enter your request. The flag can be set independently in Studio and Production, so make sure to request it for both (unless you just want to experiment in Studio).&lt;br /&gt;
&lt;br /&gt;
Note: the flag will fully work for games started AFTER activation. It may display incorrect messages for games started before the activation but players left after. For this reason, it&#039;s best to request it when going to alpha, else accept some strange bug reports about this situation, that will solve itself when all existing tables are started after the activation.&lt;br /&gt;
&lt;br /&gt;
=== Co-operative game ===&lt;br /&gt;
&lt;br /&gt;
To make everyone win/lose together in a full-coop game:&lt;br /&gt;
&lt;br /&gt;
Add the following in gameinfos.jsonc :&lt;br /&gt;
&amp;quot;is_coop&amp;quot;: 1, // full cooperative&lt;br /&gt;
&lt;br /&gt;
Assign a score of zero to everyone if it&#039;s a loss.&lt;br /&gt;
Assign the same score &amp;gt; 0 to everyone if it&#039;s a win.&lt;br /&gt;
&lt;br /&gt;
=== Semi-coop ===&lt;br /&gt;
&lt;br /&gt;
If the game is not full-coop, then everyone loses = everyone is tied. I.e. set score to 0 to everybody.&lt;br /&gt;
&lt;br /&gt;
=== Only &amp;quot;winners&amp;quot; and &amp;quot;losers&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
For some games, there is only a group (or a single) &amp;quot;winner&amp;quot;, and everyone else is a &amp;quot;loser&amp;quot;, with no &amp;quot;end of game rank&amp;quot; (1st, 2nd, 3rd...).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* Coup&lt;br /&gt;
* Not Alone&lt;br /&gt;
* Werewolves&lt;br /&gt;
* Quantum&lt;br /&gt;
&lt;br /&gt;
In this case:&lt;br /&gt;
* Set the scores so that the winner has the best score, and the other players have the same (lower) score.&lt;br /&gt;
* Add the following lines to gameinfos.jsonc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// If in the game, all losers are equal (no score to rank them or explicit in the rules that losers are not ranked between them), set this to true &lt;br /&gt;
// The game end result will display &amp;quot;Winner&amp;quot; for the 1st player and &amp;quot;Loser&amp;quot; for all other players&lt;br /&gt;
&amp;quot;losers_not_ranked&amp;quot;: true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Werewolves and Coup are implemented like this, as you can see here:&lt;br /&gt;
* https://boardgamearena.com/#!gamepanel?game=werewolves&amp;amp;section=lastresults&lt;br /&gt;
* https://boardgamearena.com/#!gamepanel?game=coupcitystate&amp;amp;section=lastresults&lt;br /&gt;
&lt;br /&gt;
Adding this has the following effects:&lt;br /&gt;
* On game results for this game, &amp;quot;Winner&amp;quot; or &amp;quot;Loser&amp;quot; is going to appear instead of the usual &amp;quot;1st, 2nd, 3rd, ...&amp;quot;.&lt;br /&gt;
* When a game is over, the result of the game will be &amp;quot;End of game: Victory&amp;quot; or &amp;quot;End of game: Defeat&amp;quot; depending on the result of the CURRENT player (instead of the usual &amp;quot;Victory of XXX&amp;quot;).&lt;br /&gt;
* When calculating ELO points, if there is at least one &amp;quot;Loser&amp;quot;, no &amp;quot;victorious&amp;quot; player can lose ELO points, and no &amp;quot;losing&amp;quot; player can win ELO point. Usually it may happened because being tie with many players with a low rank is considered as a tie and may cost you points. If losers_not_ranked is set, we prevent this behavior and make sure you only gain/loss ELO when you get the corresponding results.&lt;br /&gt;
&lt;br /&gt;
Important: this SHOULD NOT be used for cooperative games (see is_coop parameter), or for 2 players games (it makes no sense in this case).&lt;br /&gt;
&lt;br /&gt;
=== Solo ===&lt;br /&gt;
&lt;br /&gt;
If game supports solo variant, a negative or zero score means defeat, a positive score means victory.&lt;br /&gt;
&lt;br /&gt;
=== Player elimination ===&lt;br /&gt;
&lt;br /&gt;
In some games, this is useful to eliminate a player from the game in order he/she can start another game without waiting for the current game end.&lt;br /&gt;
&lt;br /&gt;
This case should be rare. Please don&#039;t use player elimination feature if some player just has to wait the last 10% of the game for game end. This feature should be used only in games where players are eliminated all along the game (typical examples: &amp;quot;Perudo&amp;quot; or &amp;quot;The Werewolves of Miller&#039;s Hollow&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
* In your PHP code:&lt;br /&gt;
  $this-&amp;gt;eliminatePlayer( &amp;lt;player_to_eliminate_id&amp;gt; );&lt;br /&gt;
* Player to eliminate should NOT be active anymore at the end of the action that triggers the eliminatePlayer function.&lt;br /&gt;
* the player is informed in a dialog box that he no longer have to play and can start another game if he/she wants too (with buttons &amp;quot;stay at this table&amp;quot; &amp;quot;quit table and back to main site&amp;quot;). In any case, the player is free to start &amp;amp; join another table from now.&lt;br /&gt;
* When your game is over, all players who have been eliminated before receive a &amp;quot;notification&amp;quot; (the small &amp;quot;!&amp;quot; icon on the top right of the BGA interface) that indicate them that &amp;quot;the game has ended&amp;quot; and invite them to review the game results.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; this should not be used on a player who has already left the game (&amp;quot;zombie&amp;quot;) as leaving/being kicked of the game (outside of the scope of the rules) is not the same as being eliminated from the game (according to the rules), except if in the course of the game, the zombie player is eliminated according to the rules.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; If you eliminate the last player, make sure the action will end by going to the end game state. If it doesn&#039;t, BGA will jump straight to it, without calling your end score state or anything similar.&lt;br /&gt;
&lt;br /&gt;
=== Player concede ===&lt;br /&gt;
&lt;br /&gt;
It should be rarely needed, but if you absolutely need to run some code when a player concedes, you can create a function called onConcede in the Game class like this :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function onConcede() {&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;test&#039;, &#039;Something to do when the player concedes&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to get the conceder id:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function onConcede($concederTeam) {&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;test&#039;, &#039;Something to do when the player concedes &#039;.$concederTeam-&amp;gt;players[0]-&amp;gt;id);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Never change state on this function. It should be limited to computing stats or similar small stuff.&lt;br /&gt;
&lt;br /&gt;
To not break the game end, any exception triggered by this function will be catched and simply logged, so make sure your code stay simple and never trigger an exception and it will be hard to detect!&lt;br /&gt;
&lt;br /&gt;
== Reflexion time ==&lt;br /&gt;
&lt;br /&gt;
; function giveExtraTime( $player_id, $specific_time=null )&lt;br /&gt;
: Give standard extra time to this player in real time game. It does not affect turn based games.&lt;br /&gt;
: Standard extra time (when you don&#039;t pass $specific_time) depends on the speed of the game (small with &amp;quot;slow&amp;quot; game option, bigger with other options).&lt;br /&gt;
: You can also specify an exact time to add, in seconds, with the &amp;quot;specific_time&amp;quot; argument (rarely used). Using $specific_time is not recommended as this does not adjust for the game speed.&lt;br /&gt;
: Important Note: the total reflection time cannot be more than time allowed for the turn. So you can never make it 10 minutes if turn max is 3 min (the max is determined by game speed). As a consequence there is no point adding this at the begging of the turn of in game setup, it only matters after the action which does not lead to turn end (which is when this player becomes inactive).&lt;br /&gt;
: Note: standard extra time is automatically doubled for begginer &lt;br /&gt;
&lt;br /&gt;
    function actionBla($args) {&lt;br /&gt;
        $this-&amp;gt;checkAction(&#039;actionBla&#039;);&lt;br /&gt;
        $playerId = (int)$this-&amp;gt;getActivePlayerId();&lt;br /&gt;
        $this-&amp;gt;giveExtraTime($player_id);&lt;br /&gt;
        // do some inter-turn action&lt;br /&gt;
        $this-&amp;gt;notifyAll(...);&lt;br /&gt;
        // no state transition as this player did an action but stayed active&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;tableOptions-&amp;gt;isTurnBased(): bool&#039;&#039;&#039;&lt;br /&gt;
: Returns true if game is turn based&lt;br /&gt;
:&lt;br /&gt;
; &#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;tableOptions-&amp;gt;isRealTime(): bool&#039;&#039;&#039;&lt;br /&gt;
: Returns true if game is in real time&lt;br /&gt;
&lt;br /&gt;
== Undo moves ==&lt;br /&gt;
&lt;br /&gt;
Please read our [[BGA Undo policy]] before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Before using these methods, you must also add the following to your &amp;quot;gameinfos.inc.php&amp;quot; file, otherwise these methods are ineffective:&lt;br /&gt;
  &#039;db_undo_support&#039; =&amp;gt; true&lt;br /&gt;
&lt;br /&gt;
Note: if you deploy undo support after game is in production this will take into effect for new games only, old games will give user an error if user choses Undo action, but otherwise it should not affect them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; function undoSavepoint( )&lt;br /&gt;
: Save the whole game situation inside an &amp;quot;Undo save point&amp;quot;.&lt;br /&gt;
: There is only ONE undo save point available (see [[BGA Undo policy]]). Cannot use in multiactivate state or in game state where next state is multiactive.&lt;br /&gt;
: Note: this function does not actually do anything when it is called, it only raises the flag to store the database AFTER transaction is over. So the actual state will be saved when you exit the function  calling it (technically before first queued notification is sent, which matters if you transition to game state not to user state after), this may affect what you end up saving.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; function undoRestorePoint()&lt;br /&gt;
: Restore the situation previously saved as an &amp;quot;Undo save point&amp;quot;.&lt;br /&gt;
: You must make sure that the active player is the same after and before the undoRestorePoint (ie: this is your responsibility to ensure that the player that is active when this method is called is exactly the same than the player that was active when the undoSavePoint method has been called).&lt;br /&gt;
&lt;br /&gt;
    function actUndo() {&lt;br /&gt;
        $this-&amp;gt;undoRestorePoint();&lt;br /&gt;
        return PlayTurn::class; // transition to single player state (i.e. beginning of player actions for this turn)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note&#039;&#039;&#039;: if you are reading game state variable right after restore (without changing state first) it won&#039;t work properly as the global table cache is not automatically refreshed after undoRestorePoint(). So you should either change state immediately to refresh game state values, or use $this-&amp;gt;gamestate-&amp;gt;reloadState() to refresh the state. If you choose to do the latest, be aware that this will bring the state machine back to the state during which the save point snapshot has been taken using undoSavepoint().&lt;br /&gt;
&lt;br /&gt;
=== Manually remove game logs ===&lt;br /&gt;
&amp;lt;strong style=&amp;quot;color: red;&amp;quot;&amp;gt;Only use it if you have custom undo and you fully understand how logs and replay works!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;getCurrentMoveId()&lt;br /&gt;
: Returns the current move id, when doing an action, that should be stored along informations to undo.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;remove(int $startMoveId)&lt;br /&gt;
: Remove all logs from a move id that was stored during an action using `getCurrentMoveId()`. &amp;lt;strong&amp;gt;The game should be in the exact same point as it was before the stored action!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        // in the action code, do all the action code, notify it, and store the custom undo&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(UNDO_ACTION, new Undo(&lt;br /&gt;
            movedTiles: $tiles, &lt;br /&gt;
            moveId: $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;getCurrentMoveId(),&lt;br /&gt;
        ));&lt;br /&gt;
&lt;br /&gt;
        return ConfirmAction::class;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO_ACTION);&lt;br /&gt;
        // in the undo action code, do all the revert action code, notify it, then remove the logs&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;remove($undo-&amp;gt;moveId);&lt;br /&gt;
        // don&#039;t do any action/notif after removing the logs&lt;br /&gt;
        return PlayAction::class;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Managing errors and exceptions ==&lt;br /&gt;
&lt;br /&gt;
Note: when you throw an exception, all database changes and all notifications are cancelled immediately. This way, the game situation that existed before the request is completely restored.&lt;br /&gt;
&lt;br /&gt;
; throw new UserException(string|NotificationMessage $message)&lt;br /&gt;
: Base class to notify a user error&lt;br /&gt;
: You must throw this exception when a player wants to do something that they are not allowed to do.&lt;br /&gt;
: The error message will be shown to the player as a &amp;quot;red message&amp;quot;.&lt;br /&gt;
: The error will be displayed to the player, as it&#039;s a UserException, the error message should be translated (with clientranslate(), and if there are args wrap them into a NotificationMessage)&lt;br /&gt;
: Throwing such an exception is NOT considered a bug, so it is not traced in BGA error logs.&lt;br /&gt;
&lt;br /&gt;
Note: if your IDE doesn&#039;t do it for you, you&#039;ll need to add &amp;lt;code&amp;gt;use Bga\GameFramework\UserException;&amp;lt;/code&amp;gt; at the top of your file.&lt;br /&gt;
&lt;br /&gt;
Example from Gomoku:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     throw new UserException(clienttranslate(&amp;quot;There is already a stone on this intersection, you can&#039;t play there&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example with translated UserException using args :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     throw new UserException(new NotificationMessage(clienttranslate(&#039;You must play a card bigger than ${min}&#039;, [min =&amp;gt; $minCardValue])));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; throw new SystemException (string|NotificationMessage $message)&lt;br /&gt;
: Base class to notify a system exception. The message will be hidden from the user, but show in the logs. Use this if the message contains technical information.&lt;br /&gt;
&lt;br /&gt;
; throw new VisibleSystemException (string|NotificationMessage $message)&lt;br /&gt;
: You must throw this exception when you detect something that is not supposed to happened in your code.&lt;br /&gt;
: The error message is shown to the user as an &amp;quot;Unexpected error&amp;quot;, in order that he can report it in the forum.&lt;br /&gt;
: The error message is logged in BGA error logs. &lt;br /&gt;
: it should not be translated, as it&#039;s just to bring debug details to you when the player reports the issue.&lt;br /&gt;
&lt;br /&gt;
== Zombie mode ==&lt;br /&gt;
&lt;br /&gt;
When a player leaves a game for any reason (expelled, quit), he becomes a &amp;quot;zombie player&amp;quot;. You must implement a Zombie that will handle the role of the leaver player&lt;br /&gt;
&lt;br /&gt;
Read [[Zombie Mode|Zombie mode]] to get all details of the expected code.&lt;br /&gt;
&lt;br /&gt;
== User preferences ==&lt;br /&gt;
&#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;userPreferences-&amp;gt;get(int $playerId, int $prefId): ?int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the value of a user preference for a player. It will return the value currently selected in the select combo box, in the top-right menu.&lt;br /&gt;
&lt;br /&gt;
== Player color preferences ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BGA premium users may choose their preferred color for playing. For example, if they are used to play green for every board game, they can select &amp;quot;green&amp;quot; in their BGA preferences page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To test it, you can set your preferred color on your BGA Studio account.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Making your game compatible with colors preferences is very easy and requires only 1 line of configuration change:&lt;br /&gt;
&lt;br /&gt;
On your gameinfos.jsonc file, add the following lines :&lt;br /&gt;
&lt;br /&gt;
  // Favorite colors support: if set to &amp;quot;true&amp;quot;, support attribution of favorite colors based on player&#039;s preferences (see reattributeColorsBasedOnPreferences PHP method)&lt;br /&gt;
  // NB: this parameter is used only to flag games supporting this feature; you must use (or not use) reattributeColorsBasedOnPreferences PHP method to actually enable or disable the feature.&lt;br /&gt;
  &amp;quot;favorite_colors_support&amp;quot;: true,&lt;br /&gt;
&lt;br /&gt;
Then, on your main &amp;lt;your_game&amp;gt;.game.php file check the code of &amp;quot;setupNewGame&amp;quot;. New template already have correct code, but if you editing very old game and it may be absent.&lt;br /&gt;
&lt;br /&gt;
        $gameinfos = $this-&amp;gt;getGameinfos();&lt;br /&gt;
        ...&lt;br /&gt;
        if ($gameinfos[&#039;favorite_colors_support&#039;])&lt;br /&gt;
            $this-&amp;gt;reattributeColorsBasedOnPreferences($players, $gameinfos[&#039;player_colors&#039;]); // this should be above reloadPlayersBasicInfos()&lt;br /&gt;
        $this-&amp;gt;reloadPlayersBasicInfos();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;reattributeColorsBasedOnPreferences&amp;quot; method reattributes all colors, taking into account players color preferences and available colors.&lt;br /&gt;
&lt;br /&gt;
Note that you must update the colors to indicate the colors available for your game.&lt;br /&gt;
&lt;br /&gt;
Some important remarks:&lt;br /&gt;
* for some games (i.e. Chess), the color has an influence on a mechanism of the game, most of the time by giving a special advantage to a player (i.e. Starting the game). Color preference mechanism must NOT be used in such a case.&lt;br /&gt;
* your logic should NEVER consider that the first player has the color X, that the second player has the color Y, and so on. If this is the case, your game will NOT be compatible with reattributeColorsBasedOnPreferences as this method attribute colors to players based on their preferences and not based as their order at the table.&lt;br /&gt;
&lt;br /&gt;
=== Custom color assignments ===&lt;br /&gt;
Some colors don&#039;t play nicely with BGA&#039;s color difference algorithm. If you receive feedback that colors are not well chosen, you can bypass the BGA algorithm by specifying a map from user preference colors to game colors.&lt;br /&gt;
&lt;br /&gt;
For example, you may wish to assign BGA&#039;s blue to your game&#039;s baby blue: &amp;lt;code&amp;gt;&amp;quot;0000ff&amp;quot; /* Blue */ =&amp;gt; &amp;quot;89CFF0&amp;quot;,&amp;lt;/code&amp;gt; whereas otherwise, a deep purple might be chosen instead. Just be sure that the assigned colors are also present in the &amp;lt;code&amp;gt;player_colors&amp;lt;/code&amp;gt; array passed to &amp;lt;code&amp;gt;reattributeColorsBasedOnPreferences&amp;lt;/code&amp;gt;, otherwise the assignment will be ignored.&lt;br /&gt;
&lt;br /&gt;
To do this, implement this method in your &amp;lt;code&amp;gt;X.game.php&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
Note: the user preference colors (the keys in the returned array) should not be modified, or the code may not work as expected. These are the colors players can choose between in their profile.&lt;br /&gt;
     /**&lt;br /&gt;
      * Returns an array of user preference colors to game colors.&lt;br /&gt;
      * Game colors must be among those which are passed to reattributeColorsBasedOnPreferences()&lt;br /&gt;
      * Each game color can be an array of suitable colors, or a single color:&lt;br /&gt;
      * [&lt;br /&gt;
      *    // The first available color chosen:&lt;br /&gt;
      *    &#039;ff0000&#039; =&amp;gt; [&#039;990000&#039;, &#039;aa1122&#039;],&lt;br /&gt;
      *    // This color is chosen, if available&lt;br /&gt;
      *    &#039;0000ff&#039; =&amp;gt; &#039;000099&#039;,&lt;br /&gt;
      * ]&lt;br /&gt;
      * If no color can be matched from this array, then the default implementation is used.&lt;br /&gt;
      */&lt;br /&gt;
     function getSpecificColorPairings(): array {&lt;br /&gt;
         return array(&lt;br /&gt;
             &amp;quot;ff0000&amp;quot; /* Red */         =&amp;gt; null,&lt;br /&gt;
             &amp;quot;008000&amp;quot; /* Green */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;0000ff&amp;quot; /* Blue */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;ffa500&amp;quot; /* Yellow */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;000000&amp;quot; /* Black */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;ffffff&amp;quot; /* White */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;e94190&amp;quot; /* Pink */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;982fff&amp;quot; /* Purple */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;72c3b1&amp;quot; /* Cyan */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;f07f16&amp;quot; /* Orange */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;bdd002&amp;quot; /* Khaki green */ =&amp;gt; null,&lt;br /&gt;
             &amp;quot;7b7b7b&amp;quot; /* Gray */        =&amp;gt; null,&lt;br /&gt;
         );&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
== Legacy games API ==&lt;br /&gt;
&lt;br /&gt;
For some very specific games (&amp;quot;legacy&amp;quot;, &amp;quot;campaign&amp;quot;), you need to keep some informations from a game to another.&lt;br /&gt;
&lt;br /&gt;
This should be an exceptional situation: the legacy API is costing resources on Board Game Arena databases, and is slowing down the game setup process + game end of game process. Please do not use it for things like:&lt;br /&gt;
* keeping a player preference/settings (=&amp;gt; player preferences and game options should be used instead)&lt;br /&gt;
* keeping a statistics, a score, or a ranking, while it is not planned in the physical board game, or while there is no added value compared to BGA statistics / rankings.&lt;br /&gt;
&lt;br /&gt;
You should use it for:&lt;br /&gt;
* legacy games: when some components of the game has been altered in a previous game and should be kept as it is.&lt;br /&gt;
* &amp;quot;campaign style&amp;quot; games: when a player is getting a &amp;quot;reward&amp;quot; at the end of a game, and should be able to use it in further games.&lt;br /&gt;
&lt;br /&gt;
Important: you cannot store more than 64k of data (serialized as JSON) per player per game. If you go over 64k, storeLegacyData function is going to FAIL, and there is a risk to create a major bug (= players blocked) in your game. You MUST make sure that no more than 64k of data is used for each player for your game. For example, if you are implementing a &amp;quot;campaign style&amp;quot; game and if you allow a player to start multiple campaign, you must LIMIT the number of different campaign so that the total data size to not go over the limit. We strongly recommend you to use this:&lt;br /&gt;
&lt;br /&gt;
  try &lt;br /&gt;
  {&lt;br /&gt;
  	$this-&amp;gt;bga-&amp;gt;legacy-&amp;gt;setTeam( $my_data );&lt;br /&gt;
  }&lt;br /&gt;
  catch( \feException $e ) // \feException is a base class of \BgaSystemException and others...&lt;br /&gt;
  {&lt;br /&gt;
  	if( $e-&amp;gt;getCode() == FEX_legacy_size_exceeded )&lt;br /&gt;
  	{&lt;br /&gt;
  		// Do something here to free some space in Legacy data (ex: by removing some variables)&lt;br /&gt;
  	}&lt;br /&gt;
  	else&lt;br /&gt;
  		throw $e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
The keys may only contain letters and numbers, underscore seems not to be allowed.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;set(string $key, int $playerId, mixed $value, int $ttl = 365)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;storeLegacyData($player_id, $key, $data, $ttl = 365) )&lt;br /&gt;
: Store some data associated with $key for the given user / current game&lt;br /&gt;
: In the opposite of all other game data, this data will PERSIST after the end of this table, and can be re-used&lt;br /&gt;
: in a future table with the same game.&lt;br /&gt;
: IMPORTANT: The only possible place where you can use this method is when the game is over at your table (last game action). Otherwise, there is a risk of conflicts between ongoing games.    &lt;br /&gt;
: TTL is a time-to-live: the maximum, and default, is 365 days.&lt;br /&gt;
: In any way, the total data (= all keys) you can store for a given user+game is 64k (note: data is store serialized as JSON data)&lt;br /&gt;
: NOTICE: You can store some persistant data across all tables from your game using the specific player_id 0 which is unused. In such case, it&#039;s even more important to manage correctly the size of your data to avoid any exception or issue while storing updated data (ie. you can use this for some kind of leaderbord for solo game or contest)&lt;br /&gt;
: Note: This function cannot be called during game setup (will throw an error).&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;get(string $key, int $playerId, mixed $defaultValue = null)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;retrieveLegacyData($player_id, $key) ⚠️ this alias was returning a JSON-encoded value, while the get function returns the real value )&lt;br /&gt;
: Get data associated with $key for the current game&lt;br /&gt;
: This data is common to ALL tables from the same game for this player, and persist from one table to another.&lt;br /&gt;
: Note: calling this function has an important cost =&amp;gt; please call it few times (possibly: only ONCE) for each player for 1 game if possible&lt;br /&gt;
: Note: you can use &#039;%&#039; in $key to retrieve all keys matching the given patterns&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;delete(string $key, int $playerId)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;removeLegacyData($player_id, $key) )&lt;br /&gt;
: Remove some legacy data with the given key&lt;br /&gt;
: (useful to free some data to avoid going over 64k)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;setTeam(mixed $value, int $ttl = 365)&lt;br /&gt;
: ( deprecated alias: storeLegacyTeamData( $data, $ttl = 365 ) )&lt;br /&gt;
: Same as storeLegacyData, except that it stores some data for the whole team within the current table and does not use a key&lt;br /&gt;
: Ie: if players A, B and C are at a table, the legacy data will be saved for future table with (exactly) A, B and C on the table.&lt;br /&gt;
: This is useful for games which are intended to be played several time by the same team.&lt;br /&gt;
: Note: the data total size is still limited, so you must implement catch the FEX_legacy_size_exceeded exception if it happens&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;getTeam(mixed $defaultValue = null)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;retrieveLegacyData() ⚠️ this alias was returning a JSON-encoded value, while the getTeam function returns the real value )&lt;br /&gt;
: Same as retrieveLegacyData, except that it retrieves some data for the whole team within the current table (set by storeLegacyTeamData)&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;deleteTeam()&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;removeLegacyTeamData() )&lt;br /&gt;
: Same as removeLegacyData, except that it retrieves some data for the whole team within the current table (set by storeLegacyTeamData)&lt;br /&gt;
&lt;br /&gt;
== Players text input and moderation ==&lt;br /&gt;
This section concerns only games where the players have to write some words to play: games based on words, like &amp;quot;Just one&amp;quot; or &amp;quot;Codenames&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some players will use your game to write insults or profanities. As this is part of the game and not in the game chat, these words cannot be reported by players and moderated.&lt;br /&gt;
&lt;br /&gt;
If you met the following situation:&lt;br /&gt;
&lt;br /&gt;
* You are asking a player to type a text (word(s) or sentence)&lt;br /&gt;
* The player can enter any text (this is not a pre-selection or anything you can control)&lt;br /&gt;
* This text is visible by at least one other player&lt;br /&gt;
&lt;br /&gt;
Then, you must use the following method:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;function logTextForModeration( $player_id, $text )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
player_id = player who write the text&lt;br /&gt;
&lt;br /&gt;
text = text that has been written&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This function will have no visible consequence for your game, but will allow players to report the text to moderators if something happens.&lt;br /&gt;
&lt;br /&gt;
== Tournament API (🚧 Beta) ==&lt;br /&gt;
&lt;br /&gt;
The Tournament API is meant only for tournament encounters. It lets you persist per‑player data within a tournament and access deterministic seeds shared by all encounters of a tournament step.&lt;br /&gt;
&lt;br /&gt;
Do not use this for preferences or long‑term progression: if a table is not linked to a tournament, these requests will fail, and all tournament data is wiped when the tournament ends anyway.&lt;br /&gt;
&lt;br /&gt;
You can use it for:&lt;br /&gt;
* enforcing tournament‑wide constraints (ex: keep the same deck across all rounds)&lt;br /&gt;
* deterministic setup shared across a tournament step (ex: generate the same map layout for all encounters in a step)&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;isTournament()&lt;br /&gt;
: Returns true if this table is a tournament encounter.&lt;br /&gt;
: Use this to guard tournament‑only logic.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;getSeedInfo()&lt;br /&gt;
: Returns an associative array containing deterministic seeds for tournament encounters.&lt;br /&gt;
: Keys:&lt;br /&gt;
:* &amp;lt;code&amp;gt;tournament_seed&amp;lt;/code&amp;gt;: stable across the whole tournament.&lt;br /&gt;
:* &amp;lt;code&amp;gt;step_seed&amp;lt;/code&amp;gt;: stable across a tournament step (same for all encounters in that step).&lt;br /&gt;
:* &amp;lt;code&amp;gt;parent_tournament_seed&amp;lt;/code&amp;gt;: stable across the parent tournament (the reference tournament for sub-tournaments of Groups Stage tournament mode).&lt;br /&gt;
:&lt;br /&gt;
: Note: This call is already guarded internally, no external call is made unless the table is a tournament encounter.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;storePlayerGameData(int $playerId, string $key, mixed $data)&lt;br /&gt;
: Store per‑player game data for the current tournament.&lt;br /&gt;
: Data is JSON‑encoded automatically.&lt;br /&gt;
: The cumulative size of all data stored for a player in a tournament (even over multiple keys) is limited to 64 KiB.&lt;br /&gt;
: Keys must be 1–16 characters and letters/numbers only.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;retrievePlayerGameData(int $playerId, string $key)&lt;br /&gt;
: Retrieve per‑player game data for the current tournament.&lt;br /&gt;
: If `$key` contains &#039;%&#039;, returns an array of key =&amp;gt; value pairs (or [] if no match).&lt;br /&gt;
: Otherwise, returns a single value (or null if no match).&lt;br /&gt;
: Returned values are JSON‑decoded automatically.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;removePlayerGameData(int $playerId, string $key)&lt;br /&gt;
: Remove per‑player game data for the current tournament.&lt;br /&gt;
: You can use &#039;%&#039; in `$key` to remove multiple entries at once.&lt;br /&gt;
: All tournament data is removed automatically when the tournament is finished.&lt;br /&gt;
&lt;br /&gt;
== Language dependent games API ==&lt;br /&gt;
&lt;br /&gt;
This API is used for games that are heavily language dependent. Two most common use cases are:&lt;br /&gt;
* Games that have a language dependent component that are not necessarily translatable, typically a list of words. (Think of games like Codenames, Decrypto, Just One...)&lt;br /&gt;
* Games with massive communication where players would like to ensure that all participants speak the same language. (Think of games like Werewolf, The Resistance, maybe even dixit...)&lt;br /&gt;
&lt;br /&gt;
If this option is used, the table created will be limited only to users that have specific language in their profile. Player starting the game would be able to chose one of the languages they speak.&lt;br /&gt;
&lt;br /&gt;
There is a new property language_dependency in gameinfos.jsonc which can be set like this:&lt;br /&gt;
  &amp;quot;language_dependency&amp;quot;: false,  //or if the property is missing, the game is not language dependent&lt;br /&gt;
  &amp;quot;language_dependency&amp;quot;: true, //all players at the table must speak the same language&lt;br /&gt;
  &amp;quot;language_dependency&amp;quot;: { &amp;quot;1&amp;quot;: &amp;quot;en&amp;quot;, &amp;quot;2&amp;quot;: &amp;quot;fr&amp;quot;, &amp;quot;3&amp;quot;: &amp;quot;it&amp;quot; }, //1-based list of supported languages&lt;br /&gt;
&lt;br /&gt;
In the gamename.game.php file, you can get the id of selected language with the method &#039;&#039;&#039;getGameLanguage&#039;&#039;&#039;.&lt;br /&gt;
; function getGameLanguage()&lt;br /&gt;
: Returns an index of the selected language as defined in gameinfos.jsonc.&lt;br /&gt;
&lt;br /&gt;
Languages currently available on BGA are:&lt;br /&gt;
  &#039;ar&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;العربية&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ar_AE&#039; ),             // Arabic&lt;br /&gt;
  &#039;be&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;беларуская мова&amp;quot;, &#039;code&#039; =&amp;gt; &#039;be_BY&#039; ),     // Belarusian&lt;br /&gt;
  &#039;bn&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;বাংলা&amp;quot;, &#039;code&#039; =&amp;gt; &#039;bn_BD&#039; ),                // Bengali&lt;br /&gt;
  &#039;bg&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;български език&amp;quot;, &#039;code&#039; =&amp;gt; &#039;bg_BG&#039; ),      // Bulgarian&lt;br /&gt;
  &#039;ca&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;català&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ca_ES&#039; ),              // Catalan&lt;br /&gt;
  &#039;cs&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;čeština&amp;quot;, &#039;code&#039; =&amp;gt; &#039;cs_CZ&#039; ),             // Czech&lt;br /&gt;
  &#039;da&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;dansk&amp;quot;, &#039;code&#039; =&amp;gt; &#039;da_DK&#039; ),               // Danish&lt;br /&gt;
  &#039;de&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;deutsch&amp;quot;, &#039;code&#039; =&amp;gt; &#039;de_DE&#039; ),             // German&lt;br /&gt;
  &#039;el&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Ελληνικά&amp;quot;, &#039;code&#039; =&amp;gt; &#039;el_GR&#039; ),            // Greek&lt;br /&gt;
  &#039;en&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;English&amp;quot;, &#039;code&#039; =&amp;gt; &#039;en_US&#039; ),             // English&lt;br /&gt;
  &#039;es&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;español&amp;quot;, &#039;code&#039; =&amp;gt; &#039;es_ES&#039; ),             // Spanish&lt;br /&gt;
  &#039;et&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;eesti keel&amp;quot;, &#039;code&#039; =&amp;gt; &#039;et_EE&#039; ),          // Estonian       &lt;br /&gt;
  &#039;fi&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;suomi&amp;quot;, &#039;code&#039; =&amp;gt; &#039;fi_FI&#039; ),               // Finnish&lt;br /&gt;
  &#039;fr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;français&amp;quot;, &#039;code&#039; =&amp;gt; &#039;fr_FR&#039; ),            // French&lt;br /&gt;
  &#039;he&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;עברית&amp;quot;, &#039;code&#039; =&amp;gt; &#039;he_IL&#039; ),               // Hebrew       &lt;br /&gt;
  &#039;hi&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;हिन्दी&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hi_IN&#039; ),                 // Hindi&lt;br /&gt;
  &#039;hr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Hrvatski&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hr_HR&#039; ),            // Croatian&lt;br /&gt;
  &#039;hu&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;magyar&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hu_HU&#039; ),              // Hungarian&lt;br /&gt;
  &#039;id&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Bahasa Indonesia&amp;quot;, &#039;code&#039; =&amp;gt; &#039;id_ID&#039; ),    // Indonesian&lt;br /&gt;
  &#039;ms&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Bahasa Malaysia&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ms_MY&#039; ),     // Malaysian&lt;br /&gt;
  &#039;it&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;italiano&amp;quot;, &#039;code&#039; =&amp;gt; &#039;it_IT&#039; ),            // Italian&lt;br /&gt;
  &#039;ja&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;日本語&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ja_JP&#039; ),               // Japanese&lt;br /&gt;
  &#039;jv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Basa Jawa&amp;quot;, &#039;code&#039; =&amp;gt; &#039;jv_JV&#039; ),           // Javanese                       &lt;br /&gt;
  &#039;ko&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;한국어&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ko_KR&#039; ),               // Korean&lt;br /&gt;
  &#039;lt&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;lietuvių&amp;quot;, &#039;code&#039; =&amp;gt; &#039;lt_LT&#039; ),            // Lithuanian&lt;br /&gt;
  &#039;lv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;latviešu&amp;quot;, &#039;code&#039; =&amp;gt; &#039;lv_LV&#039; ),            // Latvian&lt;br /&gt;
  &#039;nl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;nederlands&amp;quot;, &#039;code&#039; =&amp;gt; &#039;nl_NL&#039; ),          // Dutch&lt;br /&gt;
  &#039;no&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;norsk&amp;quot;, &#039;code&#039; =&amp;gt; &#039;nb_NO&#039; ),               // Norwegian&lt;br /&gt;
  &#039;oc&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;occitan&amp;quot;, &#039;code&#039; =&amp;gt; &#039;oc_FR&#039; ),             // Occitan&lt;br /&gt;
  &#039;pl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;polski&amp;quot;, &#039;code&#039; =&amp;gt; &#039;pl_PL&#039; ),              // Polish&lt;br /&gt;
  &#039;pt&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;português&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;pt_PT&#039; ),          // Portuguese&lt;br /&gt;
  &#039;ro&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;română&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;ro_RO&#039;  ),            // Romanian&lt;br /&gt;
  &#039;ru&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Русский язык&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ru_RU&#039; ),        // Russian&lt;br /&gt;
  &#039;sk&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;slovenčina&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sk_SK&#039; ),          // Slovak&lt;br /&gt;
  &#039;sl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;slovenščina&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sl_SI&#039; ),         // Slovenian       &lt;br /&gt;
  &#039;sr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Српски&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sr_RS&#039; ),              // Serbian       &lt;br /&gt;
  &#039;sv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;svenska&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sv_SE&#039; ),             // Swedish&lt;br /&gt;
  &#039;tr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Türkçe&amp;quot;, &#039;code&#039; =&amp;gt; &#039;tr_TR&#039; ),              // Turkish       &lt;br /&gt;
  &#039;uk&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Українська мова&amp;quot;, &#039;code&#039; =&amp;gt; &#039;uk_UA&#039; ),     // Ukrainian&lt;br /&gt;
  &#039;zh&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;中文 (漢)&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;zh_TW&#039; ),           // Traditional Chinese (Hong Kong, Macau, Taiwan)&lt;br /&gt;
  &#039;zh-cn&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;中文 (汉)&amp;quot;, &#039;code&#039; =&amp;gt; &#039;zh_CN&#039; ),         // Simplified Chinese (Mainland China, Singapore)&lt;br /&gt;
&lt;br /&gt;
== Debugging and Tracing ==&lt;br /&gt;
&lt;br /&gt;
To debug php code you can use some tracing functions available from the parent class such as debug, trace, error, warn, dump.&lt;br /&gt;
  &lt;br /&gt;
  $this-&amp;gt;debug(&amp;quot;Ahh!&amp;quot;);&lt;br /&gt;
  $this-&amp;gt;dump(&#039;my_var&#039;,$my_var);&lt;br /&gt;
&lt;br /&gt;
See [[Practical_debugging]] section for complete information about debugging interfaces and where to find logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getBgaEnvironment(): string&#039;&#039;&#039;&lt;br /&gt;
:Returns &amp;quot;studio&amp;quot; for studio and &amp;quot;prod&amp;quot; for production environment (i.e. where games current runs). Only useful for debbugging hooks.&lt;br /&gt;
Note: alpha server is also &amp;quot;prod&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Creating other classes ==&lt;br /&gt;
&lt;br /&gt;
You can create other classes in the &amp;lt;code&amp;gt;modules/php&amp;lt;/code&amp;gt; dir, next to your &amp;lt;code&amp;gt;Game.php&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
If they are names following the PSR-4, they will be autoloaded by BGA (no require_once needed). This doesn&#039;t work for the &amp;quot;legacy way&amp;quot; (=&amp;lt;code&amp;gt;YourGameName.game.php&amp;lt;/code&amp;gt; at the game root dir).&lt;br /&gt;
&lt;br /&gt;
For example, writing &amp;lt;code&amp;gt;new ScoreManager()&amp;lt;/code&amp;gt; in your Game file will try to load the class &amp;lt;code&amp;gt;ScoreManager&amp;lt;/code&amp;gt; of namespace &amp;lt;code&amp;gt;Bga\Games\YourGameName&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;modules/php/ScoreManager.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to add namespace &amp;lt;code&amp;gt;Bga\Games\YourGameName;&amp;lt;/code&amp;gt; at the beginning of your module.&lt;br /&gt;
&lt;br /&gt;
You can even put these classes in sublevels : the class &amp;lt;code&amp;gt;Bga\Games\YourGameName\Cards\StandardCard&amp;lt;/code&amp;gt; will be automatically loaded if it is stored in &amp;lt;code&amp;gt;modules/php/Cards/StandardCard.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Main_game_logic:_Game.php&amp;diff=29775</id>
		<title>Main game logic: Game.php</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Main_game_logic:_Game.php&amp;diff=29775"/>
		<updated>2026-05-08T11:32:55Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Sending private data to some players */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
This is the main file for your game logic. Here you initialize the game, persist data, implement the rules and notify the client interface of changes.&lt;br /&gt;
&lt;br /&gt;
This is the main  class that implements the &amp;quot;server&amp;quot; callbacks. As it is a server it cannot initiate any data communicate with the game client (running in browser) and only can respond to client using notifications.&lt;br /&gt;
&lt;br /&gt;
Your php class instance won&#039;t be in memory between two callbacks, every time client send a request a new class will be created, constructor will be called and eventually your callback function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this file is now named Game.php, located in the modules/php directory. If you see it named yourgamename.game.php in the root dir, it&#039;s the legacy usage. In the legacy usage, the namepaces don&#039;t exists.&lt;br /&gt;
&lt;br /&gt;
== File Structure ==&lt;br /&gt;
&lt;br /&gt;
The details of how the file is structured are described directly with comments in the code skeleton provided to you.&lt;br /&gt;
 &lt;br /&gt;
Here is the basic structure:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;__construct&#039;&#039;&#039;: the game constructor, where you define global variables and initiaze class members.&lt;br /&gt;
* &#039;&#039;&#039;setupNewGame&#039;&#039;&#039;: initial setup of the game. Takes an array of players, indexed by player_id. Structure of each player includes player_name, player_canal, player_avatar, and flags indicating admin/ai/premium/order/language/beginner.&lt;br /&gt;
* &#039;&#039;&#039;getAllDatas&#039;&#039;&#039;: where you retrieve all game data during a complete reload of the game. Return value must be associative array. Value of &#039;players&#039; is reserved for returning players data from players table, if you set it it must follow certain rules &lt;br /&gt;
        $result [&#039;players&#039;] = $this-&amp;gt;getCollectionFromDb(&amp;quot;SELECT `player_id` `id`, `player_score` `score`, `player_no` `no`, `player_color` `color` FROM `player`&amp;quot;);&lt;br /&gt;
        // Returned value must include [&#039;players&#039;][$player_id]][&#039;score&#039;] for scores to populate when F5 is pressed.&lt;br /&gt;
getAllDatas accepts a magic parameter &amp;lt;code&amp;gt;int $currentPlayerId&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;int $currentPlayerNo&amp;lt;/code&amp;gt;) to fetch the information from the point of view of the current player id (or no). It should not have any other parameter.&lt;br /&gt;
* &#039;&#039;&#039;getGameProgression&#039;&#039;&#039;: where you compute the game progression indicator. Returns a number indicating percent of progression (0-100). Used to calculate ELO changes of remaining players when a player quits, or as a conceding requirement (in non-tournament 2 player games, a player may concede if the progression is at least 50%).&lt;br /&gt;
* Utility functions: your utility functions.&lt;br /&gt;
* Player actions: the entry points for players actions ([https://en.doc.boardgamearena.com/Players_actions:_yourgamename.action.php more info here]). &lt;br /&gt;
* Game state arguments: methods to return additional data on specific game states ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#args more info here]).&lt;br /&gt;
* Game state actions: the logic to run when entering a new game state ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#action more info here]).&lt;br /&gt;
* &#039;&#039;&#039;initTable&#039;&#039;&#039;: (not part of template) - this function is called for every php callback by the framework and it can be implement by the game (empty by default). You can use it in rare cases where you need to read database and manipulate some data before any ANY php entry functions are called (such as getAllDatas,action*,st*, etc). Note: it is not called before arg* methods &lt;br /&gt;
* &#039;&#039;&#039;zombieTurn&#039;&#039;&#039;: what to do it&#039;s the turn of a zombie player.&lt;br /&gt;
* &#039;&#039;&#039;upgradeTableDb&#039;&#039;&#039;: function to migrate database if you change it after release on production.&lt;br /&gt;
* &#039;&#039;&#039;getGameName&#039;&#039;&#039;: returns the game name. This will be setup when you create the project. If you are copying files in from another project, make sure you keep this function intact. It must return the right game name, or lots of things will be broken.&lt;br /&gt;
&lt;br /&gt;
== Accessing player information ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: In the following methods, be mindful of the difference between the &amp;quot;active&amp;quot; player and the &amp;quot;current&amp;quot; player. The &#039;&#039;&#039;active&#039;&#039;&#039; player is the player whose turn it is - not necessarily the player who sent a request! The &#039;&#039;&#039;current&#039;&#039;&#039; player is the player who sent the request and will see the results returned by your methods: not necessarily the player whose turn it is!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; getPlayerCount() (or getPlayersNumber() that is an alias )&lt;br /&gt;
: Returns the number of players playing at the table&lt;br /&gt;
: Note: doesn&#039;t work in the beggining of setupNewGame (use count($players) instead). It will work after initialization of player table.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;getActivePlayerId(): string&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot;, whatever what is the current state type.&lt;br /&gt;
: Note: it does NOT mean that this player is active right now, because state type could be &amp;quot;game&amp;quot; or &amp;quot;multiplayer&amp;quot;&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in getArgs / onEnteringState / act functions, and shouldn&#039;t be needed anywhere else.&lt;br /&gt;
&lt;br /&gt;
; getActivePlayerName()&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot; name&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
&lt;br /&gt;
; getPlayerNameById($player_id)&lt;br /&gt;
: Get the name by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerNameByNo($playerNo)&lt;br /&gt;
: Get the name by no&lt;br /&gt;
&lt;br /&gt;
; getPlayerColorById($player_id)&lt;br /&gt;
: Get the color by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerNoById($player_id)&lt;br /&gt;
: Get &#039;player_no&#039; (number) by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerIdByNo(int $playerNo) int&lt;br /&gt;
: Get the player id by player no.&lt;br /&gt;
&lt;br /&gt;
; loadPlayersBasicInfos()&lt;br /&gt;
: Get an associative array with generic data about players (ie: not game specific data).&lt;br /&gt;
: The key of the associative array is the player id. The returned table is cached, so ok to call multiple times without performance concerns.&lt;br /&gt;
: The content of each value is:&lt;br /&gt;
: * player_name - the name of the player&lt;br /&gt;
: * player_color (ex: ff0000) - the color code of the player (as string)&lt;br /&gt;
: * player_no - the position of the player at the start of the game in natural table order, i.e. 1,2,3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                $players = $this-&amp;gt;loadPlayersBasicInfos();&lt;br /&gt;
                foreach ($players as $player_id =&amp;gt; $info) {&lt;br /&gt;
                    $player_color = $info[&#039;player_color&#039;];&lt;br /&gt;
                    ...&lt;br /&gt;
                }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: if you want array of player ids only you can do this:&lt;br /&gt;
    $player_ids =  array_keys($this-&amp;gt;loadPlayersBasicInfos());  &lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerId(bool $bReturnNullIfNotLogged = false) string&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot;. The current player is the one from which the action originated (the one who sent the request).&lt;br /&gt;
: &#039;&#039;&#039;Be careful&#039;&#039;&#039;: This is not necessarily the active player!&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in act functions, and also in getAllDatas, and shouldn&#039;t be needed anywhere.&lt;br /&gt;
: &#039;&#039;&#039;Very important&#039;&#039;&#039;: in your setupNewGame and zombieTurn function, you must never use getCurrentPlayerId() or getCurrentPlayerName(), &lt;br /&gt;
: otherwise it will fail with a &amp;quot;Not logged&amp;quot; error message (these actions are triggered from the main site and propagated to the gameserver from a server, not from a browser. As a consequence, there is no current player associated to these actions).&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerName(bool $bReturnEmptyIfNotLogged = false) string&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; name. &lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Can be easily replaced by $this-&amp;gt;getPlayerNameById($currentPlayerId);&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerColor()&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; color. &lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Can be easily replaced by $this-&amp;gt;getPlayerColorById($currentPlayerId);&lt;br /&gt;
&lt;br /&gt;
; isCurrentPlayerZombie()&lt;br /&gt;
: Check the &amp;quot;current_player&amp;quot; zombie status. If true, player is zombie, i.e. left or was kicked out of the game.&lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Should never be needed, zombie players should behave like real players, and everything specific to zombie should be set in the zombie method only.&lt;br /&gt;
&lt;br /&gt;
; isSpectator()&lt;br /&gt;
: Check the &amp;quot;current_player&amp;quot; spectator status. If true, the user accessing the game is a spectator (not part of the game). For this user, the interface should display all public information, and no private information (like a friend sitting at the same table as players and just spectating the game).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For player score and tiebreaker, see [[Main game logic: Game.php#Manage player scores and Tie breaker]]&lt;br /&gt;
&lt;br /&gt;
== Accessing the database ==&lt;br /&gt;
&lt;br /&gt;
The main game logic should be the only point from which you should access the game database. You access your database using SQL queries with the methods below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BGA uses [http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-transactions.html database transactions]. This means that your database changes WON&#039;T BE APPLIED to the database until your request ends normally (web request, not database request). Using transactions is in fact very useful for you; at any time, if your game logic detects that something is wrong (example: a disallowed move), you just have to throw an exception and all changes to the game situation will be removed. This also means that you need not (and in fact cannot) use your own transactions for multiple related database operations.&lt;br /&gt;
&lt;br /&gt;
However there are sets of database operation that will do implicit commit (most common mistake is to use &amp;quot;TRUNCATE&amp;quot;), you cannot use these operations during the game, it breaks the unrolling of transactions and will lead to nasty issues&lt;br /&gt;
(https://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit).&lt;br /&gt;
&lt;br /&gt;
All methods below are part of game class (and view class) and can be accessed using $this-&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; DbQuery( string $sql )&lt;br /&gt;
: This is the generic method to access the database.&lt;br /&gt;
: It can execute any type of SELECT/UPDATE/DELETE/REPLACE/INSERT query on the database. Returns result of the query.&lt;br /&gt;
: For SELECT queries, the specialized methods below are much better.&lt;br /&gt;
: Do not use method for TRUNCATE, DROP and other table altering operations. See disclamer above about implicit commits. If you really need TRUNCATE use DELETE FROM xxx instead.&lt;br /&gt;
&lt;br /&gt;
; getUniqueValueFromDB( string $sql )&lt;br /&gt;
: Returns a unique value from DB or null if no value is found.&lt;br /&gt;
: $sql must be a SELECT query.&lt;br /&gt;
: Raise an exception if more than 1 row is returned.&lt;br /&gt;
&lt;br /&gt;
; getCollectionFromDB( string $sql, bool $bSingleValue=false ) array&lt;br /&gt;
: Returns an associative array of rows for a sql SELECT query.&lt;br /&gt;
: The key of the resulting associative array is the first field specified in the SELECT query.&lt;br /&gt;
: The value of the resulting associative array is an associative array with all the field specified in the SELECT query and associated values.&lt;br /&gt;
: First column must be a primary or alternate key (semantically, it does not actually have to declared in sql as such).&lt;br /&gt;
: The resulting collection can be empty (it won&#039;t be null).&lt;br /&gt;
: If you specified $bSingleValue=true and if your SQL query requests 2 fields A and B, the method returns an associative array &amp;quot;A=&amp;gt;B&amp;quot;, otherwise its A=&amp;gt;[A,B]&lt;br /&gt;
: Note: The name a bit misleading, it really return associative array, i.e. map and NOT a collection. You cannot use it to get list of values which may have duplicates (hence primary key requirement on first column). If you need simple array use getObjectListFromDB() method.&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getCollectionFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player`&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 1234 =&amp;gt; [ &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ],&lt;br /&gt;
 1235 =&amp;gt; [ &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 ]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getCollectionFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name` FROM `player`&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 1234 =&amp;gt; &#039;myuser0&#039;,&lt;br /&gt;
 1235 =&amp;gt; &#039;myuser1&#039;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyCollectionFromDB(string $sql) array&lt;br /&gt;
: Same as getCollectionFromDB($sdl), but raise an exception if the collection is empty. Note: this function does NOT have 2nd argument as previous one does.&lt;br /&gt;
&lt;br /&gt;
; getObjectFromDB(string $sql) array&lt;br /&gt;
: Returns one row for the sql SELECT query as an associative array or null if there is no result (where fields are keys mapped to values)&lt;br /&gt;
: Raise an exception if the query return more than one row (you can use LIMIT 1 in the query to avoid the exception)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player` WHERE `player_id` = &#039;$player_id&#039;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
  &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 &lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyObjectFromDB(string $sql) array&lt;br /&gt;
: Similar to previous one, but raise an exception if no row is found&lt;br /&gt;
&lt;br /&gt;
; getObjectListFromDB(string $sql, bool $bUniqueValue=false) array&lt;br /&gt;
: Return an array of rows for a sql SELECT query.&lt;br /&gt;
: The result is the same as &amp;quot;getCollectionFromDB&amp;quot; except that the result is a simple array (and not an associative array).&lt;br /&gt;
: The result can be empty.&lt;br /&gt;
: If you specified $bUniqueValue=true and if your SQL query request 1 field, the method returns directly an array of values.&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectListFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player`&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 [ &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ],&lt;br /&gt;
 [ &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 ]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectListFromDB( &amp;quot;SELECT `player_name` `name` FROM `player`&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 &#039;myuser0&#039;,&lt;br /&gt;
 &#039;myuser1&#039;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getDoubleKeyCollectionFromDB(string $sql, bool $bSingleValue=false) array&lt;br /&gt;
: Return an associative array of associative array, from a SQL SELECT query.&lt;br /&gt;
: First array level correspond to first column specified in SQL query.&lt;br /&gt;
: Second array level correspond to second column specified in SQL query.&lt;br /&gt;
: If $bSingleValue = true, keep only third column on result&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; DbGetLastId()&lt;br /&gt;
: Return the PRIMARY key of the last inserted row (see PHP mysql_insert_id function).&lt;br /&gt;
&lt;br /&gt;
; DbAffectedRow() int&lt;br /&gt;
: Return the number of row affected by the last operation&lt;br /&gt;
&lt;br /&gt;
; escapeStringForDB(string $string) string&lt;br /&gt;
: You must use this function on every string type data in your database that contains unsafe data.&lt;br /&gt;
: (unsafe = can be modified by a player).&lt;br /&gt;
: This method makes sure that no SQL injection will be done through the string used, &#039;&#039;&#039;as long as the SQL statement uses single quotes around the string.  This is important!&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;Note: if you using standard types in ajax actions, like AT_alphanum it is sanitized before arrival. This function is only needed if you manage to get an unchecked string, like in the games where user has to enter text as a response.&#039;&#039;&lt;br /&gt;
&#039;&#039;Note: This function does not escape % and _ by default, which are wildcards if used in an SQL &amp;quot;LIKE&amp;quot; statement. The developer must determine if this is desirable behavior.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: see Editing [[Game database model: dbmodel.sql]] to know how to define your database model.&lt;br /&gt;
&lt;br /&gt;
== Use bga globals ==&lt;br /&gt;
Sometimes, you want a single global value for your game, and you don&#039;t want to create a DB table specifically for it.&lt;br /&gt;
&lt;br /&gt;
You can do this with the BGA framework &amp;quot;globals&amp;quot;. Your value will be stored in the &amp;quot;bga_globals&amp;quot; table in the database, and you can access it with simple methods.&lt;br /&gt;
&lt;br /&gt;
The keys are strings, so you might want to store them in constants to avoid mistakes (the key must be at maximum 50 characters long).&lt;br /&gt;
&lt;br /&gt;
The variable can be of any type (number, string, array, object) and will be stored as a JSON (so functions cannot be stored, and circular references on objects will trigger an Exception when storing).&lt;br /&gt;
&lt;br /&gt;
Having a string key and a JSON serialization allows you to debug easily by looking at the bga_globals table content.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: this globals module doesn&#039;t use cache, so every call to one of the following methods makes a DB request.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;set(string $name, $mixed $obj): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Define the value of a global variable.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const FIRST_PLAYER_ID = &amp;quot;firstPlayerId&amp;quot;;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(FIRST_PLAYER_ID, array_keys($players)[0]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;get(string $name, $mixed $defaultValue = null, ?string $class = null): mixed&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the value of a global variable. Returns `null` if not set, except specified otherwise in the optional `$defaultValue`.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$currentFirstPlayerId = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(FIRST_PLAYER_ID);&lt;br /&gt;
...&lt;br /&gt;
$selectedCardsIds = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(SELECTED_CARDS_IDS, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can specify the expected class type, if you save a class and don&#039;t want it returned as a stdClass.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$undo = new Undo($playerId, $moves);&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(UNDO, $undo);&lt;br /&gt;
&lt;br /&gt;
$undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO); // will return an stdClass&lt;br /&gt;
$undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO, class: Undo::class); // will return an Undo class&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: your class should be a plain object with no mandatory constructor params. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Undo {&lt;br /&gt;
    public function __construct(&lt;br /&gt;
        public ?int $playerId = null,&lt;br /&gt;
        public ?array $moves = null,&lt;br /&gt;
    ) {}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;getAll(...$names): array&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the value of all global variables, as a key=&amp;gt;value array. You can set a list of names to only get matching variables. In that case, non-existent keys will not be set in the returned array, so if you have a key with null value, it means the key has been set to null previously.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$variables = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll();&lt;br /&gt;
...&lt;br /&gt;
$diceVariables = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll(DIE1, DIE2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use with PHP&#039;s [https://www.php.net/extract extract()] function to quickly assign multiple variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
extract($this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll(&#039;endTime&#039;, &#039;hour&#039;, &#039;vipWelcome&#039;));&lt;br /&gt;
// $endTime, $hour, and $vipWelcome (may) now exist&lt;br /&gt;
&lt;br /&gt;
if (!empty($endTime)) {&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;delete(...$names): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Delete a global variable or a list of global variables stored in database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;delete(SELECTED_CARDS_IDS);&lt;br /&gt;
...&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;delete(SELECTED_CARDS_IDS, UNDO, AFTER_DISCARD_RETURN_STATE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;has(string $name): bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Indicates if a global variable is stored in database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cardSelectionIsStarted = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;has(SELECTED_CARDS_IDS);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;inc(string $name, $int $inc): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increments the value of a global variable, and return the incremented value. Will trigger an exception if the variable is not a numeric value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;inc(PLAYED_ACTIONS_IN_CURRENT_TURN, 1);&lt;br /&gt;
...&lt;br /&gt;
$totalSpent = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;inc(SPENT_COINS_IN_CURRENT_TURN, $cardCost);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use globals (numbers only / game options) ==&lt;br /&gt;
&lt;br /&gt;
Before the `$this-&amp;gt;globals`, you could only store numeric values as globals. Theses &amp;quot;GameStateValues&amp;quot; are stored in the &amp;quot;global&amp;quot; table in the database, and you can access it with simple methods.&lt;br /&gt;
&lt;br /&gt;
All methods below are members of the game class and should be accessed via $this-&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;initGameStateLabels(array $labelsMap): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method should be located at the beginning of constructor of &#039;&#039;yourgamename.game.php&#039;&#039;. This is where you define the globals used in your game logic, by assigning them IDs.&lt;br /&gt;
&lt;br /&gt;
You can define up to 80 globals, with IDs from 10 to 89 (inclusive, there can be gaps). &lt;br /&gt;
Also you must use this method to access value of game options [[Game_options_and_preferences:_gameoptions.inc.php]], in that case, IDs need to be between 100 and 199.&lt;br /&gt;
You must &#039;&#039;&#039;not&#039;&#039;&#039; use globals outside the range defined above, as those values are used by other components of the framework.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   function __construct() {&lt;br /&gt;
        parent::__construct();&lt;br /&gt;
        $this-&amp;gt;initGameStateLabels([ &lt;br /&gt;
                &amp;quot;my_first_global_variable&amp;quot; =&amp;gt; 10,&lt;br /&gt;
                &amp;quot;my_second_global_variable&amp;quot; =&amp;gt; 11,&lt;br /&gt;
                &amp;quot;my_game_variant&amp;quot; =&amp;gt; 100&lt;br /&gt;
        ]);&lt;br /&gt;
         // other code ...&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: The methods below WILL throw an exception if label is not defined using the call above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateInitialValue( string $label, int $value ): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Initialize global value. This is not required if you ok with default value if 0. This should be called from setupNewGame function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getGameStateValue( string $label, int $default = 0): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Retrieve the value of a global. Returns $default if global is not been initialized (by setGameStateInitialValue).&lt;br /&gt;
&lt;br /&gt;
NOTE: this method use globals &amp;quot;cache&amp;quot; if you directly manipulated globals table OR call this function after undoRestorePoint() - it won&#039;t work as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $value = $this-&amp;gt;getGameStateValue(&#039;my_first_global_variable&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateValue( string $label, int $value ): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Set the current value of a global. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $this-&amp;gt;setGameStateValue(&#039;my_first_global_variable&#039;, 42);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;incGameStateValue( string $label, int $increment ): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increment the current value of a global. If increment is negative, decrement the value of the global.&lt;br /&gt;
&lt;br /&gt;
Return the final value of the global. If global was not initialized it will initialize it as 0.&lt;br /&gt;
&lt;br /&gt;
NOTE: this method use globals &amp;quot;cache&amp;quot; if you directly manipulated globals table OR call this function after undoRestorePoint() - it won&#039;t work as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $value = $this-&amp;gt;incGameStateValue(&#039;my_first_global_variable&#039;, 1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BGA predefined globals ===&lt;br /&gt;
&lt;br /&gt;
BGA already defines some globals in the &#039;&#039;global&#039;&#039; database table. You should not change them directly but it can be useful to know what they mean when debugging:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! global_id !! label !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Current state &lt;br /&gt;
|-&lt;br /&gt;
| 2 || || Active player id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || next_move_id || Next move number&lt;br /&gt;
|-&lt;br /&gt;
| 4 ||  || Game id&lt;br /&gt;
|-&lt;br /&gt;
| 5 ||  || Table creator id&lt;br /&gt;
|-&lt;br /&gt;
| 6 || playerturn_nbr || Player turn number&lt;br /&gt;
|-&lt;br /&gt;
| 7 || gameprogression || Game progression&lt;br /&gt;
|-&lt;br /&gt;
| 8 || initial_reflexion_time || Initial reflection time&lt;br /&gt;
|-&lt;br /&gt;
| 9 || additional_reflexion_time || Additional reflection time&lt;br /&gt;
|-&lt;br /&gt;
| 200 || reflexion_time_profile ||  Game speed&lt;br /&gt;
Real-time games:&lt;br /&gt;
* 0 = Real-time • Fast paced&lt;br /&gt;
* 1 = Real-time • Normal speed&lt;br /&gt;
* 2 = Real-time • Slow speed&lt;br /&gt;
* 9 = No time limit • with friends only&lt;br /&gt;
&lt;br /&gt;
Turn-based games:&lt;br /&gt;
* 10 = Fast Turn-based • 24 moves per day&lt;br /&gt;
* 11 = Fast Turn-based • 12 moves per day&lt;br /&gt;
* 12 = Fast Turn-based • 8 moves per day&lt;br /&gt;
* 13 = Turn-based • 4 moves per day&lt;br /&gt;
* 14 = Turn-based • 3 moves per day&lt;br /&gt;
* 15 = Turn-based • 2 moves per day&lt;br /&gt;
* 17 = Turn-based • 1 move per day&lt;br /&gt;
* 19 = Turn-based • 1 move per 2 days&lt;br /&gt;
* 20 = No time limit • with friends only&lt;br /&gt;
|-&lt;br /&gt;
| 201 || bgaranking_mode || Game mode&lt;br /&gt;
* 0 = Normal mode&lt;br /&gt;
* 1 = Friendly mode (no ELO)&lt;br /&gt;
* 2 = Arena mode&lt;br /&gt;
|-&lt;br /&gt;
| 207 || game_language ||GAMESTATE_GAME_LANG&lt;br /&gt;
|-&lt;br /&gt;
| 300 || game_db_version ||GAMESTATE_GAMEVERSION: Current version of the game (when in production)&lt;br /&gt;
|-&lt;br /&gt;
| 301 || game_result_neutralized ||GAMESTATE_GAME_RESULT_NEUTRALIZED&lt;br /&gt;
|-&lt;br /&gt;
| 302 || neutralized_player_id ||GAMESTATE_NEUTRALIZED_PLAYER_ID&lt;br /&gt;
|-&lt;br /&gt;
| 304 || undo_moves_stored ||GAMESTATE_UNDO_MOVES_STORED&lt;br /&gt;
|-&lt;br /&gt;
| 305 || undo_moves_player ||GAMESTATE_UNDO_MOVES_PLAYER&lt;br /&gt;
|-&lt;br /&gt;
| 306 || lock_screen_timestamp ||GAMESTATE_LOCK_TIMESTAMP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game states and active players ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Activate player handling ===&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;activeNextPlayer()&lt;br /&gt;
: Make the next player active in the natural player order.&lt;br /&gt;
: Note: you must transition to a state in the action triggering this call, so the change of active player is notified to the front.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;activePrevPlayer()&lt;br /&gt;
: Make the previous player active (in the natural player order).&lt;br /&gt;
: Note: you must transition to a state in the action triggering this call, so the change of active player is notified to the front.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;changeActivePlayer( $player_id )&lt;br /&gt;
: You can call this method to make any player active.&lt;br /&gt;
: Note: you must transition to a state in the action triggering this call, so the change of active player is notified to the front.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;getActivePlayerId() string&lt;br /&gt;
: Return the &amp;quot;active_player&amp;quot; id&lt;br /&gt;
: Note: it does NOT mean that this player is active right now, because state type could be GAME or MULTIPLE_ACTIVE_PLAYER&lt;br /&gt;
: Note: avoid using this method in a MULTIPLE_ACTIVE_PLAYER state because it does not mean anything.&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in getArgs / onEnteringState / act functions, and shouldn&#039;t be needed anywhere else.&lt;br /&gt;
&lt;br /&gt;
=== Multiple activate player handling ===&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive()&lt;br /&gt;
: All playing players are made active. Update notification is sent to all players (this will trigger &#039;&#039;&#039;onUpdateActionButtons&#039;&#039;&#039;).&lt;br /&gt;
: Usually, you use this method at the beginning of a game state (e.g., &amp;quot;stGameState&amp;quot;) which transitions to a MULTIPLE_ACTIVE_PLAYER state in which multiple players have to perform some action. Do not use this method if you going to make some more changes in the active player list. (I.e., if you want to take away MULTIPLE_ACTIVE_PLAYER status immediately afterwards, use setPlayersMultiactive instead.)&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function st_MultiPlayerInit() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;stMakeEveryoneActive()&lt;br /&gt;
:this method can be used in state machine to make everybody active as &amp;quot;st&amp;quot; method of multiplayeractive state, it just calls $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive()&lt;br /&gt;
&lt;br /&gt;
This is to be used in state declaration:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    2 =&amp;gt; array(&lt;br /&gt;
    		&amp;quot;name&amp;quot; =&amp;gt; &amp;quot;playerTurnPlace&amp;quot;,&lt;br /&gt;
    		&amp;quot;description&amp;quot; =&amp;gt; \clienttranslate(&#039;Other player must place ships&#039;),&lt;br /&gt;
    		&amp;quot;descriptionmyturn&amp;quot; =&amp;gt; \clienttranslate(&#039;${you} must place ships (click on YOUR SHIPS board to place)&#039;),&lt;br /&gt;
    		&amp;quot;type&amp;quot; =&amp;gt; MULTIPLE_ACTIVE_PLAYER,&lt;br /&gt;
                &#039;action&#039; =&amp;gt; &#039;stMakeEveryoneActive&#039;,&lt;br /&gt;
                &#039;args&#039; =&amp;gt; &#039;arg_playerTurnPlace&#039;,&lt;br /&gt;
    	     	&amp;quot;possibleactions&amp;quot; =&amp;gt; array( &amp;quot;actionBla&amp;quot; ),&lt;br /&gt;
                &amp;quot;transitions&amp;quot; =&amp;gt; array( &amp;quot;next&amp;quot; =&amp;gt; 4, &amp;quot;last&amp;quot; =&amp;gt; 99)&lt;br /&gt;
    ),&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setAllPlayersNonMultiactive( $next_state )&lt;br /&gt;
: All playing players are made inactive. Transition to next state, by transition name or State class name.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive( $players, $next_state, $bExclusive = false )&lt;br /&gt;
: Make a specific list of players active during a multiactive gamestate. Update notification is sent to all players whose state changed.&lt;br /&gt;
: &amp;quot;players&amp;quot; is the array of player id that should be made active. If &amp;quot;players&amp;quot; is not empty the value of &amp;quot;next_state&amp;quot; will be ignored (you can put whatever you want)&lt;br /&gt;
: If &amp;quot;bExclusive&amp;quot; parameter is not set or false it doesn&#039;t deactivate other previously active players. If its set to true, the players who will be multiactive at the end are only these in &amp;quot;$players&amp;quot; array&lt;br /&gt;
&lt;br /&gt;
: In case &amp;quot;players&amp;quot; is empty, the method trigger the &amp;quot;next_state&amp;quot; transition, by transition name or State class name, to go to the next game state.&lt;br /&gt;
: returns true if state transition happened, false otherwise&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $player_id, $next_state )&lt;br /&gt;
: During a multiactive game state, make the specified player inactive.&lt;br /&gt;
: Usually, you call this method during a multiactive game state after a player did his action. It is also possible to call it directly from multiplayer action handler.&lt;br /&gt;
: If this player was the last active player, the method trigger the &amp;quot;next_state&amp;quot; transition, by transition name or State class name, to go to the next game state.&lt;br /&gt;
: returns true if state transition happened, false otherwise&lt;br /&gt;
Example of usage (see state declaration of playerTurnPlace above):&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actionBla($args) {&lt;br /&gt;
        $this-&amp;gt;checkAction(&#039;actionBla&#039;);&lt;br /&gt;
        // handle the action using $this-&amp;gt;getCurrentPlayerId()&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $this-&amp;gt;getCurrentPlayerId(), &#039;next&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getActivePlayerList()&lt;br /&gt;
: With this method you can retrieve the list of the active player at any time.&lt;br /&gt;
: During a GAME type gamestate, it will return a void array.&lt;br /&gt;
: During a ACTIVE_PLAYER type gamestate, it will return an array with one value (the active player id).&lt;br /&gt;
: During a MULTIPLE_ACTIVE_PLAYER type gamestate, it will return an array of the active players id.&lt;br /&gt;
: Note: you should only use this method in the latter case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;  $this-&amp;gt;gamestate-&amp;gt;updateMultiactiveOrNextState( $next_state_if_none )&lt;br /&gt;
: Sends update notification about multiplayer changes. All multiactive set* functions above do that, however if you want to change state manually using db queries for complex calculations, you have to call this yourself after. Do not call this if you calling one of the other setters above. Next state param is a transition name or State class name.&lt;br /&gt;
Example: you have player teams and you want to activate all players in one team&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;0&#039;&amp;quot;;&lt;br /&gt;
        $this-&amp;gt;DbQuery( $sql );&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;1&#039; WHERE `player_id` = &#039;$player_id&#039; AND `player_team` = &#039;$team_no&#039;&amp;quot;;&lt;br /&gt;
        $this-&amp;gt;DbQuery( $sql );&lt;br /&gt;
        &lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;updateMultiactiveOrNextState( &#039;error&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; updating database manually&lt;br /&gt;
: Use this helper function to change multiactive state without sending notification&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    /**&lt;br /&gt;
     * Changes values of multiactivity in db, does not sent notifications.&lt;br /&gt;
     * To send notifications after use updateMultiactiveOrNextState&lt;br /&gt;
     * @param number $player_id, player id &amp;lt;=0 or null - means ALL&lt;br /&gt;
     * @param number $value - 1 multiactive, 0 non multiactive&lt;br /&gt;
     */&lt;br /&gt;
    function dbSetPlayerMultiactive($player_id = -1, $value = 1) {&lt;br /&gt;
        if (! $value)&lt;br /&gt;
            $value = 0;&lt;br /&gt;
        else&lt;br /&gt;
            $value = 1;&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;$value&#039; WHERE `player_zombie` = 0 and `player_eliminated` = 0&amp;quot;;&lt;br /&gt;
        if ($player_id &amp;gt; 0) {&lt;br /&gt;
            $sql .= &amp;quot; AND `player_id` = $player_id&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $this-&amp;gt;DbQuery($sql);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;$this-&amp;gt;gamestate-&amp;gt;isPlayerActive($player_id)&lt;br /&gt;
:Return true if specified player is active right now.&lt;br /&gt;
:This method take into account game state type, ie nobody is active if game state is &amp;quot;game&amp;quot; and several players can be active if game state is &amp;quot;multiplayer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;$this-&amp;gt;bIndependantMultiactiveTable&lt;br /&gt;
:This flag can be set to true in constructor of game.php to force creation of second table to handle multiplayer states (normally these are in player table), this is very advanced feature.&lt;br /&gt;
:ONLY use it after you deploy you game to production if you receive unusual amount of bug report with dead lock symptoms DURING multiactiveplayer states&lt;br /&gt;
    function __construct() {&lt;br /&gt;
      ...&lt;br /&gt;
      $this-&amp;gt;bIndependantMultiactiveTable=true;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== States functions ===&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextState( $transition )&lt;br /&gt;
: Change current state to a new state. Important: the $transition parameter is the name of the transition (or the state class name), and NOT the name of the target game state, see [[Your game state machine: states.inc.php]] for more information about states.&lt;br /&gt;
:&#039;&#039;with State classes, you should not need it and you can just return the class name of the next state.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$this-&amp;gt;gamestate-&amp;gt;jumpToState($stateNum)&#039;&#039;&#039;&lt;br /&gt;
: Change current state to a new state. Important: the $stateNum parameter is the key of the state. See [[Your game state machine: states.inc.php]] for more information about states.&lt;br /&gt;
: Note: this is very advanced method, it should not be used in normal cases. Specific advanced cases include - jumping to specific state from &amp;quot;do_anytime&amp;quot; actions, jumping to dispatcher state or jumping to recovery state from zombie player function&lt;br /&gt;
:&#039;&#039;with State classes, you should not need it and you can just return the class name of the next state.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;checkAction( $actionName, $bThrowException=true )&lt;br /&gt;
: Check if the current player can perform a specific action in the current game state, and optionally throw an exception if they can&#039;t.&lt;br /&gt;
: The action is valid if it is listed in the &amp;quot;possibleactions&amp;quot; array for the current game state (see game state description).&lt;br /&gt;
: This method MUST be the first one called in ALL your PHP methods that handle player actions that are not using [[Main game logic: yourgamename.game.php#Actions (autowired)|Action autowiring]], in order to make sure a player doesn&#039;t perform an action not allowed by the rules at the point in the game.  It should not be called from methods where the current player is not necessarily the active player, otherwise it may fail with an &amp;quot;It is not your turn&amp;quot; exception.&lt;br /&gt;
: If &amp;quot;bThrowException&amp;quot; is set to &amp;quot;false&amp;quot;, the function returns &#039;&#039;&#039;false&#039;&#039;&#039; in case of failure instead of throwing an exception. This is useful when several actions are possible, in order to test each of them without throwing exceptions.&lt;br /&gt;
:&#039;&#039;With auto-wired actions, you should not need it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction( $action )&lt;br /&gt;
: (rarely used)&lt;br /&gt;
: This works exactly like &amp;quot;checkAction&amp;quot; (above), except that it does NOT check if the current player is active.&lt;br /&gt;
: &#039;&#039;&#039;Note: This does NOT check either spectator or eliminated status, so those checks must be done manually.&#039;&#039;&#039;&lt;br /&gt;
: This is used specifically in certain game states when you want to authorize additional actions for players that are not active at the moment.&lt;br /&gt;
: Example: in &#039;&#039;Libertalia&#039;&#039;, you want to authorize players to change their mind about the card played. They are of course not active at the time they change their mind, so you cannot use &amp;quot;checkAction&amp;quot;; use &amp;quot;checkPossibleAction&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
This is how PHP action looks that returns player to active state (only for multiplayeractive states). To be able to execute this on client do not call checkAction on js side for this specific action.&lt;br /&gt;
&lt;br /&gt;
   function actUnpass(int $currentPlayerId) {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction(&#039;actUnpass&#039;); // player changed mind about passing while others were thinking&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive([$currentPlayerId], &#039;error&#039;, false);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()&lt;br /&gt;
: Returns the current main state, ignoring private parallel states.&lt;br /&gt;
: To get the state as an array, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()-&amp;gt;toArray()&amp;lt;/code&amp;gt; and it will get a result similar to $this-&amp;gt;gamestate-&amp;gt;state()&lt;br /&gt;
: To get the state name, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()-&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentMainStateId()&lt;br /&gt;
: Returns the current main state id, ignoring private parallel states. (previously, it was the state_id() function, that returned the state numer as a string).&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentState(int $playerId)&lt;br /&gt;
: Returns the current state for a player. If the player is in private parallel state, it means the current private state for this player.&lt;br /&gt;
: To get the state as an array, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentState($playerId)-&amp;gt;toArray()&amp;lt;/code&amp;gt;&lt;br /&gt;
: To get the state name, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentState($playerId)-&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentStateId(int $playerId)&lt;br /&gt;
: Returns the current state id for a player. If the player is in private parallel state, it means the current private state for this player.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;isMultiactiveState()&lt;br /&gt;
: Return true if we are in MULTIPLE_ACTIVE_PLAYER state, false otherwise&lt;br /&gt;
&lt;br /&gt;
=== Private parallel states ===&lt;br /&gt;
&lt;br /&gt;
See the overview of private parallel states [[Your_game_state_machine:_states.inc.php#Private_parallel_states|here]].&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers()&lt;br /&gt;
: All active players in a multiactive state are entering a first private state defined in the master state&#039;s initialprivate parameter.&lt;br /&gt;
: Every time you need to start a private parallel states you need to call this or similar methods below.&lt;br /&gt;
: Note: at least one player needs to be active (see [[#Multiple_activate_player_handling|above]]) and current game state must be a multiactive state with initialprivate parameter defined&lt;br /&gt;
: Note: initialprivate parameter of master state should be set to the id of the first private state. This private state needs to be defined in states.php with the type set to &#039;private&#039;.&lt;br /&gt;
: Note: this method is usually preceded with activating some or all players&lt;br /&gt;
: Note: initializing private state can run action or args methods of the initial private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stStartPlayerTurn() {&lt;br /&gt;
        // This is usually done in master state action method&lt;br /&gt;
        &lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers();&lt;br /&gt;
&lt;br /&gt;
        // in some cases you can move immediately some or all players to different private states&lt;br /&gt;
        if ($someCondition) {&lt;br /&gt;
            //move all players to different state &lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers(&amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($other condition) {&lt;br /&gt;
            //move single player to different state&lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($specificPlayerId, &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForPlayers($playerIds)&lt;br /&gt;
: Players with specified ids are entering a first private state defined in the master state initialprivate parameter.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateState($playerId)&lt;br /&gt;
: Player with the specified id is entering a first private state defined in the master state initialprivate parameter.&lt;br /&gt;
: Everytime you need to start a private parallel states you need to call this or similar methods above&lt;br /&gt;
: Note: player needs to be active (see [[#Multiple_activate_player_handling|above]]) and current game state must be a multiactive state with initialprivate parameter defined&lt;br /&gt;
: Note: initialprivate parameter of master state should be set to the id of the first private state. This private state needs to be defined in states.php with the type set to &#039;private&#039;.&lt;br /&gt;
: Note: this method is usually preceded with activating that player&lt;br /&gt;
: Note: initializing private state can run action or args methods of the initial private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function st_ChangeMind() {&lt;br /&gt;
        // This player finished his move before, but now decides change something while other players are still active&lt;br /&gt;
        // We activate the player and initialize his private state&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive([$this-&amp;gt;getCurrentPlayerId()], &amp;quot;&amp;quot;);&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateState(this-&amp;gt;getCurrentPlayerId());&lt;br /&gt;
&lt;br /&gt;
        // It is also possible to move the player to some other specific state immediately&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers($transition)&lt;br /&gt;
: All active players will transition to next private state by specified transition&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: transition should lead to another private state (i.e. a state with type defined as &#039;private&#039;&lt;br /&gt;
: Note: transition should be defined in private state in which the players currently are, or be a state class name.&lt;br /&gt;
: Note: this method can run action or args methods of the target state&lt;br /&gt;
: Note: this is usually used after initializing the private state to move players to specific private state according to the game logic&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stStartPlayerTurn() {&lt;br /&gt;
        // This is usually done in master state action method&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers();&lt;br /&gt;
&lt;br /&gt;
        if ($specificOption) {&lt;br /&gt;
            //move all players to different state &lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers(&amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForPlayers($playerIds, $transition)&lt;br /&gt;
: Players with specified ids will transition to next private state specified by provided transition, by transition name or State class name.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($playerId, $transition)&lt;br /&gt;
: Player with specified id will transition to next private state specified by provided transition, by transition name or State class name.&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: transition should lead to another private state (i.e. a state with type defined as &#039;private&#039;&lt;br /&gt;
: Note: transition should be defined in private state in which the players currently are. &lt;br /&gt;
: Note: this method can run action or args methods of the target state for specified player&lt;br /&gt;
: Note: this is usually used after some player actions to move to next private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actSomeAction() {&lt;br /&gt;
        $this-&amp;gt;checkAction(&amp;quot;actSomeAction&amp;quot;); //needs to be defined in the current state&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForAllPlayers()&lt;br /&gt;
: All players private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used &lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this is usually used to clean up after leaving a master state in which private states were used, but can be used in other cases when we want to exit private parallel states and use a regular multiactive state for all players&lt;br /&gt;
: Note: After unseting private state only actions on master state are possible&lt;br /&gt;
: Note: Usually it is not necessary to unset private states as they will be initialized to first private state when private states are needed again. Nevertheless it is generally better to clean private state after exiting private parallel states to avoid bugs. &lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stNextRound() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForAllPlayers();&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForPlayers($playerIds, $transition)&lt;br /&gt;
: For players with specified ids private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateState($playerId)&lt;br /&gt;
: For player with specified id private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used &lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this is usually used when deactivating player to clean up their parallel state&lt;br /&gt;
: Note: After unseting private state only actions on master state are possible&lt;br /&gt;
: Note: Usually it is not necessary to unset private state as it will be initialized to first private state when private states are needed again. Nevertheless it is generally better to clean private state when not needed to avoid bugs. &lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function done() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $this-&amp;gt;getCurrentPlayerId(), &amp;quot;newTurn&amp;quot; );&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;unsetPrivateState($this-&amp;gt;getCurrentPlayerId());&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPrivateState($playerId, $newStateId)&lt;br /&gt;
: For player with specified id a new private state would be set&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this should be rarely used as it doesn&#039;t check if the transition is allowed (it doesn&#039;t even specifies transition). This can be useful in very complex cases when standard state machine is not adequate (i.e. specific cards can lead to some micro action in various states where defining transitions back and forth can become very tedious.) NewStateId can also be a state class name.&lt;br /&gt;
: Note: this method can run action or args methods of the target state for specified player&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actSomeAction() {&lt;br /&gt;
        $this-&amp;gt;checkAction(&amp;quot;actSomeAction&amp;quot;); //needs to be defined in the current state&lt;br /&gt;
&lt;br /&gt;
        if ($playerHaveSpecificCard)&lt;br /&gt;
            return $this-&amp;gt;gamestate-&amp;gt;setPrivateState($this-&amp;gt;getCurrentPlayerId(), 35);&lt;br /&gt;
&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);        &lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getPrivateState($playerId) &lt;br /&gt;
: This return the private state or null if not initialized or not in private state&lt;br /&gt;
&lt;br /&gt;
==== State Arguments in Private parallel states ====&lt;br /&gt;
&lt;br /&gt;
The args method called for private states will have the player_id passed to it, allowing you to customise the arguments returned for that player.&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function argMyPrivateState($player_id) {&lt;br /&gt;
        return array(&lt;br /&gt;
          &#039;my_data&#039; =&amp;gt; $this-&amp;gt;getPlayerSpecificData($player_id)&lt;br /&gt;
        );&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inactive Players ====&lt;br /&gt;
&lt;br /&gt;
During Private Parallel State, active players will be managed by the private state that is current assigned to them.&lt;br /&gt;
&lt;br /&gt;
Inactive players will be managed by the master MULTIPLE_ACTIVE_PLAYER state, so your client should respond to that state in order to display any status message advising players that they are waiting for others to have their turn, or to add any buttons that allow players to potentially &amp;quot;break in&amp;quot; and become active.&lt;br /&gt;
&lt;br /&gt;
== Actions (autowired) ==&lt;br /&gt;
The action function should be prefixed by &amp;quot;act&amp;quot; and match the names specified in the &amp;quot;possibleactions&amp;quot; field on the state file.&lt;br /&gt;
&lt;br /&gt;
If your actions start with &amp;quot;act&amp;quot;, they will be autowired, that means you can declare action functions on the game.php file and call them directly from the front (with bgaPerformAction). You don&#039;t need to use action.php file anymore. The query param from the front request will be matched with the PHP variable of the same name, and it needs to be properly typed. This works for basic types: int, bool, float, string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public function actPlayCard(int $cardId) { ... }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This function can be called from front-side with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.bgaPerformAction(&#039;actPlayCard&#039;, {&lt;br /&gt;
  cardId: this.selectedCardId // the &amp;quot;cardId&amp;quot; param match the PHP variable name&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note: if you also declare the function in the action.php, it will be used instead of the autowiring)&lt;br /&gt;
&lt;br /&gt;
If you want more complex types like int array or JSON, you&#039;ll need to specify it using the Param attributes. Same if the PHP variable name is different from the front query param, or if you want to specify the tests that should be realized on the parameter before calling the function.&lt;br /&gt;
&lt;br /&gt;
=== Possible attributes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BoolParam(?string $name = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\BoolParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actRaiseBet(#[BoolParam(name: &#039;raise&#039;)] bool $raiseBet)&lt;br /&gt;
&lt;br /&gt;
public function actRaiseBet(#[BoolParam(name: &#039;raise&#039;)] bool $raise) // NOTE: it&#039;s the same as actRaiseBet(bool $raise) if PHP var name and param name are the same&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IntParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\IntParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actPlayCard(#[IntParam(name: &#039;id&#039;)] int $cardId)&lt;br /&gt;
&lt;br /&gt;
public function actSpendGold(#[IntParam(min: 1)] int $gold) // will trigger an exception if param is &amp;lt; 1&lt;br /&gt;
&lt;br /&gt;
public function actPlaceCardOnSpot(int $cardId, #[IntParam(min: 1, max: 5)] int $spot) // will trigger an exception if spot is not in 1 to 5 range&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FloatParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Works the same way as IntParam, import is &amp;lt;code&amp;gt;use \Bga\GameFramework\Actions\Types\FloatParam;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;StringParam(?string $name = null, public ?bool $alphanum = false, public ?bool $alphanum_dash = false, public ?bool $base64 = false, public ?array $enum)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\StringParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actSubmitWord(#[StringParam(alphanum: true)] string $word) // will trigger an exception if the word is not alphanum&lt;br /&gt;
&lt;br /&gt;
public function actChooseAction(#[StringParam(enum: [&#039;move&#039;, &#039;attack&#039;, &#039;pass&#039;])] string $action)  // will trigger an exception if the parameter doesn&#039;t match a value in the enum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: You should do one of the tests of the attribute, or test it yourself on the function, to ensure the user is not sending forbidden characters to the function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IntArrayParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\IntArrayParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actDiscardCards(#[IntArrayParam()] array $ids)&lt;br /&gt;
&lt;br /&gt;
public function actDiscardCards(#[IntArrayParam(min: 2, max: 8)] array $ids)  // will trigger an exception if the array length is not in the 2 to 8 range. It doesn&#039;t check the min/max of the array values!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function can be called from front-side with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const selectedCardIds = [8, 12, 25];&lt;br /&gt;
this.bgaPerformAction(&#039;actDiscardCards&#039;, {&lt;br /&gt;
  ids: selectedCardIds&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;JsonParam(?string $name = null, public ?bool $associative = true, public ?bool $alphanum = true)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\JsonParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam()] array $answer) {} // force conversion to array during PHP json decode&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(associative: false)] object $answer) {} // force conversion to object during PHP json decode&lt;br /&gt;
&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(associative: null)] mixed $answer) {} // default PHP json decode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 On client side:&lt;br /&gt;
&lt;br /&gt;
      const lala ={a: 2, b: &amp;quot;string&amp;quot;, c: [1,2,4]};&lt;br /&gt;
      this.bgaPerformAction(&amp;quot;actPlanComplexStuff&amp;quot;, {&lt;br /&gt;
        answer: JSON.stringify(lala)&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to decode the Json to a PHP class, similar to what is done with $this-&amp;gt;globals-&amp;gt;get with class parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\JsonParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
class Answer {&lt;br /&gt;
    public function __construct(&lt;br /&gt;
        public int $a,&lt;br /&gt;
        public string $b,&lt;br /&gt;
        public array $c,&lt;br /&gt;
    ) {}&lt;br /&gt;
}&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(class: Answer::class)] $answer) {} // specifying the class to map the json to&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam] Answer $answer) {} // same result, but the class is detected automatically by the framework thanks to the typed param.&lt;br /&gt;
&lt;br /&gt;
public function actPlanMultipleComplexStuff(#[JsonParam(class: Answer::class)] array $answers) {} // can decode an array of Answer::class&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== checkAction ===&lt;br /&gt;
The autowiring also triggers the checkAction, so you don&#039;t have to call it at the beginning of the function. If you need a function that should not trigger checkAction (an action that can be played during someone else turn), you can disable it this way: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\CheckAction;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#[CheckAction(false)]&lt;br /&gt;
public function actSetAutopass(bool $autopass) { ... }&lt;br /&gt;
&lt;br /&gt;
#[CheckAction(false)]&lt;br /&gt;
public function actCancelChooseAction() {&lt;br /&gt;
  $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction(&#039;actCancelChooseAction&#039;);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you disable &amp;lt;code&amp;gt;checkAction&amp;lt;/code&amp;gt;, you probably need to call &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;checkPossibleAction&amp;lt;/code&amp;gt; instead at the beginning of your function. You likely also want to disable client checkAction calls implied by bgaPerformAction.&lt;br /&gt;
&lt;br /&gt;
=== act prefix ===&lt;br /&gt;
The act prefix needed to activate the autowiring is not just to have some consistency in naming, it&#039;s also intended to protect your code. If we let autowired action to any function, a player may do a request to &#039;setPlayerScore&#039; function, even if you never intended for it to be called front side, and it would allow almost undetectable cheating for anyone reading the code of your game.&lt;br /&gt;
&lt;br /&gt;
== Players turn order ==&lt;br /&gt;
&lt;br /&gt;
When table is created the &amp;quot;natural&amp;quot; player order is assigned to player at random, and stored in &amp;quot;read-only&amp;quot; field &amp;quot;player_no&amp;quot;.&lt;br /&gt;
If you need to create a custom order you should never change natural order but have a separate data structure. &lt;br /&gt;
For example you can alter the players table to add another &amp;quot;custom_order&amp;quot; field, you can use state globals or you can use your natural board database, &lt;br /&gt;
to store meeple_color/position_location pair.&lt;br /&gt;
BGA currently does not provide any API to create/store custom player order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getNextPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return an associative array which associate each player with the next player around the table.&lt;br /&gt;
&lt;br /&gt;
In addition, key 0 is associated to the first player to play.&lt;br /&gt;
&lt;br /&gt;
Example: if three player with ID 1000, 2000 and 3000 are around the table, in this order, the method returns:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   array( &lt;br /&gt;
    1000 =&amp;gt; 2000, &lt;br /&gt;
    2000 =&amp;gt; 3000, &lt;br /&gt;
    3000 =&amp;gt; 1000, &lt;br /&gt;
    0 =&amp;gt; 1000 &lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPrevPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, but the associative array associate the previous player around the table. However there no 0 index here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerAfter( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing after given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerBefore( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing before given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
Note: There is no API to modify this order, if you have custom player order you have to maintain it in your database&lt;br /&gt;
and have custom function to access it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;createNextPlayerTable( $players, $bLoop=true )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using $players array creates a map of current =&amp;gt; next as in example from getNextPlayerTable(), however you can use custom order here. &lt;br /&gt;
If parmeter $bLoop is set to true then last player will points to first (creaing a loop), false otherwise.&lt;br /&gt;
In any case index 0 points to first player (first element of $players array). $players is array of player ids in desired order.&lt;br /&gt;
&lt;br /&gt;
Note: This function &#039;&#039;&#039;DOES NOT&#039;&#039;&#039; change the order in database, it only creates a map using key/values as descibed.&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function getNextPlayerTableCustom() {&lt;br /&gt;
        $starting = $this-&amp;gt;getStartingPlayer(); // custom function to get starting player&lt;br /&gt;
        $player_ids = $this-&amp;gt;getPlayerIdsInOrder($starting); // custom function to create players array starting from starting player&lt;br /&gt;
        return $this-&amp;gt;createNextPlayerTable($player_ids, false); // create next player table in custom order&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$table = $this-&amp;gt;createNextPlayerTable([3000,2000,1000], false);&lt;br /&gt;
&lt;br /&gt;
will return:&lt;br /&gt;
   [ &lt;br /&gt;
    3000 =&amp;gt; 2000, &lt;br /&gt;
    2000 =&amp;gt; 1000, &lt;br /&gt;
    1000 =&amp;gt; null,&lt;br /&gt;
    0 =&amp;gt; 3000 &lt;br /&gt;
   ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
&lt;br /&gt;
To understand notifications, please read [http://www.slideshare.net/boardgamearena/the-bga-framework-at-a-glance The BGA Framework at a glance] first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Notifications are crutial part of BGA framework. Everything which players see, including all changes which happen on frontend (including setup), are done via notfications.&lt;br /&gt;
&lt;br /&gt;
Some notifications are built into the framework, and others are custom, game specific notifications. Generally, you should not send or handle framework notifications, except exposed APIs.&lt;br /&gt;
&lt;br /&gt;
Example of framework notifications:&lt;br /&gt;
* game setup (first time client connects to game)&lt;br /&gt;
* game state change&lt;br /&gt;
* active player change&lt;br /&gt;
Example of custom notifications:&lt;br /&gt;
* game piece moved&lt;br /&gt;
* player scored points&lt;br /&gt;
&lt;br /&gt;
Notifications are queued, i.e. sent at the very end of the action, when it ends normally. It means that if you throw an exception for any reason (i.e: move is not allowed), no notifications will be sent to players.&lt;br /&gt;
&lt;br /&gt;
Notification can be sent from the following functions (and transive calls):&lt;br /&gt;
&lt;br /&gt;
* action handler (act* in State classes or Game.php). It is a MUST actually. At least one notification must be sent (but it includes state transition which sends it)&lt;br /&gt;
* game state transition (onEnteringState in State classes)&lt;br /&gt;
* setupNewGame (after player tables setup is finished)&lt;br /&gt;
&lt;br /&gt;
Notification cannot be sent from the following:&lt;br /&gt;
* .view.php&lt;br /&gt;
* .action.php&lt;br /&gt;
* material.inc.php&lt;br /&gt;
* constructor of .game.php&lt;br /&gt;
* arg* methods of .game.php&lt;br /&gt;
&lt;br /&gt;
There are conceptually two types of notification:&lt;br /&gt;
* public - sent to all clients who are listening - that includes all players in the table as well as spectators&lt;br /&gt;
* private - sent only to a single player&lt;br /&gt;
&lt;br /&gt;
The bundle of notifications sent at the end of an action is considered a single &amp;quot;move&amp;quot; and the table&#039;s move counter increases.&lt;br /&gt;
If you are ONLY sending private notifications during action handling, they will not have an associated &amp;lt;code&amp;gt;move_id&amp;lt;/code&amp;gt; (to avoid this, add simple public notification with empty message). &lt;br /&gt;
In the rare case that you want to change this behavior, you can apply some hackery described in [[BGA_Studio_Cookbook]]&lt;br /&gt;
&lt;br /&gt;
Note: the total notification size is now limited to 128K. It seems a lot, but don&#039;t forget that notification are bundled and only send at the end of an action which also INCLUDES all game state transitions that follow.&lt;br /&gt;
&lt;br /&gt;
The notifications are handled on JS side by subscribing to notifications (only do it for custom notifications!). See [Game_interface_logic:_yourgamename.js#Notifications]&lt;br /&gt;
&lt;br /&gt;
Do not put HTML in the notifications. If you want to have pretty pictures in the log check this [[BGA_Studio_Cookbook#Inject_images_and_styled_html_in_the_log]].&lt;br /&gt;
&lt;br /&gt;
=== Notify ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;all(string $notification_type,string | NotificationMessage $message,array $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Send a notification to all players of the game and spectators (public).&lt;br /&gt;
&lt;br /&gt;
* notification_type: A string that defines the type of your notification.&lt;br /&gt;
&lt;br /&gt;
Your game interface Javascript logic will use this to know what is the type of the received notification (and to trigger the corresponding method).&lt;br /&gt;
&lt;br /&gt;
* message: A string that defines what is to be displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
You can use an empty string here (&#039;&#039;). In this case, nothing is displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
Unless its empty, use &amp;quot;\clienttranslate&amp;quot; method to make sure string is translated.&lt;br /&gt;
&lt;br /&gt;
You can use arguments in your $notification_log string, that refers to values defines in the &amp;quot;$notification_args&amp;quot; argument (see below). &lt;br /&gt;
Note: Make sure you only use single quotes (&#039;), otherwise PHP will try to interpolate the variable and will ignore the values in the args array.&lt;br /&gt;
&lt;br /&gt;
* notification_args: The arguments of your notifications, as an associative array.&lt;br /&gt;
&lt;br /&gt;
This array will be transmitted to the game interface logic, in order the game interface can be updated.&lt;br /&gt;
&lt;br /&gt;
Complete notify all example (from &amp;quot;Reversi&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all( &amp;quot;playDisc&amp;quot;, clienttranslate( &#039;${player_name} plays a disc and turns over ${returned_nbr} disc(s)&#039; ),&lt;br /&gt;
 array(&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id),&lt;br /&gt;
        &#039;returned_nbr&#039; =&amp;gt; count( $turnedOverDiscs ),&lt;br /&gt;
        &#039;x&#039; =&amp;gt; $x,&lt;br /&gt;
        &#039;y&#039; =&amp;gt; $y&lt;br /&gt;
     ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see in the example above the use of the &amp;quot;\clienttranslate&amp;quot; method, and the use of 2 arguments &amp;quot;player_name&amp;quot; and &amp;quot;returned_nbr&amp;quot; in the notification log.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: NO private data must be sent with this method, as a cheater could see it even if it is not used explicitly by the game interface logic. If you want to send private information to a player, please use notify-&amp;gt;player below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: this array is serialized to be sent to the browsers, and will be saved with the notification to be able to replay the game later. If it is too big, it can make notifications slower / less reliable, and replay archives very big (to the point of failing). So as a general rule, you should send only the minimum of information necessary to update the client interface with no overhead in order to keep the notifications as light as possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: When the game page is reloaded (i.e. F5 or when loading turn based game) all previous notifications are replayed as history notifications. These notifications do not trigger notification handlers and are used basically to build the game log. Because of that most of the notification arguments (except i18n, player_id and all arguments referenced in the message), are removed from these history notifications. If you need additional arguments in history notifications you can add special field &amp;lt;b&amp;gt;preserve&amp;lt;/b&amp;gt; to notification arguments, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all( &amp;quot;playDisc&amp;quot;, clienttranslate( &#039;${player_name} plays a disc and turns over ${returned_nbr} disc(s)&#039; ),&lt;br /&gt;
 array(&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id),&lt;br /&gt;
        &#039;returned_nbr&#039; =&amp;gt; count( $turnedOverDiscs ),&lt;br /&gt;
        &#039;x&#039; =&amp;gt; $x,&lt;br /&gt;
        &#039;y&#039; =&amp;gt; $y,&lt;br /&gt;
        &#039;preserve&#039; =&amp;gt; [ &#039;x&#039;, &#039;y&#039; ]&lt;br /&gt;
     ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, fields x and y will be preserved when replaying history notification at the game load.&lt;br /&gt;
&lt;br /&gt;
NOTE: The ONLY reason &#039;preserve&#039; is useful if you have custom method to render notifications in game log which changes some text arguments into html (i.e. to insert the images instead of plain text). Do not use preserve &amp;quot;just in case&amp;quot; - it will only bloat the logs and make game load VERY slow.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: If both public and private notifications are sent to the same player in the same action (AJAX call), they will initially appear in the log in the order in which they were called, but they are placed into the game log in the following order: All private notifications first, then all public notifications. This means that when the page is refreshed, or when a player loads an asynchronous game, if you have called any public notifications &#039;&#039;before&#039;&#039; the last private notification, they will appear out of order in the log.&lt;br /&gt;
&lt;br /&gt;
==== Recursive Notifications ====&lt;br /&gt;
&lt;br /&gt;
If your notification contains some phrases that build programmatically you may need to use recursive notifications. In this case the argument can be not only the string but&lt;br /&gt;
an array itself, which contains &#039;log&#039; and &#039;args&#039;, i.e.&lt;br /&gt;
&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;message&#039;, clienttranslate(&#039;Game moves ${token_name_rec}&#039;),&lt;br /&gt;
                   [&#039;token_name_rec&#039; =&amp;gt; [&#039;log&#039; =&amp;gt; &#039;${token_name} #${token_number}&#039;,&lt;br /&gt;
                                       &#039;args&#039;=&amp;gt; [&#039;token_name&#039; =&amp;gt; \clienttranslate(&#039;Boo&#039;), &#039;token_number&#039; =&amp;gt; $number, &#039;i18n&#039; =&amp;gt; [&#039;token_name&#039;] ]&lt;br /&gt;
                                      ]&lt;br /&gt;
                   ]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Sending private data to some players ====&lt;br /&gt;
&lt;br /&gt;
Sometimes you want to notify all players of a message but not have it appear in the log of specific players (for example, have every player see &amp;quot;Player X draws a card&amp;quot; but have Player X will get a private notification &amp;quot;You draw the Ace of Spades&amp;quot;, so you want them to see a different message and get some private data.&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; arg to send private data to designated players, in a similar fashion of the onEnteringState &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; flag. &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; is an array that have the player id to send private information to, and the value if the different notification using NotificationMessage to send both the replacing log and the args that will be accessible on front side in args._private.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        use Bga\GameFramework\NotificationMessage;&lt;br /&gt;
&lt;br /&gt;
        (...)&lt;br /&gt;
&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;cardPicked&#039;, clienttranslate(&#039;${player_name} takes a secret card from the deck&#039;), [&lt;br /&gt;
            &#039;playerId&#039; =&amp;gt; $playerId,&lt;br /&gt;
            &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($playerId),&lt;br /&gt;
            &#039;_private&#039; =&amp;gt; [&lt;br /&gt;
                $playerId =&amp;gt; new NotificationMessage(clienttranslate(&#039;You take ${_private.card_name} from the deck&#039;), [&lt;br /&gt;
                    &#039;card&#039; =&amp;gt; $card,&lt;br /&gt;
                    &#039;card_name&#039; =&amp;gt; $this-&amp;gt;getCardName($card),&lt;br /&gt;
                    &#039;i18n&#039; =&amp;gt; [&#039;card_name&#039;]&lt;br /&gt;
                ]),&lt;br /&gt;
            ],&lt;br /&gt;
        ]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the message uses &amp;lt;code&amp;gt;${_private.card_name}&amp;lt;/code&amp;gt; to access the data in the private args.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t need to change the log, but only send private args, you can send an array of args instead of the NotificationMessage object.&lt;br /&gt;
&lt;br /&gt;
If you add &amp;lt;code&amp;gt;_merge_private =&amp;gt; true&amp;lt;/code&amp;gt; next to &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt;, the private informations will be accessible in `args` instead of `args._private`. This seems to be required for your interceptFormatStringToken to intercept and alter private args when displaying in the notification log.&lt;br /&gt;
&lt;br /&gt;
If you want all your &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; objects to be merged (state args and notif args), call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;alwaysMergePrivate();&amp;lt;/code&amp;gt; in your Game constructor instead of adding the &amp;lt;code&amp;gt;_merge_private&amp;lt;/code&amp;gt; flag on each arg.&lt;br /&gt;
&lt;br /&gt;
==== Using player names  ====&lt;br /&gt;
&lt;br /&gt;
The variable for player name must be ${player_name} in order to be highlighted with the player color in the game log, it has to have matching &#039;player_id&#039; argument in $notification_args. If you want a second player name in the log, name the variable ${player_name2} and $player_id2, etc.  For the multiple player case, usage of player_id and player_name is not mandatory i.e. skipping to player_id1 and player_name1 is fine.&lt;br /&gt;
&lt;br /&gt;
Special handling of arguments:&lt;br /&gt;
* ${player_name}  - this will be wrapped in html and text shown using color of the corresponding player, some colors also have reserved background. This will apply recursively as well.&lt;br /&gt;
* ${player_name1}, ${player_name2}, ${player_name3}, etc. work the same as above&lt;br /&gt;
In order for this to work you must pass corresponding player_idX AND player_nameX in args i.e.&lt;br /&gt;
&lt;br /&gt;
    $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&lt;br /&gt;
      &#039;buyAndPassCard&#039;,&lt;br /&gt;
      clienttranslate(&#039;${player_name} buys ${card_name} and passes it to ${player_name2}&#039;),&lt;br /&gt;
      [&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player1[&#039;id&#039;],&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $player1[&#039;name&#039;],&lt;br /&gt;
        &#039;player_id2&#039; =&amp;gt; $player2[&#039;id&#039;],&lt;br /&gt;
        &#039;player_name2&#039; =&amp;gt; $player2[&#039;name&#039;],&lt;br /&gt;
        ...&lt;br /&gt;
      ]&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
Note: player_name is not translatable, never add it to i18n array&lt;br /&gt;
&lt;br /&gt;
=== NotifyPlayer ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;player(int $player_id, string $notification_type, string | NotificationMessage $message, $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, except that the notification is sent to one player only. The player must be the player at the game table.&lt;br /&gt;
&lt;br /&gt;
This method should be used only if you send some private information to a player, NOT wanting to send a public notification at the same time for the same reason. See paragraph &#039;&#039;&#039;Sending private data to some players&#039;&#039;&#039; that should cover most of your need to send a private notif.&lt;br /&gt;
&lt;br /&gt;
Important: the variable for player name must be ${player_name} in order to be highlighted with the player color in the game log. Since its a private notification it may be more appropriate to use &amp;quot;you&amp;quot; insted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;player($player_id,&#039;message&#039;, clienttranslate(&#039;You draw ${card_name}&#039;), [ ... ]);&lt;br /&gt;
or&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;player($player_id,&#039;message&#039;, clienttranslate(&#039;${player_name} draws ${card_name}&#039;), [ &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id), ... ]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Spectators cannot be notified using this method, because their player ID is not available via loadPlayersBasicInfos() or otherwise. You must use notify-&amp;gt;all() for any notification that spectators should get.&lt;br /&gt;
&lt;br /&gt;
=== Notification decorators ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;addDecorator(callable $fn)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a decorator function that will be called on notification args before each call of notify-&amp;gt;all and notify-&amp;gt;player. &#039;&#039;Note: it won&#039;t work with deprecated functions notifyAllPlayers and notifyPlayer.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To avoid duplicating the code in your notification args, you can register decorators in your Game __construct function.&lt;br /&gt;
 // in construct :&lt;br /&gt;
 $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator(fn(string $message, array $args) =&amp;gt; $this-&amp;gt;decoratePlayerNameNotifArg($message, $args));&lt;br /&gt;
 // could also be written this (ugly) way : $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator([$this, &#039;decoratePlayerNameNotifArg&#039;]);&lt;br /&gt;
 &lt;br /&gt;
 // with the Utils functions&lt;br /&gt;
 public function decoratePlayerNameNotifArg(string $message, array $args): array {&lt;br /&gt;
     // if the notif message contains ${player_name} but it isn&#039;t set in the args, add it on args from $args[&#039;player_id&#039;]&lt;br /&gt;
     if (isset($args[&#039;player_id&#039;]) &amp;amp;&amp;amp; !isset($args[&#039;player_name&#039;]) &amp;amp;&amp;amp; str_contains($message, &#039;${player_name}&#039;)) {&lt;br /&gt;
         $args[&#039;player_name&#039;] = $this-&amp;gt;getPlayerNameById($args[&#039;player_id&#039;]);&lt;br /&gt;
     }&lt;br /&gt;
     return $args;&lt;br /&gt;
 }&lt;br /&gt;
With this example, you can call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&amp;quot;pass&amp;quot;, clienttranslate(&#039;${player_name} passes&#039;), [ &amp;quot;player_id&amp;quot; =&amp;gt; $player_id ]);&amp;lt;/code&amp;gt; and the front will receive the player_name arg along the player_id one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also declare it as an inline function :&lt;br /&gt;
 // in construct :&lt;br /&gt;
 this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator(function(string $message, array $args) {&lt;br /&gt;
     // if the notif message contains ${card_name} but it isn&#039;t set in the args, add it on args from $args[&#039;card&#039;]&lt;br /&gt;
     // also set it up for translations by adding it to the i18n array&lt;br /&gt;
     if (isset($args[&#039;card&#039;]) &amp;amp;&amp;amp; !isset($args[&#039;card_name&#039;]) &amp;amp;&amp;amp; str_contains($message, &#039;${card_name}&#039;)) {&lt;br /&gt;
         $args[&#039;card_name&#039;] = $args[&#039;card&#039;]-&amp;gt;name;&lt;br /&gt;
         $args[&#039;i18n&#039;][] = [&#039;card_name&#039;];&lt;br /&gt;
     }&lt;br /&gt;
     return $args;&lt;br /&gt;
 });&lt;br /&gt;
With this example, you can call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&amp;quot;playCard&amp;quot;, clienttranslate(&#039;${player_name} plays ${card_name}&#039;), [ &amp;quot;player_id&amp;quot; =&amp;gt; $player_id, card =&amp;gt; $card ]);&amp;lt;/code&amp;gt; and the front will receive the card_name arg with the flag to translate it.&lt;br /&gt;
&lt;br /&gt;
== Randomization ==&lt;br /&gt;
&lt;br /&gt;
A large number of board games rely on random, most often based on dice, cards shuffling, picking some item in a bag, and so on. This is very important to ensure a high level of randomness for each of these situations.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s are a list of techniques you should use in these situations, from the best to the worst.&lt;br /&gt;
&lt;br /&gt;
=== Dice and bga_rand ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;\bga_rand( min, max )&#039;&#039;&#039; &lt;br /&gt;
This is a BGA framework function that provides you a random number between &amp;quot;min&amp;quot; and &amp;quot;max&amp;quot; (inclusive), using the best available random method available on the system.&lt;br /&gt;
&lt;br /&gt;
This is the preferred function you should use, because we are updating it when a better method is introduced.&lt;br /&gt;
&lt;br /&gt;
As of now, bga_rand is based on the PHP function &amp;quot;random_int&amp;quot;, which ensures a cryptographic level of randomness.&lt;br /&gt;
&lt;br /&gt;
In particular, it is &#039;&#039;&#039;mandatory&#039;&#039;&#039; to use it for all &#039;&#039;&#039;dice throw&#039;&#039;&#039; (ie: games using other methods for dice throwing will be rejected by BGA during review).&lt;br /&gt;
&lt;br /&gt;
Note: rand() and mt_rand() are deprecated on BGA and should not be used anymore, as their randomness is not as good as &amp;quot;bga_rand&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Arrays ===&lt;br /&gt;
&lt;br /&gt;
PHP&#039;s [https://www.php.net/array_rand array_rand()] and [https://www.php.net/shuffle shuffle()] functions are not cryptographically secure. Instead, the following code based on PHP&#039;s [https://www.php.net/random_int random_int()] provides a better method to choose a random key, value, or slice of an array. (the slice preserves keys)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    private function getRandomKey(array $array)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomKey(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $rand = random_int(0, $size - 1);&lt;br /&gt;
        $slice = array_slice($array, $rand, 1, true);&lt;br /&gt;
        foreach ($slice as $key =&amp;gt; $value) {&lt;br /&gt;
            return $key;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private function getRandomValue(array $array)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomValue(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $rand = random_int(0, $size - 1);&lt;br /&gt;
        $slice = array_slice($array, $rand, 1, true);&lt;br /&gt;
        foreach ($slice as $key =&amp;gt; $value) {&lt;br /&gt;
            return $value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private function getRandomSlice(array $array, int $count)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomSlice(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        if ($count &amp;lt; 1 || $count &amp;gt; $size) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomSlice(): Invalid count $count for array with size $size&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $slice = [];&lt;br /&gt;
        $randUnique = [];&lt;br /&gt;
        while (count($randUnique) &amp;lt; $count) {&lt;br /&gt;
            $rand = random_int(0, $size - 1);&lt;br /&gt;
            if (array_key_exists($rand, $randUnique)) {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
            $randUnique[$rand] = true;&lt;br /&gt;
            $slice += array_slice($array, $rand, 1, true);&lt;br /&gt;
        }&lt;br /&gt;
        return $slice;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== shuffle and cards shuffling ===&lt;br /&gt;
&lt;br /&gt;
To shuffle items, like a pile of cards, the best way is to use the BGA PHP [[Deck]] component and to use &amp;quot;shuffle&amp;quot; method. This ensures that the best available shuffling method is used, and that if in the future we improve it your game will be up to date.&lt;br /&gt;
&lt;br /&gt;
As of now, the Deck component shuffle method is based on PHP &amp;quot;shuffle&amp;quot; method, which has quite good randomness (even if not as good as bga_rand). In consequence, we accept other shuffling methods during reviews, as long as they are based on PHP &amp;quot;shuffle&amp;quot; function (or similar, like &amp;quot;array_rand&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Other methods ===&lt;br /&gt;
&lt;br /&gt;
Mysql &amp;quot;RAND()&amp;quot; function has not enough randomness to be a valid method to get a random element on BGA. This function has been used in some existing games and has given acceptable results, but now it should be avoided and you should use other methods instead.&lt;br /&gt;
&lt;br /&gt;
== Game statistics ==&lt;br /&gt;
&lt;br /&gt;
There are 2 types of statistics:&lt;br /&gt;
* a &amp;quot;player&amp;quot; statistic is a statistic associated to a player&lt;br /&gt;
* a &amp;quot;table&amp;quot; statistic is a statistic not associated to a player (global statistic for this game).&lt;br /&gt;
&lt;br /&gt;
See [[Game statistics: stats.json]] to see how you define statistics for your game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;init(string|array $nameOrNames, int|float|bool $value)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;init(string|array $nameOrNames, int|float|bool $value, bool $updateTableStat = false)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : initStat( $table_or_player, $name, $value)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a statistic entry with a default value.&lt;br /&gt;
&lt;br /&gt;
This method must be called for each statistic of your game, in your setupNewGame method.&lt;br /&gt;
If you neglect to call this for a statistic, and also do not update the value during the course of a certain game using xxxStats-&amp;gt;set or xxxStats-&amp;gt;inc, the value of the stat will be undefined rather than 0. This will result in it being ignored at the end of the game, as if it didn&#039;t apply to that particular game, and excluded from cumulative statistics. As a consequence - if do not want statistic to be applied, do not init it, or call set or inc on it.&lt;br /&gt;
&lt;br /&gt;
&#039;$nameOrNames&#039; is the name of your statistic, as it has been defined in your stats.inc.php file, or an array of those names.&lt;br /&gt;
&lt;br /&gt;
&#039;$value&#039; is the initial value of the statistic.&lt;br /&gt;
&lt;br /&gt;
&#039;updateTableStat&#039; for playerStats initiates the tableStats of the same name, so if you store for example &#039;playedTurns&#039; in both &#039;table&#039; and &#039;player&#039; call only &amp;lt;code&amp;gt;bga-&amp;gt;playerStats-&amp;gt;init(&#039;playedTurns&#039;, 0, true)&amp;lt;/code&amp;gt; and it will init for both &#039;table&#039; and &#039;player&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;set(string $name, int|float|bool $value)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;set(string $name, int|float|bool $value, int $player_id)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;setAll(string $name, int|float|bool $value)&#039;&#039;&#039; (same as set, but for all players at once)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : setStat( $value, $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set a statistic $name to $value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;inc(string $name, int|float $delta)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;inc(string $name, int|float $delta, int $player_id, bool $updateTableStat = false)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;incAll(string $name, int|float $delta)&#039;&#039;&#039; (same as inc, but for all players at once)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : incStat( $delta, $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Increment (or decrement) specified statistic value by $delta value. Same behavior as setStat function, except you cannot increment boolean values. &#039;updateTableStat&#039; will also inc the tableStats of the same name.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;get(string $name): int|float|bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;get(string $name, int $player_id): int|float|bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : getStat( $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Return the value of statistic specified by $name. Useful when creating derivative statistics such as average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;getAll(string $name): array&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Returns the values for all players, as an associative array $player_id =&amp;gt; $value&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
See [[Translations]]&lt;br /&gt;
&lt;br /&gt;
== Manage player scores and Tie breaker ==&lt;br /&gt;
&lt;br /&gt;
=== Normal scoring ===&lt;br /&gt;
&lt;br /&gt;
At the end of the game, players automatically get a rank depending on their score: the player with the biggest score is #1, the player with the second biggest score is #2, and so on...&lt;br /&gt;
&lt;br /&gt;
During the game, you update player&#039;s score using $this-&amp;gt;bga-&amp;gt;playerScore. bga-&amp;gt;playerScore is a [[PlayerCounter and TableCounter|PlayerCounter]], so it has the same methods.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  // +2 points to active player&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;inc($activePlayerId, 2);&lt;br /&gt;
&lt;br /&gt;
  // Set score of active player to 5&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;set($activePlayerId, 5);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tie breaker ===&lt;br /&gt;
&lt;br /&gt;
Tie breaker is used when two players get the same score at the end of a game.&lt;br /&gt;
&lt;br /&gt;
Tie breaker is using $this-&amp;gt;bga-&amp;gt;playerScoreAux. It is updated exactly like $this-&amp;gt;bga-&amp;gt;playerScore. bga-&amp;gt;playerScoreAux is a [[PlayerCounter and TableCounter|PlayerCounter]], so it has the same methods.&lt;br /&gt;
&lt;br /&gt;
Tie breaker score is displayed only for players who are tied at the end of the game. Most of the time, it is not supposed to be displayed explicitly during the game.&lt;br /&gt;
&lt;br /&gt;
When you are using &amp;quot;playerScoreAux&amp;quot; functionality, you must describe the formula to use in your gameinfos.jsonc file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         &amp;quot;tie_breaker_description&amp;quot;: &amp;quot;Describe here your tie breaker formula&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This description will be used as a tooltip to explain to players how this auxiliary score has been calculated.&lt;br /&gt;
&lt;br /&gt;
Note: if you need to need you score_aux to be reverse (lowest value wins), please contact Studio support to get a solution.&lt;br /&gt;
&lt;br /&gt;
See also [https://en.doc.boardgamearena.com/Game_meta-information:_gameinfos.jsonc#Multiple_tie_breaker_management Multiple Tie Breaker Management].&lt;br /&gt;
&lt;br /&gt;
=== Reverse scoring and reverse tie-breaker ===&lt;br /&gt;
&lt;br /&gt;
If your game has a reverse scoring (lowest value wins) or reverse tie-breaker (lowest tie-breaker wins), you need to set-up a GameResult object to tell BGA this specificity.&lt;br /&gt;
&lt;br /&gt;
On your last state (usually EndScore.php), instead of returning 99 to go the end game, return a GameResult. returning a GameResult object in a State class will then go the end game.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use Bga\GameFramework\GameResult\GameResult;&lt;br /&gt;
use Bga\GameFramework\GameResult\Player;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
    public function onEnteringState() {&lt;br /&gt;
        ...&lt;br /&gt;
&lt;br /&gt;
        $playersDb = $this-&amp;gt;game-&amp;gt;getCollectionFromDb(&amp;quot;SELECT * FROM `player`&amp;quot;);&lt;br /&gt;
        $players = Player::fromPlayersDb($playersDb);&lt;br /&gt;
        return GameResult::individualRanking($players, reverseScore: true);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For reverse tie-breaker, it will be `reverseScoreAux: true`.&lt;br /&gt;
&lt;br /&gt;
If your game has running tables with negative scores to handle reverse scoring and you want to use the reverse scoring, add this just before the return line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        if ($this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;getMin() &amp;lt; 0) {&lt;br /&gt;
            foreach ($players as &amp;amp;$player) {&lt;br /&gt;
                $player-&amp;gt;score = -$player-&amp;gt;score;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So game started before the change will reverse the score (negative to positive) before creating the GameResult object.&lt;br /&gt;
And anywhere you change the score, you must continue the way it was started :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $addedPoints = 3;&lt;br /&gt;
        if ($this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;getMin() &amp;lt; 0) {&lt;br /&gt;
            $addedPoints = -$addedPoints;&lt;br /&gt;
        }&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;inc($playerId, $addedPoints);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If there are negative score, the game will continue with negative scores, else it will continue with positive scores.&lt;br /&gt;
&lt;br /&gt;
=== Result neutralization ===&lt;br /&gt;
&lt;br /&gt;
when a player quits a running table, the results of the game will be neutralized (everyone has score set to 1, except the first quitter that will be at 0 and will be ranked last in addition to reputation drop). We cannot keep the ranking among the remaining players, as the quitter being replaced by a zombie might unbalance the rest of the game interaction, for example the player playing just after can get advantages with the situation.&lt;br /&gt;
&lt;br /&gt;
For some games where there is almost no interaction between player, like some roll &amp;amp; write games, there is no real reason to neutralize the game results when a player quits. In that case, you can ask the Studio Support to activate the &amp;quot;Keep ranking on player quit&amp;quot; flag for your game. The zombie mode must be fully functional to allow the game to continue with leavers. Note that the BGA team might refuse to activate it, if it is considered the zombie player will unbalance the results of the remaining players.&lt;br /&gt;
&lt;br /&gt;
When this flag is activated, a player quitting a game will still be penalized, but the ranking you set at the end of the game will stay, and the eliminated player(s) will have their score set to -1. It also means if a second player quits the game, he will also be penalized, because he has no reason to quit and can continue the game. If the game ends with 2 remaining players, it&#039;s now possible for one of them to concede.&lt;br /&gt;
&lt;br /&gt;
To request this mode, click on &amp;quot;Contact us / Support&amp;quot; at the bottom of the page in Studio and then work through to a &amp;quot;My problem has not been solved&amp;quot; and then enter your request. The flag can be set independently in Studio and Production, so make sure to request it for both (unless you just want to experiment in Studio).&lt;br /&gt;
&lt;br /&gt;
Note: the flag will fully work for games started AFTER activation. It may display incorrect messages for games started before the activation but players left after. For this reason, it&#039;s best to request it when going to alpha, else accept some strange bug reports about this situation, that will solve itself when all existing tables are started after the activation.&lt;br /&gt;
&lt;br /&gt;
=== Co-operative game ===&lt;br /&gt;
&lt;br /&gt;
To make everyone win/lose together in a full-coop game:&lt;br /&gt;
&lt;br /&gt;
Add the following in gameinfos.jsonc :&lt;br /&gt;
&amp;quot;is_coop&amp;quot;: 1, // full cooperative&lt;br /&gt;
&lt;br /&gt;
Assign a score of zero to everyone if it&#039;s a loss.&lt;br /&gt;
Assign the same score &amp;gt; 0 to everyone if it&#039;s a win.&lt;br /&gt;
&lt;br /&gt;
=== Semi-coop ===&lt;br /&gt;
&lt;br /&gt;
If the game is not full-coop, then everyone loses = everyone is tied. I.e. set score to 0 to everybody.&lt;br /&gt;
&lt;br /&gt;
=== Only &amp;quot;winners&amp;quot; and &amp;quot;losers&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
For some games, there is only a group (or a single) &amp;quot;winner&amp;quot;, and everyone else is a &amp;quot;loser&amp;quot;, with no &amp;quot;end of game rank&amp;quot; (1st, 2nd, 3rd...).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* Coup&lt;br /&gt;
* Not Alone&lt;br /&gt;
* Werewolves&lt;br /&gt;
* Quantum&lt;br /&gt;
&lt;br /&gt;
In this case:&lt;br /&gt;
* Set the scores so that the winner has the best score, and the other players have the same (lower) score.&lt;br /&gt;
* Add the following lines to gameinfos.jsonc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// If in the game, all losers are equal (no score to rank them or explicit in the rules that losers are not ranked between them), set this to true &lt;br /&gt;
// The game end result will display &amp;quot;Winner&amp;quot; for the 1st player and &amp;quot;Loser&amp;quot; for all other players&lt;br /&gt;
&amp;quot;losers_not_ranked&amp;quot;: true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Werewolves and Coup are implemented like this, as you can see here:&lt;br /&gt;
* https://boardgamearena.com/#!gamepanel?game=werewolves&amp;amp;section=lastresults&lt;br /&gt;
* https://boardgamearena.com/#!gamepanel?game=coupcitystate&amp;amp;section=lastresults&lt;br /&gt;
&lt;br /&gt;
Adding this has the following effects:&lt;br /&gt;
* On game results for this game, &amp;quot;Winner&amp;quot; or &amp;quot;Loser&amp;quot; is going to appear instead of the usual &amp;quot;1st, 2nd, 3rd, ...&amp;quot;.&lt;br /&gt;
* When a game is over, the result of the game will be &amp;quot;End of game: Victory&amp;quot; or &amp;quot;End of game: Defeat&amp;quot; depending on the result of the CURRENT player (instead of the usual &amp;quot;Victory of XXX&amp;quot;).&lt;br /&gt;
* When calculating ELO points, if there is at least one &amp;quot;Loser&amp;quot;, no &amp;quot;victorious&amp;quot; player can lose ELO points, and no &amp;quot;losing&amp;quot; player can win ELO point. Usually it may happened because being tie with many players with a low rank is considered as a tie and may cost you points. If losers_not_ranked is set, we prevent this behavior and make sure you only gain/loss ELO when you get the corresponding results.&lt;br /&gt;
&lt;br /&gt;
Important: this SHOULD NOT be used for cooperative games (see is_coop parameter), or for 2 players games (it makes no sense in this case).&lt;br /&gt;
&lt;br /&gt;
=== Solo ===&lt;br /&gt;
&lt;br /&gt;
If game supports solo variant, a negative or zero score means defeat, a positive score means victory.&lt;br /&gt;
&lt;br /&gt;
=== Player elimination ===&lt;br /&gt;
&lt;br /&gt;
In some games, this is useful to eliminate a player from the game in order he/she can start another game without waiting for the current game end.&lt;br /&gt;
&lt;br /&gt;
This case should be rare. Please don&#039;t use player elimination feature if some player just has to wait the last 10% of the game for game end. This feature should be used only in games where players are eliminated all along the game (typical examples: &amp;quot;Perudo&amp;quot; or &amp;quot;The Werewolves of Miller&#039;s Hollow&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
* In your PHP code:&lt;br /&gt;
  $this-&amp;gt;eliminatePlayer( &amp;lt;player_to_eliminate_id&amp;gt; );&lt;br /&gt;
* Player to eliminate should NOT be active anymore at the end of the action that triggers the eliminatePlayer function.&lt;br /&gt;
* the player is informed in a dialog box that he no longer have to play and can start another game if he/she wants too (with buttons &amp;quot;stay at this table&amp;quot; &amp;quot;quit table and back to main site&amp;quot;). In any case, the player is free to start &amp;amp; join another table from now.&lt;br /&gt;
* When your game is over, all players who have been eliminated before receive a &amp;quot;notification&amp;quot; (the small &amp;quot;!&amp;quot; icon on the top right of the BGA interface) that indicate them that &amp;quot;the game has ended&amp;quot; and invite them to review the game results.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; this should not be used on a player who has already left the game (&amp;quot;zombie&amp;quot;) as leaving/being kicked of the game (outside of the scope of the rules) is not the same as being eliminated from the game (according to the rules), except if in the course of the game, the zombie player is eliminated according to the rules.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; If you eliminate the last player, make sure the action will end by going to the end game state. If it doesn&#039;t, BGA will jump straight to it, without calling your end score state or anything similar.&lt;br /&gt;
&lt;br /&gt;
=== Player concede ===&lt;br /&gt;
&lt;br /&gt;
It should be rarely needed, but if you absolutely need to run some code when a player concedes, you can create a function called onConcede in the Game class like this :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function onConcede() {&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;test&#039;, &#039;Something to do when the player concedes&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to get the conceder id:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function onConcede($concederTeam) {&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;test&#039;, &#039;Something to do when the player concedes &#039;.$concederTeam-&amp;gt;players[0]-&amp;gt;id);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Never change state on this function. It should be limited to computing stats or similar small stuff.&lt;br /&gt;
&lt;br /&gt;
To not break the game end, any exception triggered by this function will be catched and simply logged, so make sure your code stay simple and never trigger an exception and it will be hard to detect!&lt;br /&gt;
&lt;br /&gt;
== Reflexion time ==&lt;br /&gt;
&lt;br /&gt;
; function giveExtraTime( $player_id, $specific_time=null )&lt;br /&gt;
: Give standard extra time to this player in real time game. It does not affect turn based games.&lt;br /&gt;
: Standard extra time (when you don&#039;t pass $specific_time) depends on the speed of the game (small with &amp;quot;slow&amp;quot; game option, bigger with other options).&lt;br /&gt;
: You can also specify an exact time to add, in seconds, with the &amp;quot;specific_time&amp;quot; argument (rarely used). Using $specific_time is not recommended as this does not adjust for the game speed.&lt;br /&gt;
: Important Note: the total reflection time cannot be more than time allowed for the turn. So you can never make it 10 minutes if turn max is 3 min (the max is determined by game speed). As a consequence there is no point adding this at the begging of the turn of in game setup, it only matters after the action which does not lead to turn end (which is when this player becomes inactive).&lt;br /&gt;
: Note: standard extra time is automatically doubled for begginer &lt;br /&gt;
&lt;br /&gt;
    function actionBla($args) {&lt;br /&gt;
        $this-&amp;gt;checkAction(&#039;actionBla&#039;);&lt;br /&gt;
        $playerId = (int)$this-&amp;gt;getActivePlayerId();&lt;br /&gt;
        $this-&amp;gt;giveExtraTime($player_id);&lt;br /&gt;
        // do some inter-turn action&lt;br /&gt;
        $this-&amp;gt;notifyAll(...);&lt;br /&gt;
        // no state transition as this player did an action but stayed active&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;tableOptions-&amp;gt;isTurnBased(): bool&#039;&#039;&#039;&lt;br /&gt;
: Returns true if game is turn based&lt;br /&gt;
:&lt;br /&gt;
; &#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;tableOptions-&amp;gt;isRealTime(): bool&#039;&#039;&#039;&lt;br /&gt;
: Returns true if game is in real time&lt;br /&gt;
&lt;br /&gt;
== Undo moves ==&lt;br /&gt;
&lt;br /&gt;
Please read our [[BGA Undo policy]] before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Before using these methods, you must also add the following to your &amp;quot;gameinfos.inc.php&amp;quot; file, otherwise these methods are ineffective:&lt;br /&gt;
  &#039;db_undo_support&#039; =&amp;gt; true&lt;br /&gt;
&lt;br /&gt;
Note: if you deploy undo support after game is in production this will take into effect for new games only, old games will give user an error if user choses Undo action, but otherwise it should not affect them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; function undoSavepoint( )&lt;br /&gt;
: Save the whole game situation inside an &amp;quot;Undo save point&amp;quot;.&lt;br /&gt;
: There is only ONE undo save point available (see [[BGA Undo policy]]). Cannot use in multiactivate state or in game state where next state is multiactive.&lt;br /&gt;
: Note: this function does not actually do anything when it is called, it only raises the flag to store the database AFTER transaction is over. So the actual state will be saved when you exit the function  calling it (technically before first queued notification is sent, which matters if you transition to game state not to user state after), this may affect what you end up saving.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; function undoRestorePoint()&lt;br /&gt;
: Restore the situation previously saved as an &amp;quot;Undo save point&amp;quot;.&lt;br /&gt;
: You must make sure that the active player is the same after and before the undoRestorePoint (ie: this is your responsibility to ensure that the player that is active when this method is called is exactly the same than the player that was active when the undoSavePoint method has been called).&lt;br /&gt;
&lt;br /&gt;
    function actUndo() {&lt;br /&gt;
        $this-&amp;gt;undoRestorePoint();&lt;br /&gt;
        return PlayTurn::class; // transition to single player state (i.e. beginning of player actions for this turn)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note&#039;&#039;&#039;: if you are reading game state variable right after restore (without changing state first) it won&#039;t work properly as the global table cache is not automatically refreshed after undoRestorePoint(). So you should either change state immediately to refresh game state values, or use $this-&amp;gt;gamestate-&amp;gt;reloadState() to refresh the state. If you choose to do the latest, be aware that this will bring the state machine back to the state during which the save point snapshot has been taken using undoSavepoint().&lt;br /&gt;
&lt;br /&gt;
=== Manually remove game logs ===&lt;br /&gt;
&amp;lt;strong style=&amp;quot;color: red;&amp;quot;&amp;gt;Only use it if you have custom undo and you fully understand how logs and replay works!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;getCurrentMoveId()&lt;br /&gt;
: Returns the current move id, when doing an action, that should be stored along informations to undo.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;remove(int $startMoveId)&lt;br /&gt;
: Remove all logs from a move id that was stored during an action using `getCurrentMoveId()`. &amp;lt;strong&amp;gt;The game should be in the exact same point as it was before the stored action!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        // in the action code, do all the action code, notify it, and store the custom undo&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(UNDO_ACTION, new Undo(&lt;br /&gt;
            movedTiles: $tiles, &lt;br /&gt;
            moveId: $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;getCurrentMoveId(),&lt;br /&gt;
        ));&lt;br /&gt;
&lt;br /&gt;
        return ConfirmAction::class;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO_ACTION);&lt;br /&gt;
        // in the undo action code, do all the revert action code, notify it, then remove the logs&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;remove($undo-&amp;gt;moveId);&lt;br /&gt;
        // don&#039;t do any action/notif after removing the logs&lt;br /&gt;
        return PlayAction::class;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Managing errors and exceptions ==&lt;br /&gt;
&lt;br /&gt;
Note: when you throw an exception, all database changes and all notifications are cancelled immediately. This way, the game situation that existed before the request is completely restored.&lt;br /&gt;
&lt;br /&gt;
; throw new UserException(string|NotificationMessage $message)&lt;br /&gt;
: Base class to notify a user error&lt;br /&gt;
: You must throw this exception when a player wants to do something that they are not allowed to do.&lt;br /&gt;
: The error message will be shown to the player as a &amp;quot;red message&amp;quot;.&lt;br /&gt;
: The error will be displayed to the player, as it&#039;s a UserException, the error message should be translated (with clientranslate(), and if there are args wrap them into a NotificationMessage)&lt;br /&gt;
: Throwing such an exception is NOT considered a bug, so it is not traced in BGA error logs.&lt;br /&gt;
&lt;br /&gt;
Note: if your IDE doesn&#039;t do it for you, you&#039;ll need to add &amp;lt;code&amp;gt;use Bga\GameFramework\UserException;&amp;lt;/code&amp;gt; at the top of your file.&lt;br /&gt;
&lt;br /&gt;
Example from Gomoku:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     throw new UserException(clienttranslate(&amp;quot;There is already a stone on this intersection, you can&#039;t play there&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example with translated UserException using args :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     throw new UserException(new NotificationMessage(clienttranslate(&#039;You must play a card bigger than ${min}&#039;, [min =&amp;gt; $minCardValue])));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; throw new SystemException (string|NotificationMessage $message)&lt;br /&gt;
: Base class to notify a system exception. The message will be hidden from the user, but show in the logs. Use this if the message contains technical information.&lt;br /&gt;
&lt;br /&gt;
; throw new VisibleSystemException (string|NotificationMessage $message)&lt;br /&gt;
: You must throw this exception when you detect something that is not supposed to happened in your code.&lt;br /&gt;
: The error message is shown to the user as an &amp;quot;Unexpected error&amp;quot;, in order that he can report it in the forum.&lt;br /&gt;
: The error message is logged in BGA error logs. &lt;br /&gt;
: it should not be translated, as it&#039;s just to bring debug details to you when the player reports the issue.&lt;br /&gt;
&lt;br /&gt;
== Zombie mode ==&lt;br /&gt;
&lt;br /&gt;
When a player leaves a game for any reason (expelled, quit), he becomes a &amp;quot;zombie player&amp;quot;. You must implement a Zombie that will handle the role of the leaver player&lt;br /&gt;
&lt;br /&gt;
Read [[Zombie Mode|Zombie mode]] to get all details of the expected code.&lt;br /&gt;
&lt;br /&gt;
== User preferences ==&lt;br /&gt;
&#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;userPreferences-&amp;gt;get(int $playerId, int $prefId): ?int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the value of a user preference for a player. It will return the value currently selected in the select combo box, in the top-right menu.&lt;br /&gt;
&lt;br /&gt;
== Player color preferences ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BGA premium users may choose their preferred color for playing. For example, if they are used to play green for every board game, they can select &amp;quot;green&amp;quot; in their BGA preferences page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To test it, you can set your preferred color on your BGA Studio account.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Making your game compatible with colors preferences is very easy and requires only 1 line of configuration change:&lt;br /&gt;
&lt;br /&gt;
On your gameinfos.jsonc file, add the following lines :&lt;br /&gt;
&lt;br /&gt;
  // Favorite colors support: if set to &amp;quot;true&amp;quot;, support attribution of favorite colors based on player&#039;s preferences (see reattributeColorsBasedOnPreferences PHP method)&lt;br /&gt;
  // NB: this parameter is used only to flag games supporting this feature; you must use (or not use) reattributeColorsBasedOnPreferences PHP method to actually enable or disable the feature.&lt;br /&gt;
  &amp;quot;favorite_colors_support&amp;quot;: true,&lt;br /&gt;
&lt;br /&gt;
Then, on your main &amp;lt;your_game&amp;gt;.game.php file check the code of &amp;quot;setupNewGame&amp;quot;. New template already have correct code, but if you editing very old game and it may be absent.&lt;br /&gt;
&lt;br /&gt;
        $gameinfos = $this-&amp;gt;getGameinfos();&lt;br /&gt;
        ...&lt;br /&gt;
        if ($gameinfos[&#039;favorite_colors_support&#039;])&lt;br /&gt;
            $this-&amp;gt;reattributeColorsBasedOnPreferences($players, $gameinfos[&#039;player_colors&#039;]); // this should be above reloadPlayersBasicInfos()&lt;br /&gt;
        $this-&amp;gt;reloadPlayersBasicInfos();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;reattributeColorsBasedOnPreferences&amp;quot; method reattributes all colors, taking into account players color preferences and available colors.&lt;br /&gt;
&lt;br /&gt;
Note that you must update the colors to indicate the colors available for your game.&lt;br /&gt;
&lt;br /&gt;
Some important remarks:&lt;br /&gt;
* for some games (i.e. Chess), the color has an influence on a mechanism of the game, most of the time by giving a special advantage to a player (i.e. Starting the game). Color preference mechanism must NOT be used in such a case.&lt;br /&gt;
* your logic should NEVER consider that the first player has the color X, that the second player has the color Y, and so on. If this is the case, your game will NOT be compatible with reattributeColorsBasedOnPreferences as this method attribute colors to players based on their preferences and not based as their order at the table.&lt;br /&gt;
&lt;br /&gt;
=== Custom color assignments ===&lt;br /&gt;
Some colors don&#039;t play nicely with BGA&#039;s color difference algorithm. If you receive feedback that colors are not well chosen, you can bypass the BGA algorithm by specifying a map from user preference colors to game colors.&lt;br /&gt;
&lt;br /&gt;
For example, you may wish to assign BGA&#039;s blue to your game&#039;s baby blue: &amp;lt;code&amp;gt;&amp;quot;0000ff&amp;quot; /* Blue */ =&amp;gt; &amp;quot;89CFF0&amp;quot;,&amp;lt;/code&amp;gt; whereas otherwise, a deep purple might be chosen instead. Just be sure that the assigned colors are also present in the &amp;lt;code&amp;gt;player_colors&amp;lt;/code&amp;gt; array passed to &amp;lt;code&amp;gt;reattributeColorsBasedOnPreferences&amp;lt;/code&amp;gt;, otherwise the assignment will be ignored.&lt;br /&gt;
&lt;br /&gt;
To do this, implement this method in your &amp;lt;code&amp;gt;X.game.php&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
Note: the user preference colors (the keys in the returned array) should not be modified, or the code may not work as expected. These are the colors players can choose between in their profile.&lt;br /&gt;
     /**&lt;br /&gt;
      * Returns an array of user preference colors to game colors.&lt;br /&gt;
      * Game colors must be among those which are passed to reattributeColorsBasedOnPreferences()&lt;br /&gt;
      * Each game color can be an array of suitable colors, or a single color:&lt;br /&gt;
      * [&lt;br /&gt;
      *    // The first available color chosen:&lt;br /&gt;
      *    &#039;ff0000&#039; =&amp;gt; [&#039;990000&#039;, &#039;aa1122&#039;],&lt;br /&gt;
      *    // This color is chosen, if available&lt;br /&gt;
      *    &#039;0000ff&#039; =&amp;gt; &#039;000099&#039;,&lt;br /&gt;
      * ]&lt;br /&gt;
      * If no color can be matched from this array, then the default implementation is used.&lt;br /&gt;
      */&lt;br /&gt;
     function getSpecificColorPairings(): array {&lt;br /&gt;
         return array(&lt;br /&gt;
             &amp;quot;ff0000&amp;quot; /* Red */         =&amp;gt; null,&lt;br /&gt;
             &amp;quot;008000&amp;quot; /* Green */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;0000ff&amp;quot; /* Blue */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;ffa500&amp;quot; /* Yellow */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;000000&amp;quot; /* Black */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;ffffff&amp;quot; /* White */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;e94190&amp;quot; /* Pink */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;982fff&amp;quot; /* Purple */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;72c3b1&amp;quot; /* Cyan */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;f07f16&amp;quot; /* Orange */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;bdd002&amp;quot; /* Khaki green */ =&amp;gt; null,&lt;br /&gt;
             &amp;quot;7b7b7b&amp;quot; /* Gray */        =&amp;gt; null,&lt;br /&gt;
         );&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
== Legacy games API ==&lt;br /&gt;
&lt;br /&gt;
For some very specific games (&amp;quot;legacy&amp;quot;, &amp;quot;campaign&amp;quot;), you need to keep some informations from a game to another.&lt;br /&gt;
&lt;br /&gt;
This should be an exceptional situation: the legacy API is costing resources on Board Game Arena databases, and is slowing down the game setup process + game end of game process. Please do not use it for things like:&lt;br /&gt;
* keeping a player preference/settings (=&amp;gt; player preferences and game options should be used instead)&lt;br /&gt;
* keeping a statistics, a score, or a ranking, while it is not planned in the physical board game, or while there is no added value compared to BGA statistics / rankings.&lt;br /&gt;
&lt;br /&gt;
You should use it for:&lt;br /&gt;
* legacy games: when some components of the game has been altered in a previous game and should be kept as it is.&lt;br /&gt;
* &amp;quot;campaign style&amp;quot; games: when a player is getting a &amp;quot;reward&amp;quot; at the end of a game, and should be able to use it in further games.&lt;br /&gt;
&lt;br /&gt;
Important: you cannot store more than 64k of data (serialized as JSON) per player per game. If you go over 64k, storeLegacyData function is going to FAIL, and there is a risk to create a major bug (= players blocked) in your game. You MUST make sure that no more than 64k of data is used for each player for your game. For example, if you are implementing a &amp;quot;campaign style&amp;quot; game and if you allow a player to start multiple campaign, you must LIMIT the number of different campaign so that the total data size to not go over the limit. We strongly recommend you to use this:&lt;br /&gt;
&lt;br /&gt;
  try &lt;br /&gt;
  {&lt;br /&gt;
  	$this-&amp;gt;bga-&amp;gt;legacy-&amp;gt;setTeam( $my_data );&lt;br /&gt;
  }&lt;br /&gt;
  catch( \feException $e ) // \feException is a base class of \BgaSystemException and others...&lt;br /&gt;
  {&lt;br /&gt;
  	if( $e-&amp;gt;getCode() == FEX_legacy_size_exceeded )&lt;br /&gt;
  	{&lt;br /&gt;
  		// Do something here to free some space in Legacy data (ex: by removing some variables)&lt;br /&gt;
  	}&lt;br /&gt;
  	else&lt;br /&gt;
  		throw $e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
The keys may only contain letters and numbers, underscore seems not to be allowed.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;set(string $key, int $playerId, mixed $value, int $ttl = 365)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;storeLegacyData($player_id, $key, $data, $ttl = 365) )&lt;br /&gt;
: Store some data associated with $key for the given user / current game&lt;br /&gt;
: In the opposite of all other game data, this data will PERSIST after the end of this table, and can be re-used&lt;br /&gt;
: in a future table with the same game.&lt;br /&gt;
: IMPORTANT: The only possible place where you can use this method is when the game is over at your table (last game action). Otherwise, there is a risk of conflicts between ongoing games.    &lt;br /&gt;
: TTL is a time-to-live: the maximum, and default, is 365 days.&lt;br /&gt;
: In any way, the total data (= all keys) you can store for a given user+game is 64k (note: data is store serialized as JSON data)&lt;br /&gt;
: NOTICE: You can store some persistant data across all tables from your game using the specific player_id 0 which is unused. In such case, it&#039;s even more important to manage correctly the size of your data to avoid any exception or issue while storing updated data (ie. you can use this for some kind of leaderbord for solo game or contest)&lt;br /&gt;
: Note: This function cannot be called during game setup (will throw an error).&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;get(string $key, int $playerId, mixed $defaultValue = null)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;retrieveLegacyData($player_id, $key) ⚠️ this alias was returning a JSON-encoded value, while the get function returns the real value )&lt;br /&gt;
: Get data associated with $key for the current game&lt;br /&gt;
: This data is common to ALL tables from the same game for this player, and persist from one table to another.&lt;br /&gt;
: Note: calling this function has an important cost =&amp;gt; please call it few times (possibly: only ONCE) for each player for 1 game if possible&lt;br /&gt;
: Note: you can use &#039;%&#039; in $key to retrieve all keys matching the given patterns&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;delete(string $key, int $playerId)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;removeLegacyData($player_id, $key) )&lt;br /&gt;
: Remove some legacy data with the given key&lt;br /&gt;
: (useful to free some data to avoid going over 64k)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;setTeam(mixed $value, int $ttl = 365)&lt;br /&gt;
: ( deprecated alias: storeLegacyTeamData( $data, $ttl = 365 ) )&lt;br /&gt;
: Same as storeLegacyData, except that it stores some data for the whole team within the current table and does not use a key&lt;br /&gt;
: Ie: if players A, B and C are at a table, the legacy data will be saved for future table with (exactly) A, B and C on the table.&lt;br /&gt;
: This is useful for games which are intended to be played several time by the same team.&lt;br /&gt;
: Note: the data total size is still limited, so you must implement catch the FEX_legacy_size_exceeded exception if it happens&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;getTeam(mixed $defaultValue = null)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;retrieveLegacyData() ⚠️ this alias was returning a JSON-encoded value, while the getTeam function returns the real value )&lt;br /&gt;
: Same as retrieveLegacyData, except that it retrieves some data for the whole team within the current table (set by storeLegacyTeamData)&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;deleteTeam()&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;removeLegacyTeamData() )&lt;br /&gt;
: Same as removeLegacyData, except that it retrieves some data for the whole team within the current table (set by storeLegacyTeamData)&lt;br /&gt;
&lt;br /&gt;
== Players text input and moderation ==&lt;br /&gt;
This section concerns only games where the players have to write some words to play: games based on words, like &amp;quot;Just one&amp;quot; or &amp;quot;Codenames&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some players will use your game to write insults or profanities. As this is part of the game and not in the game chat, these words cannot be reported by players and moderated.&lt;br /&gt;
&lt;br /&gt;
If you met the following situation:&lt;br /&gt;
&lt;br /&gt;
* You are asking a player to type a text (word(s) or sentence)&lt;br /&gt;
* The player can enter any text (this is not a pre-selection or anything you can control)&lt;br /&gt;
* This text is visible by at least one other player&lt;br /&gt;
&lt;br /&gt;
Then, you must use the following method:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;function logTextForModeration( $player_id, $text )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
player_id = player who write the text&lt;br /&gt;
&lt;br /&gt;
text = text that has been written&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This function will have no visible consequence for your game, but will allow players to report the text to moderators if something happens.&lt;br /&gt;
&lt;br /&gt;
== Tournament API (🚧 Beta) ==&lt;br /&gt;
&lt;br /&gt;
The Tournament API is meant only for tournament encounters. It lets you persist per‑player data within a tournament and access deterministic seeds shared by all encounters of a tournament step.&lt;br /&gt;
&lt;br /&gt;
Do not use this for preferences or long‑term progression: if a table is not linked to a tournament, these requests will fail, and all tournament data is wiped when the tournament ends anyway.&lt;br /&gt;
&lt;br /&gt;
You can use it for:&lt;br /&gt;
* enforcing tournament‑wide constraints (ex: keep the same deck across all rounds)&lt;br /&gt;
* deterministic setup shared across a tournament step (ex: generate the same map layout for all encounters in a step)&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;isTournament()&lt;br /&gt;
: Returns true if this table is a tournament encounter.&lt;br /&gt;
: Use this to guard tournament‑only logic.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;getSeedInfo()&lt;br /&gt;
: Returns an associative array containing deterministic seeds for tournament encounters.&lt;br /&gt;
: Keys:&lt;br /&gt;
:* &amp;lt;code&amp;gt;tournament_seed&amp;lt;/code&amp;gt;: stable across the whole tournament.&lt;br /&gt;
:* &amp;lt;code&amp;gt;step_seed&amp;lt;/code&amp;gt;: stable across a tournament step (same for all encounters in that step).&lt;br /&gt;
:* &amp;lt;code&amp;gt;parent_tournament_seed&amp;lt;/code&amp;gt;: stable across the parent tournament (the reference tournament for sub-tournaments of Groups Stage tournament mode).&lt;br /&gt;
:&lt;br /&gt;
: Note: This call is already guarded internally, no external call is made unless the table is a tournament encounter.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;storePlayerGameData(int $playerId, string $key, mixed $data)&lt;br /&gt;
: Store per‑player game data for the current tournament.&lt;br /&gt;
: Data is JSON‑encoded automatically.&lt;br /&gt;
: The cumulative size of all data stored for a player in a tournament (even over multiple keys) is limited to 64 KiB.&lt;br /&gt;
: Keys must be 1–16 characters and letters/numbers only.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;retrievePlayerGameData(int $playerId, string $key)&lt;br /&gt;
: Retrieve per‑player game data for the current tournament.&lt;br /&gt;
: If `$key` contains &#039;%&#039;, returns an array of key =&amp;gt; value pairs (or [] if no match).&lt;br /&gt;
: Otherwise, returns a single value (or null if no match).&lt;br /&gt;
: Returned values are JSON‑decoded automatically.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;removePlayerGameData(int $playerId, string $key)&lt;br /&gt;
: Remove per‑player game data for the current tournament.&lt;br /&gt;
: You can use &#039;%&#039; in `$key` to remove multiple entries at once.&lt;br /&gt;
: All tournament data is removed automatically when the tournament is finished.&lt;br /&gt;
&lt;br /&gt;
== Language dependent games API ==&lt;br /&gt;
&lt;br /&gt;
This API is used for games that are heavily language dependent. Two most common use cases are:&lt;br /&gt;
* Games that have a language dependent component that are not necessarily translatable, typically a list of words. (Think of games like Codenames, Decrypto, Just One...)&lt;br /&gt;
* Games with massive communication where players would like to ensure that all participants speak the same language. (Think of games like Werewolf, The Resistance, maybe even dixit...)&lt;br /&gt;
&lt;br /&gt;
If this option is used, the table created will be limited only to users that have specific language in their profile. Player starting the game would be able to chose one of the languages they speak.&lt;br /&gt;
&lt;br /&gt;
There is a new property language_dependency in gameinfos.jsonc which can be set like this:&lt;br /&gt;
  &amp;quot;language_dependency&amp;quot;: false,  //or if the property is missing, the game is not language dependent&lt;br /&gt;
  &amp;quot;language_dependency&amp;quot;: true, //all players at the table must speak the same language&lt;br /&gt;
  &amp;quot;language_dependency&amp;quot;: { &amp;quot;1&amp;quot;: &amp;quot;en&amp;quot;, &amp;quot;2&amp;quot;: &amp;quot;fr&amp;quot;, &amp;quot;3&amp;quot;: &amp;quot;it&amp;quot; }, //1-based list of supported languages&lt;br /&gt;
&lt;br /&gt;
In the gamename.game.php file, you can get the id of selected language with the method &#039;&#039;&#039;getGameLanguage&#039;&#039;&#039;.&lt;br /&gt;
; function getGameLanguage()&lt;br /&gt;
: Returns an index of the selected language as defined in gameinfos.jsonc.&lt;br /&gt;
&lt;br /&gt;
Languages currently available on BGA are:&lt;br /&gt;
  &#039;ar&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;العربية&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ar_AE&#039; ),             // Arabic&lt;br /&gt;
  &#039;be&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;беларуская мова&amp;quot;, &#039;code&#039; =&amp;gt; &#039;be_BY&#039; ),     // Belarusian&lt;br /&gt;
  &#039;bn&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;বাংলা&amp;quot;, &#039;code&#039; =&amp;gt; &#039;bn_BD&#039; ),                // Bengali&lt;br /&gt;
  &#039;bg&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;български език&amp;quot;, &#039;code&#039; =&amp;gt; &#039;bg_BG&#039; ),      // Bulgarian&lt;br /&gt;
  &#039;ca&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;català&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ca_ES&#039; ),              // Catalan&lt;br /&gt;
  &#039;cs&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;čeština&amp;quot;, &#039;code&#039; =&amp;gt; &#039;cs_CZ&#039; ),             // Czech&lt;br /&gt;
  &#039;da&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;dansk&amp;quot;, &#039;code&#039; =&amp;gt; &#039;da_DK&#039; ),               // Danish&lt;br /&gt;
  &#039;de&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;deutsch&amp;quot;, &#039;code&#039; =&amp;gt; &#039;de_DE&#039; ),             // German&lt;br /&gt;
  &#039;el&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Ελληνικά&amp;quot;, &#039;code&#039; =&amp;gt; &#039;el_GR&#039; ),            // Greek&lt;br /&gt;
  &#039;en&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;English&amp;quot;, &#039;code&#039; =&amp;gt; &#039;en_US&#039; ),             // English&lt;br /&gt;
  &#039;es&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;español&amp;quot;, &#039;code&#039; =&amp;gt; &#039;es_ES&#039; ),             // Spanish&lt;br /&gt;
  &#039;et&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;eesti keel&amp;quot;, &#039;code&#039; =&amp;gt; &#039;et_EE&#039; ),          // Estonian       &lt;br /&gt;
  &#039;fi&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;suomi&amp;quot;, &#039;code&#039; =&amp;gt; &#039;fi_FI&#039; ),               // Finnish&lt;br /&gt;
  &#039;fr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;français&amp;quot;, &#039;code&#039; =&amp;gt; &#039;fr_FR&#039; ),            // French&lt;br /&gt;
  &#039;he&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;עברית&amp;quot;, &#039;code&#039; =&amp;gt; &#039;he_IL&#039; ),               // Hebrew       &lt;br /&gt;
  &#039;hi&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;हिन्दी&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hi_IN&#039; ),                 // Hindi&lt;br /&gt;
  &#039;hr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Hrvatski&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hr_HR&#039; ),            // Croatian&lt;br /&gt;
  &#039;hu&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;magyar&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hu_HU&#039; ),              // Hungarian&lt;br /&gt;
  &#039;id&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Bahasa Indonesia&amp;quot;, &#039;code&#039; =&amp;gt; &#039;id_ID&#039; ),    // Indonesian&lt;br /&gt;
  &#039;ms&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Bahasa Malaysia&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ms_MY&#039; ),     // Malaysian&lt;br /&gt;
  &#039;it&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;italiano&amp;quot;, &#039;code&#039; =&amp;gt; &#039;it_IT&#039; ),            // Italian&lt;br /&gt;
  &#039;ja&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;日本語&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ja_JP&#039; ),               // Japanese&lt;br /&gt;
  &#039;jv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Basa Jawa&amp;quot;, &#039;code&#039; =&amp;gt; &#039;jv_JV&#039; ),           // Javanese                       &lt;br /&gt;
  &#039;ko&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;한국어&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ko_KR&#039; ),               // Korean&lt;br /&gt;
  &#039;lt&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;lietuvių&amp;quot;, &#039;code&#039; =&amp;gt; &#039;lt_LT&#039; ),            // Lithuanian&lt;br /&gt;
  &#039;lv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;latviešu&amp;quot;, &#039;code&#039; =&amp;gt; &#039;lv_LV&#039; ),            // Latvian&lt;br /&gt;
  &#039;nl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;nederlands&amp;quot;, &#039;code&#039; =&amp;gt; &#039;nl_NL&#039; ),          // Dutch&lt;br /&gt;
  &#039;no&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;norsk&amp;quot;, &#039;code&#039; =&amp;gt; &#039;nb_NO&#039; ),               // Norwegian&lt;br /&gt;
  &#039;oc&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;occitan&amp;quot;, &#039;code&#039; =&amp;gt; &#039;oc_FR&#039; ),             // Occitan&lt;br /&gt;
  &#039;pl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;polski&amp;quot;, &#039;code&#039; =&amp;gt; &#039;pl_PL&#039; ),              // Polish&lt;br /&gt;
  &#039;pt&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;português&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;pt_PT&#039; ),          // Portuguese&lt;br /&gt;
  &#039;ro&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;română&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;ro_RO&#039;  ),            // Romanian&lt;br /&gt;
  &#039;ru&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Русский язык&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ru_RU&#039; ),        // Russian&lt;br /&gt;
  &#039;sk&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;slovenčina&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sk_SK&#039; ),          // Slovak&lt;br /&gt;
  &#039;sl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;slovenščina&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sl_SI&#039; ),         // Slovenian       &lt;br /&gt;
  &#039;sr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Српски&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sr_RS&#039; ),              // Serbian       &lt;br /&gt;
  &#039;sv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;svenska&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sv_SE&#039; ),             // Swedish&lt;br /&gt;
  &#039;tr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Türkçe&amp;quot;, &#039;code&#039; =&amp;gt; &#039;tr_TR&#039; ),              // Turkish       &lt;br /&gt;
  &#039;uk&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Українська мова&amp;quot;, &#039;code&#039; =&amp;gt; &#039;uk_UA&#039; ),     // Ukrainian&lt;br /&gt;
  &#039;zh&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;中文 (漢)&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;zh_TW&#039; ),           // Traditional Chinese (Hong Kong, Macau, Taiwan)&lt;br /&gt;
  &#039;zh-cn&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;中文 (汉)&amp;quot;, &#039;code&#039; =&amp;gt; &#039;zh_CN&#039; ),         // Simplified Chinese (Mainland China, Singapore)&lt;br /&gt;
&lt;br /&gt;
== Debugging and Tracing ==&lt;br /&gt;
&lt;br /&gt;
To debug php code you can use some tracing functions available from the parent class such as debug, trace, error, warn, dump.&lt;br /&gt;
  &lt;br /&gt;
  $this-&amp;gt;debug(&amp;quot;Ahh!&amp;quot;);&lt;br /&gt;
  $this-&amp;gt;dump(&#039;my_var&#039;,$my_var);&lt;br /&gt;
&lt;br /&gt;
See [[Practical_debugging]] section for complete information about debugging interfaces and where to find logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getBgaEnvironment(): string&#039;&#039;&#039;&lt;br /&gt;
:Returns &amp;quot;studio&amp;quot; for studio and &amp;quot;prod&amp;quot; for production environment (i.e. where games current runs). Only useful for debbugging hooks.&lt;br /&gt;
Note: alpha server is also &amp;quot;prod&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Creating other classes ==&lt;br /&gt;
&lt;br /&gt;
You can create other classes in the &amp;lt;code&amp;gt;modules/php&amp;lt;/code&amp;gt; dir, next to your &amp;lt;code&amp;gt;Game.php&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
If they are names following the PSR-4, they will be autoloaded by BGA (no require_once needed). This doesn&#039;t work for the &amp;quot;legacy way&amp;quot; (=&amp;lt;code&amp;gt;YourGameName.game.php&amp;lt;/code&amp;gt; at the game root dir).&lt;br /&gt;
&lt;br /&gt;
For example, writing &amp;lt;code&amp;gt;new ScoreManager()&amp;lt;/code&amp;gt; in your Game file will try to load the class &amp;lt;code&amp;gt;ScoreManager&amp;lt;/code&amp;gt; of namespace &amp;lt;code&amp;gt;Bga\Games\YourGameName&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;modules/php/ScoreManager.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to add namespace &amp;lt;code&amp;gt;Bga\Games\YourGameName;&amp;lt;/code&amp;gt; at the beginning of your module.&lt;br /&gt;
&lt;br /&gt;
You can even put these classes in sublevels : the class &amp;lt;code&amp;gt;Bga\Games\YourGameName\Cards\StandardCard&amp;lt;/code&amp;gt; will be automatically loaded if it is stored in &amp;lt;code&amp;gt;modules/php/Cards/StandardCard.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Main_game_logic:_Game.php&amp;diff=29774</id>
		<title>Main game logic: Game.php</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Main_game_logic:_Game.php&amp;diff=29774"/>
		<updated>2026-05-08T11:12:20Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Sending private data to some players */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
This is the main file for your game logic. Here you initialize the game, persist data, implement the rules and notify the client interface of changes.&lt;br /&gt;
&lt;br /&gt;
This is the main  class that implements the &amp;quot;server&amp;quot; callbacks. As it is a server it cannot initiate any data communicate with the game client (running in browser) and only can respond to client using notifications.&lt;br /&gt;
&lt;br /&gt;
Your php class instance won&#039;t be in memory between two callbacks, every time client send a request a new class will be created, constructor will be called and eventually your callback function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this file is now named Game.php, located in the modules/php directory. If you see it named yourgamename.game.php in the root dir, it&#039;s the legacy usage. In the legacy usage, the namepaces don&#039;t exists.&lt;br /&gt;
&lt;br /&gt;
== File Structure ==&lt;br /&gt;
&lt;br /&gt;
The details of how the file is structured are described directly with comments in the code skeleton provided to you.&lt;br /&gt;
 &lt;br /&gt;
Here is the basic structure:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;__construct&#039;&#039;&#039;: the game constructor, where you define global variables and initiaze class members.&lt;br /&gt;
* &#039;&#039;&#039;setupNewGame&#039;&#039;&#039;: initial setup of the game. Takes an array of players, indexed by player_id. Structure of each player includes player_name, player_canal, player_avatar, and flags indicating admin/ai/premium/order/language/beginner.&lt;br /&gt;
* &#039;&#039;&#039;getAllDatas&#039;&#039;&#039;: where you retrieve all game data during a complete reload of the game. Return value must be associative array. Value of &#039;players&#039; is reserved for returning players data from players table, if you set it it must follow certain rules &lt;br /&gt;
        $result [&#039;players&#039;] = $this-&amp;gt;getCollectionFromDb(&amp;quot;SELECT `player_id` `id`, `player_score` `score`, `player_no` `no`, `player_color` `color` FROM `player`&amp;quot;);&lt;br /&gt;
        // Returned value must include [&#039;players&#039;][$player_id]][&#039;score&#039;] for scores to populate when F5 is pressed.&lt;br /&gt;
getAllDatas accepts a magic parameter &amp;lt;code&amp;gt;int $currentPlayerId&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;int $currentPlayerNo&amp;lt;/code&amp;gt;) to fetch the information from the point of view of the current player id (or no). It should not have any other parameter.&lt;br /&gt;
* &#039;&#039;&#039;getGameProgression&#039;&#039;&#039;: where you compute the game progression indicator. Returns a number indicating percent of progression (0-100). Used to calculate ELO changes of remaining players when a player quits, or as a conceding requirement (in non-tournament 2 player games, a player may concede if the progression is at least 50%).&lt;br /&gt;
* Utility functions: your utility functions.&lt;br /&gt;
* Player actions: the entry points for players actions ([https://en.doc.boardgamearena.com/Players_actions:_yourgamename.action.php more info here]). &lt;br /&gt;
* Game state arguments: methods to return additional data on specific game states ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#args more info here]).&lt;br /&gt;
* Game state actions: the logic to run when entering a new game state ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#action more info here]).&lt;br /&gt;
* &#039;&#039;&#039;initTable&#039;&#039;&#039;: (not part of template) - this function is called for every php callback by the framework and it can be implement by the game (empty by default). You can use it in rare cases where you need to read database and manipulate some data before any ANY php entry functions are called (such as getAllDatas,action*,st*, etc). Note: it is not called before arg* methods &lt;br /&gt;
* &#039;&#039;&#039;zombieTurn&#039;&#039;&#039;: what to do it&#039;s the turn of a zombie player.&lt;br /&gt;
* &#039;&#039;&#039;upgradeTableDb&#039;&#039;&#039;: function to migrate database if you change it after release on production.&lt;br /&gt;
* &#039;&#039;&#039;getGameName&#039;&#039;&#039;: returns the game name. This will be setup when you create the project. If you are copying files in from another project, make sure you keep this function intact. It must return the right game name, or lots of things will be broken.&lt;br /&gt;
&lt;br /&gt;
== Accessing player information ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: In the following methods, be mindful of the difference between the &amp;quot;active&amp;quot; player and the &amp;quot;current&amp;quot; player. The &#039;&#039;&#039;active&#039;&#039;&#039; player is the player whose turn it is - not necessarily the player who sent a request! The &#039;&#039;&#039;current&#039;&#039;&#039; player is the player who sent the request and will see the results returned by your methods: not necessarily the player whose turn it is!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; getPlayerCount() (or getPlayersNumber() that is an alias )&lt;br /&gt;
: Returns the number of players playing at the table&lt;br /&gt;
: Note: doesn&#039;t work in the beggining of setupNewGame (use count($players) instead). It will work after initialization of player table.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;getActivePlayerId(): string&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot;, whatever what is the current state type.&lt;br /&gt;
: Note: it does NOT mean that this player is active right now, because state type could be &amp;quot;game&amp;quot; or &amp;quot;multiplayer&amp;quot;&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in getArgs / onEnteringState / act functions, and shouldn&#039;t be needed anywhere else.&lt;br /&gt;
&lt;br /&gt;
; getActivePlayerName()&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot; name&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
&lt;br /&gt;
; getPlayerNameById($player_id)&lt;br /&gt;
: Get the name by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerNameByNo($playerNo)&lt;br /&gt;
: Get the name by no&lt;br /&gt;
&lt;br /&gt;
; getPlayerColorById($player_id)&lt;br /&gt;
: Get the color by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerNoById($player_id)&lt;br /&gt;
: Get &#039;player_no&#039; (number) by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerIdByNo(int $playerNo) int&lt;br /&gt;
: Get the player id by player no.&lt;br /&gt;
&lt;br /&gt;
; loadPlayersBasicInfos()&lt;br /&gt;
: Get an associative array with generic data about players (ie: not game specific data).&lt;br /&gt;
: The key of the associative array is the player id. The returned table is cached, so ok to call multiple times without performance concerns.&lt;br /&gt;
: The content of each value is:&lt;br /&gt;
: * player_name - the name of the player&lt;br /&gt;
: * player_color (ex: ff0000) - the color code of the player (as string)&lt;br /&gt;
: * player_no - the position of the player at the start of the game in natural table order, i.e. 1,2,3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                $players = $this-&amp;gt;loadPlayersBasicInfos();&lt;br /&gt;
                foreach ($players as $player_id =&amp;gt; $info) {&lt;br /&gt;
                    $player_color = $info[&#039;player_color&#039;];&lt;br /&gt;
                    ...&lt;br /&gt;
                }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: if you want array of player ids only you can do this:&lt;br /&gt;
    $player_ids =  array_keys($this-&amp;gt;loadPlayersBasicInfos());  &lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerId(bool $bReturnNullIfNotLogged = false) string&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot;. The current player is the one from which the action originated (the one who sent the request).&lt;br /&gt;
: &#039;&#039;&#039;Be careful&#039;&#039;&#039;: This is not necessarily the active player!&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in act functions, and also in getAllDatas, and shouldn&#039;t be needed anywhere.&lt;br /&gt;
: &#039;&#039;&#039;Very important&#039;&#039;&#039;: in your setupNewGame and zombieTurn function, you must never use getCurrentPlayerId() or getCurrentPlayerName(), &lt;br /&gt;
: otherwise it will fail with a &amp;quot;Not logged&amp;quot; error message (these actions are triggered from the main site and propagated to the gameserver from a server, not from a browser. As a consequence, there is no current player associated to these actions).&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerName(bool $bReturnEmptyIfNotLogged = false) string&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; name. &lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Can be easily replaced by $this-&amp;gt;getPlayerNameById($currentPlayerId);&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerColor()&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; color. &lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Can be easily replaced by $this-&amp;gt;getPlayerColorById($currentPlayerId);&lt;br /&gt;
&lt;br /&gt;
; isCurrentPlayerZombie()&lt;br /&gt;
: Check the &amp;quot;current_player&amp;quot; zombie status. If true, player is zombie, i.e. left or was kicked out of the game.&lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Should never be needed, zombie players should behave like real players, and everything specific to zombie should be set in the zombie method only.&lt;br /&gt;
&lt;br /&gt;
; isSpectator()&lt;br /&gt;
: Check the &amp;quot;current_player&amp;quot; spectator status. If true, the user accessing the game is a spectator (not part of the game). For this user, the interface should display all public information, and no private information (like a friend sitting at the same table as players and just spectating the game).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For player score and tiebreaker, see [[Main game logic: Game.php#Manage player scores and Tie breaker]]&lt;br /&gt;
&lt;br /&gt;
== Accessing the database ==&lt;br /&gt;
&lt;br /&gt;
The main game logic should be the only point from which you should access the game database. You access your database using SQL queries with the methods below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BGA uses [http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-transactions.html database transactions]. This means that your database changes WON&#039;T BE APPLIED to the database until your request ends normally (web request, not database request). Using transactions is in fact very useful for you; at any time, if your game logic detects that something is wrong (example: a disallowed move), you just have to throw an exception and all changes to the game situation will be removed. This also means that you need not (and in fact cannot) use your own transactions for multiple related database operations.&lt;br /&gt;
&lt;br /&gt;
However there are sets of database operation that will do implicit commit (most common mistake is to use &amp;quot;TRUNCATE&amp;quot;), you cannot use these operations during the game, it breaks the unrolling of transactions and will lead to nasty issues&lt;br /&gt;
(https://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit).&lt;br /&gt;
&lt;br /&gt;
All methods below are part of game class (and view class) and can be accessed using $this-&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; DbQuery( string $sql )&lt;br /&gt;
: This is the generic method to access the database.&lt;br /&gt;
: It can execute any type of SELECT/UPDATE/DELETE/REPLACE/INSERT query on the database. Returns result of the query.&lt;br /&gt;
: For SELECT queries, the specialized methods below are much better.&lt;br /&gt;
: Do not use method for TRUNCATE, DROP and other table altering operations. See disclamer above about implicit commits. If you really need TRUNCATE use DELETE FROM xxx instead.&lt;br /&gt;
&lt;br /&gt;
; getUniqueValueFromDB( string $sql )&lt;br /&gt;
: Returns a unique value from DB or null if no value is found.&lt;br /&gt;
: $sql must be a SELECT query.&lt;br /&gt;
: Raise an exception if more than 1 row is returned.&lt;br /&gt;
&lt;br /&gt;
; getCollectionFromDB( string $sql, bool $bSingleValue=false ) array&lt;br /&gt;
: Returns an associative array of rows for a sql SELECT query.&lt;br /&gt;
: The key of the resulting associative array is the first field specified in the SELECT query.&lt;br /&gt;
: The value of the resulting associative array is an associative array with all the field specified in the SELECT query and associated values.&lt;br /&gt;
: First column must be a primary or alternate key (semantically, it does not actually have to declared in sql as such).&lt;br /&gt;
: The resulting collection can be empty (it won&#039;t be null).&lt;br /&gt;
: If you specified $bSingleValue=true and if your SQL query requests 2 fields A and B, the method returns an associative array &amp;quot;A=&amp;gt;B&amp;quot;, otherwise its A=&amp;gt;[A,B]&lt;br /&gt;
: Note: The name a bit misleading, it really return associative array, i.e. map and NOT a collection. You cannot use it to get list of values which may have duplicates (hence primary key requirement on first column). If you need simple array use getObjectListFromDB() method.&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getCollectionFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player`&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 1234 =&amp;gt; [ &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ],&lt;br /&gt;
 1235 =&amp;gt; [ &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 ]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getCollectionFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name` FROM `player`&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 1234 =&amp;gt; &#039;myuser0&#039;,&lt;br /&gt;
 1235 =&amp;gt; &#039;myuser1&#039;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyCollectionFromDB(string $sql) array&lt;br /&gt;
: Same as getCollectionFromDB($sdl), but raise an exception if the collection is empty. Note: this function does NOT have 2nd argument as previous one does.&lt;br /&gt;
&lt;br /&gt;
; getObjectFromDB(string $sql) array&lt;br /&gt;
: Returns one row for the sql SELECT query as an associative array or null if there is no result (where fields are keys mapped to values)&lt;br /&gt;
: Raise an exception if the query return more than one row (you can use LIMIT 1 in the query to avoid the exception)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player` WHERE `player_id` = &#039;$player_id&#039;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
  &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 &lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyObjectFromDB(string $sql) array&lt;br /&gt;
: Similar to previous one, but raise an exception if no row is found&lt;br /&gt;
&lt;br /&gt;
; getObjectListFromDB(string $sql, bool $bUniqueValue=false) array&lt;br /&gt;
: Return an array of rows for a sql SELECT query.&lt;br /&gt;
: The result is the same as &amp;quot;getCollectionFromDB&amp;quot; except that the result is a simple array (and not an associative array).&lt;br /&gt;
: The result can be empty.&lt;br /&gt;
: If you specified $bUniqueValue=true and if your SQL query request 1 field, the method returns directly an array of values.&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectListFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player`&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 [ &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ],&lt;br /&gt;
 [ &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 ]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectListFromDB( &amp;quot;SELECT `player_name` `name` FROM `player`&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 &#039;myuser0&#039;,&lt;br /&gt;
 &#039;myuser1&#039;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getDoubleKeyCollectionFromDB(string $sql, bool $bSingleValue=false) array&lt;br /&gt;
: Return an associative array of associative array, from a SQL SELECT query.&lt;br /&gt;
: First array level correspond to first column specified in SQL query.&lt;br /&gt;
: Second array level correspond to second column specified in SQL query.&lt;br /&gt;
: If $bSingleValue = true, keep only third column on result&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; DbGetLastId()&lt;br /&gt;
: Return the PRIMARY key of the last inserted row (see PHP mysql_insert_id function).&lt;br /&gt;
&lt;br /&gt;
; DbAffectedRow() int&lt;br /&gt;
: Return the number of row affected by the last operation&lt;br /&gt;
&lt;br /&gt;
; escapeStringForDB(string $string) string&lt;br /&gt;
: You must use this function on every string type data in your database that contains unsafe data.&lt;br /&gt;
: (unsafe = can be modified by a player).&lt;br /&gt;
: This method makes sure that no SQL injection will be done through the string used, &#039;&#039;&#039;as long as the SQL statement uses single quotes around the string.  This is important!&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;Note: if you using standard types in ajax actions, like AT_alphanum it is sanitized before arrival. This function is only needed if you manage to get an unchecked string, like in the games where user has to enter text as a response.&#039;&#039;&lt;br /&gt;
&#039;&#039;Note: This function does not escape % and _ by default, which are wildcards if used in an SQL &amp;quot;LIKE&amp;quot; statement. The developer must determine if this is desirable behavior.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: see Editing [[Game database model: dbmodel.sql]] to know how to define your database model.&lt;br /&gt;
&lt;br /&gt;
== Use bga globals ==&lt;br /&gt;
Sometimes, you want a single global value for your game, and you don&#039;t want to create a DB table specifically for it.&lt;br /&gt;
&lt;br /&gt;
You can do this with the BGA framework &amp;quot;globals&amp;quot;. Your value will be stored in the &amp;quot;bga_globals&amp;quot; table in the database, and you can access it with simple methods.&lt;br /&gt;
&lt;br /&gt;
The keys are strings, so you might want to store them in constants to avoid mistakes (the key must be at maximum 50 characters long).&lt;br /&gt;
&lt;br /&gt;
The variable can be of any type (number, string, array, object) and will be stored as a JSON (so functions cannot be stored, and circular references on objects will trigger an Exception when storing).&lt;br /&gt;
&lt;br /&gt;
Having a string key and a JSON serialization allows you to debug easily by looking at the bga_globals table content.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: this globals module doesn&#039;t use cache, so every call to one of the following methods makes a DB request.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;set(string $name, $mixed $obj): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Define the value of a global variable.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const FIRST_PLAYER_ID = &amp;quot;firstPlayerId&amp;quot;;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(FIRST_PLAYER_ID, array_keys($players)[0]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;get(string $name, $mixed $defaultValue = null, ?string $class = null): mixed&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the value of a global variable. Returns `null` if not set, except specified otherwise in the optional `$defaultValue`.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$currentFirstPlayerId = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(FIRST_PLAYER_ID);&lt;br /&gt;
...&lt;br /&gt;
$selectedCardsIds = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(SELECTED_CARDS_IDS, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can specify the expected class type, if you save a class and don&#039;t want it returned as a stdClass.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$undo = new Undo($playerId, $moves);&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(UNDO, $undo);&lt;br /&gt;
&lt;br /&gt;
$undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO); // will return an stdClass&lt;br /&gt;
$undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO, class: Undo::class); // will return an Undo class&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: your class should be a plain object with no mandatory constructor params. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Undo {&lt;br /&gt;
    public function __construct(&lt;br /&gt;
        public ?int $playerId = null,&lt;br /&gt;
        public ?array $moves = null,&lt;br /&gt;
    ) {}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;getAll(...$names): array&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the value of all global variables, as a key=&amp;gt;value array. You can set a list of names to only get matching variables. In that case, non-existent keys will not be set in the returned array, so if you have a key with null value, it means the key has been set to null previously.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$variables = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll();&lt;br /&gt;
...&lt;br /&gt;
$diceVariables = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll(DIE1, DIE2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use with PHP&#039;s [https://www.php.net/extract extract()] function to quickly assign multiple variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
extract($this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll(&#039;endTime&#039;, &#039;hour&#039;, &#039;vipWelcome&#039;));&lt;br /&gt;
// $endTime, $hour, and $vipWelcome (may) now exist&lt;br /&gt;
&lt;br /&gt;
if (!empty($endTime)) {&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;delete(...$names): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Delete a global variable or a list of global variables stored in database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;delete(SELECTED_CARDS_IDS);&lt;br /&gt;
...&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;delete(SELECTED_CARDS_IDS, UNDO, AFTER_DISCARD_RETURN_STATE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;has(string $name): bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Indicates if a global variable is stored in database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cardSelectionIsStarted = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;has(SELECTED_CARDS_IDS);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;inc(string $name, $int $inc): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increments the value of a global variable, and return the incremented value. Will trigger an exception if the variable is not a numeric value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;inc(PLAYED_ACTIONS_IN_CURRENT_TURN, 1);&lt;br /&gt;
...&lt;br /&gt;
$totalSpent = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;inc(SPENT_COINS_IN_CURRENT_TURN, $cardCost);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use globals (numbers only / game options) ==&lt;br /&gt;
&lt;br /&gt;
Before the `$this-&amp;gt;globals`, you could only store numeric values as globals. Theses &amp;quot;GameStateValues&amp;quot; are stored in the &amp;quot;global&amp;quot; table in the database, and you can access it with simple methods.&lt;br /&gt;
&lt;br /&gt;
All methods below are members of the game class and should be accessed via $this-&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;initGameStateLabels(array $labelsMap): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method should be located at the beginning of constructor of &#039;&#039;yourgamename.game.php&#039;&#039;. This is where you define the globals used in your game logic, by assigning them IDs.&lt;br /&gt;
&lt;br /&gt;
You can define up to 80 globals, with IDs from 10 to 89 (inclusive, there can be gaps). &lt;br /&gt;
Also you must use this method to access value of game options [[Game_options_and_preferences:_gameoptions.inc.php]], in that case, IDs need to be between 100 and 199.&lt;br /&gt;
You must &#039;&#039;&#039;not&#039;&#039;&#039; use globals outside the range defined above, as those values are used by other components of the framework.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   function __construct() {&lt;br /&gt;
        parent::__construct();&lt;br /&gt;
        $this-&amp;gt;initGameStateLabels([ &lt;br /&gt;
                &amp;quot;my_first_global_variable&amp;quot; =&amp;gt; 10,&lt;br /&gt;
                &amp;quot;my_second_global_variable&amp;quot; =&amp;gt; 11,&lt;br /&gt;
                &amp;quot;my_game_variant&amp;quot; =&amp;gt; 100&lt;br /&gt;
        ]);&lt;br /&gt;
         // other code ...&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: The methods below WILL throw an exception if label is not defined using the call above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateInitialValue( string $label, int $value ): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Initialize global value. This is not required if you ok with default value if 0. This should be called from setupNewGame function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getGameStateValue( string $label, int $default = 0): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Retrieve the value of a global. Returns $default if global is not been initialized (by setGameStateInitialValue).&lt;br /&gt;
&lt;br /&gt;
NOTE: this method use globals &amp;quot;cache&amp;quot; if you directly manipulated globals table OR call this function after undoRestorePoint() - it won&#039;t work as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $value = $this-&amp;gt;getGameStateValue(&#039;my_first_global_variable&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateValue( string $label, int $value ): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Set the current value of a global. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $this-&amp;gt;setGameStateValue(&#039;my_first_global_variable&#039;, 42);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;incGameStateValue( string $label, int $increment ): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increment the current value of a global. If increment is negative, decrement the value of the global.&lt;br /&gt;
&lt;br /&gt;
Return the final value of the global. If global was not initialized it will initialize it as 0.&lt;br /&gt;
&lt;br /&gt;
NOTE: this method use globals &amp;quot;cache&amp;quot; if you directly manipulated globals table OR call this function after undoRestorePoint() - it won&#039;t work as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $value = $this-&amp;gt;incGameStateValue(&#039;my_first_global_variable&#039;, 1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BGA predefined globals ===&lt;br /&gt;
&lt;br /&gt;
BGA already defines some globals in the &#039;&#039;global&#039;&#039; database table. You should not change them directly but it can be useful to know what they mean when debugging:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! global_id !! label !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Current state &lt;br /&gt;
|-&lt;br /&gt;
| 2 || || Active player id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || next_move_id || Next move number&lt;br /&gt;
|-&lt;br /&gt;
| 4 ||  || Game id&lt;br /&gt;
|-&lt;br /&gt;
| 5 ||  || Table creator id&lt;br /&gt;
|-&lt;br /&gt;
| 6 || playerturn_nbr || Player turn number&lt;br /&gt;
|-&lt;br /&gt;
| 7 || gameprogression || Game progression&lt;br /&gt;
|-&lt;br /&gt;
| 8 || initial_reflexion_time || Initial reflection time&lt;br /&gt;
|-&lt;br /&gt;
| 9 || additional_reflexion_time || Additional reflection time&lt;br /&gt;
|-&lt;br /&gt;
| 200 || reflexion_time_profile ||  Game speed&lt;br /&gt;
Real-time games:&lt;br /&gt;
* 0 = Real-time • Fast paced&lt;br /&gt;
* 1 = Real-time • Normal speed&lt;br /&gt;
* 2 = Real-time • Slow speed&lt;br /&gt;
* 9 = No time limit • with friends only&lt;br /&gt;
&lt;br /&gt;
Turn-based games:&lt;br /&gt;
* 10 = Fast Turn-based • 24 moves per day&lt;br /&gt;
* 11 = Fast Turn-based • 12 moves per day&lt;br /&gt;
* 12 = Fast Turn-based • 8 moves per day&lt;br /&gt;
* 13 = Turn-based • 4 moves per day&lt;br /&gt;
* 14 = Turn-based • 3 moves per day&lt;br /&gt;
* 15 = Turn-based • 2 moves per day&lt;br /&gt;
* 17 = Turn-based • 1 move per day&lt;br /&gt;
* 19 = Turn-based • 1 move per 2 days&lt;br /&gt;
* 20 = No time limit • with friends only&lt;br /&gt;
|-&lt;br /&gt;
| 201 || bgaranking_mode || Game mode&lt;br /&gt;
* 0 = Normal mode&lt;br /&gt;
* 1 = Friendly mode (no ELO)&lt;br /&gt;
* 2 = Arena mode&lt;br /&gt;
|-&lt;br /&gt;
| 207 || game_language ||GAMESTATE_GAME_LANG&lt;br /&gt;
|-&lt;br /&gt;
| 300 || game_db_version ||GAMESTATE_GAMEVERSION: Current version of the game (when in production)&lt;br /&gt;
|-&lt;br /&gt;
| 301 || game_result_neutralized ||GAMESTATE_GAME_RESULT_NEUTRALIZED&lt;br /&gt;
|-&lt;br /&gt;
| 302 || neutralized_player_id ||GAMESTATE_NEUTRALIZED_PLAYER_ID&lt;br /&gt;
|-&lt;br /&gt;
| 304 || undo_moves_stored ||GAMESTATE_UNDO_MOVES_STORED&lt;br /&gt;
|-&lt;br /&gt;
| 305 || undo_moves_player ||GAMESTATE_UNDO_MOVES_PLAYER&lt;br /&gt;
|-&lt;br /&gt;
| 306 || lock_screen_timestamp ||GAMESTATE_LOCK_TIMESTAMP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game states and active players ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Activate player handling ===&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;activeNextPlayer()&lt;br /&gt;
: Make the next player active in the natural player order.&lt;br /&gt;
: Note: you must transition to a state in the action triggering this call, so the change of active player is notified to the front.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;activePrevPlayer()&lt;br /&gt;
: Make the previous player active (in the natural player order).&lt;br /&gt;
: Note: you must transition to a state in the action triggering this call, so the change of active player is notified to the front.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;changeActivePlayer( $player_id )&lt;br /&gt;
: You can call this method to make any player active.&lt;br /&gt;
: Note: you must transition to a state in the action triggering this call, so the change of active player is notified to the front.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;getActivePlayerId() string&lt;br /&gt;
: Return the &amp;quot;active_player&amp;quot; id&lt;br /&gt;
: Note: it does NOT mean that this player is active right now, because state type could be GAME or MULTIPLE_ACTIVE_PLAYER&lt;br /&gt;
: Note: avoid using this method in a MULTIPLE_ACTIVE_PLAYER state because it does not mean anything.&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in getArgs / onEnteringState / act functions, and shouldn&#039;t be needed anywhere else.&lt;br /&gt;
&lt;br /&gt;
=== Multiple activate player handling ===&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive()&lt;br /&gt;
: All playing players are made active. Update notification is sent to all players (this will trigger &#039;&#039;&#039;onUpdateActionButtons&#039;&#039;&#039;).&lt;br /&gt;
: Usually, you use this method at the beginning of a game state (e.g., &amp;quot;stGameState&amp;quot;) which transitions to a MULTIPLE_ACTIVE_PLAYER state in which multiple players have to perform some action. Do not use this method if you going to make some more changes in the active player list. (I.e., if you want to take away MULTIPLE_ACTIVE_PLAYER status immediately afterwards, use setPlayersMultiactive instead.)&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function st_MultiPlayerInit() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;stMakeEveryoneActive()&lt;br /&gt;
:this method can be used in state machine to make everybody active as &amp;quot;st&amp;quot; method of multiplayeractive state, it just calls $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive()&lt;br /&gt;
&lt;br /&gt;
This is to be used in state declaration:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    2 =&amp;gt; array(&lt;br /&gt;
    		&amp;quot;name&amp;quot; =&amp;gt; &amp;quot;playerTurnPlace&amp;quot;,&lt;br /&gt;
    		&amp;quot;description&amp;quot; =&amp;gt; \clienttranslate(&#039;Other player must place ships&#039;),&lt;br /&gt;
    		&amp;quot;descriptionmyturn&amp;quot; =&amp;gt; \clienttranslate(&#039;${you} must place ships (click on YOUR SHIPS board to place)&#039;),&lt;br /&gt;
    		&amp;quot;type&amp;quot; =&amp;gt; MULTIPLE_ACTIVE_PLAYER,&lt;br /&gt;
                &#039;action&#039; =&amp;gt; &#039;stMakeEveryoneActive&#039;,&lt;br /&gt;
                &#039;args&#039; =&amp;gt; &#039;arg_playerTurnPlace&#039;,&lt;br /&gt;
    	     	&amp;quot;possibleactions&amp;quot; =&amp;gt; array( &amp;quot;actionBla&amp;quot; ),&lt;br /&gt;
                &amp;quot;transitions&amp;quot; =&amp;gt; array( &amp;quot;next&amp;quot; =&amp;gt; 4, &amp;quot;last&amp;quot; =&amp;gt; 99)&lt;br /&gt;
    ),&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setAllPlayersNonMultiactive( $next_state )&lt;br /&gt;
: All playing players are made inactive. Transition to next state, by transition name or State class name.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive( $players, $next_state, $bExclusive = false )&lt;br /&gt;
: Make a specific list of players active during a multiactive gamestate. Update notification is sent to all players whose state changed.&lt;br /&gt;
: &amp;quot;players&amp;quot; is the array of player id that should be made active. If &amp;quot;players&amp;quot; is not empty the value of &amp;quot;next_state&amp;quot; will be ignored (you can put whatever you want)&lt;br /&gt;
: If &amp;quot;bExclusive&amp;quot; parameter is not set or false it doesn&#039;t deactivate other previously active players. If its set to true, the players who will be multiactive at the end are only these in &amp;quot;$players&amp;quot; array&lt;br /&gt;
&lt;br /&gt;
: In case &amp;quot;players&amp;quot; is empty, the method trigger the &amp;quot;next_state&amp;quot; transition, by transition name or State class name, to go to the next game state.&lt;br /&gt;
: returns true if state transition happened, false otherwise&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $player_id, $next_state )&lt;br /&gt;
: During a multiactive game state, make the specified player inactive.&lt;br /&gt;
: Usually, you call this method during a multiactive game state after a player did his action. It is also possible to call it directly from multiplayer action handler.&lt;br /&gt;
: If this player was the last active player, the method trigger the &amp;quot;next_state&amp;quot; transition, by transition name or State class name, to go to the next game state.&lt;br /&gt;
: returns true if state transition happened, false otherwise&lt;br /&gt;
Example of usage (see state declaration of playerTurnPlace above):&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actionBla($args) {&lt;br /&gt;
        $this-&amp;gt;checkAction(&#039;actionBla&#039;);&lt;br /&gt;
        // handle the action using $this-&amp;gt;getCurrentPlayerId()&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $this-&amp;gt;getCurrentPlayerId(), &#039;next&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getActivePlayerList()&lt;br /&gt;
: With this method you can retrieve the list of the active player at any time.&lt;br /&gt;
: During a GAME type gamestate, it will return a void array.&lt;br /&gt;
: During a ACTIVE_PLAYER type gamestate, it will return an array with one value (the active player id).&lt;br /&gt;
: During a MULTIPLE_ACTIVE_PLAYER type gamestate, it will return an array of the active players id.&lt;br /&gt;
: Note: you should only use this method in the latter case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;  $this-&amp;gt;gamestate-&amp;gt;updateMultiactiveOrNextState( $next_state_if_none )&lt;br /&gt;
: Sends update notification about multiplayer changes. All multiactive set* functions above do that, however if you want to change state manually using db queries for complex calculations, you have to call this yourself after. Do not call this if you calling one of the other setters above. Next state param is a transition name or State class name.&lt;br /&gt;
Example: you have player teams and you want to activate all players in one team&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;0&#039;&amp;quot;;&lt;br /&gt;
        $this-&amp;gt;DbQuery( $sql );&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;1&#039; WHERE `player_id` = &#039;$player_id&#039; AND `player_team` = &#039;$team_no&#039;&amp;quot;;&lt;br /&gt;
        $this-&amp;gt;DbQuery( $sql );&lt;br /&gt;
        &lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;updateMultiactiveOrNextState( &#039;error&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; updating database manually&lt;br /&gt;
: Use this helper function to change multiactive state without sending notification&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    /**&lt;br /&gt;
     * Changes values of multiactivity in db, does not sent notifications.&lt;br /&gt;
     * To send notifications after use updateMultiactiveOrNextState&lt;br /&gt;
     * @param number $player_id, player id &amp;lt;=0 or null - means ALL&lt;br /&gt;
     * @param number $value - 1 multiactive, 0 non multiactive&lt;br /&gt;
     */&lt;br /&gt;
    function dbSetPlayerMultiactive($player_id = -1, $value = 1) {&lt;br /&gt;
        if (! $value)&lt;br /&gt;
            $value = 0;&lt;br /&gt;
        else&lt;br /&gt;
            $value = 1;&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;$value&#039; WHERE `player_zombie` = 0 and `player_eliminated` = 0&amp;quot;;&lt;br /&gt;
        if ($player_id &amp;gt; 0) {&lt;br /&gt;
            $sql .= &amp;quot; AND `player_id` = $player_id&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $this-&amp;gt;DbQuery($sql);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;$this-&amp;gt;gamestate-&amp;gt;isPlayerActive($player_id)&lt;br /&gt;
:Return true if specified player is active right now.&lt;br /&gt;
:This method take into account game state type, ie nobody is active if game state is &amp;quot;game&amp;quot; and several players can be active if game state is &amp;quot;multiplayer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;$this-&amp;gt;bIndependantMultiactiveTable&lt;br /&gt;
:This flag can be set to true in constructor of game.php to force creation of second table to handle multiplayer states (normally these are in player table), this is very advanced feature.&lt;br /&gt;
:ONLY use it after you deploy you game to production if you receive unusual amount of bug report with dead lock symptoms DURING multiactiveplayer states&lt;br /&gt;
    function __construct() {&lt;br /&gt;
      ...&lt;br /&gt;
      $this-&amp;gt;bIndependantMultiactiveTable=true;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== States functions ===&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextState( $transition )&lt;br /&gt;
: Change current state to a new state. Important: the $transition parameter is the name of the transition (or the state class name), and NOT the name of the target game state, see [[Your game state machine: states.inc.php]] for more information about states.&lt;br /&gt;
:&#039;&#039;with State classes, you should not need it and you can just return the class name of the next state.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$this-&amp;gt;gamestate-&amp;gt;jumpToState($stateNum)&#039;&#039;&#039;&lt;br /&gt;
: Change current state to a new state. Important: the $stateNum parameter is the key of the state. See [[Your game state machine: states.inc.php]] for more information about states.&lt;br /&gt;
: Note: this is very advanced method, it should not be used in normal cases. Specific advanced cases include - jumping to specific state from &amp;quot;do_anytime&amp;quot; actions, jumping to dispatcher state or jumping to recovery state from zombie player function&lt;br /&gt;
:&#039;&#039;with State classes, you should not need it and you can just return the class name of the next state.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;checkAction( $actionName, $bThrowException=true )&lt;br /&gt;
: Check if the current player can perform a specific action in the current game state, and optionally throw an exception if they can&#039;t.&lt;br /&gt;
: The action is valid if it is listed in the &amp;quot;possibleactions&amp;quot; array for the current game state (see game state description).&lt;br /&gt;
: This method MUST be the first one called in ALL your PHP methods that handle player actions that are not using [[Main game logic: yourgamename.game.php#Actions (autowired)|Action autowiring]], in order to make sure a player doesn&#039;t perform an action not allowed by the rules at the point in the game.  It should not be called from methods where the current player is not necessarily the active player, otherwise it may fail with an &amp;quot;It is not your turn&amp;quot; exception.&lt;br /&gt;
: If &amp;quot;bThrowException&amp;quot; is set to &amp;quot;false&amp;quot;, the function returns &#039;&#039;&#039;false&#039;&#039;&#039; in case of failure instead of throwing an exception. This is useful when several actions are possible, in order to test each of them without throwing exceptions.&lt;br /&gt;
:&#039;&#039;With auto-wired actions, you should not need it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction( $action )&lt;br /&gt;
: (rarely used)&lt;br /&gt;
: This works exactly like &amp;quot;checkAction&amp;quot; (above), except that it does NOT check if the current player is active.&lt;br /&gt;
: &#039;&#039;&#039;Note: This does NOT check either spectator or eliminated status, so those checks must be done manually.&#039;&#039;&#039;&lt;br /&gt;
: This is used specifically in certain game states when you want to authorize additional actions for players that are not active at the moment.&lt;br /&gt;
: Example: in &#039;&#039;Libertalia&#039;&#039;, you want to authorize players to change their mind about the card played. They are of course not active at the time they change their mind, so you cannot use &amp;quot;checkAction&amp;quot;; use &amp;quot;checkPossibleAction&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
This is how PHP action looks that returns player to active state (only for multiplayeractive states). To be able to execute this on client do not call checkAction on js side for this specific action.&lt;br /&gt;
&lt;br /&gt;
   function actUnpass(int $currentPlayerId) {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction(&#039;actUnpass&#039;); // player changed mind about passing while others were thinking&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive([$currentPlayerId], &#039;error&#039;, false);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()&lt;br /&gt;
: Returns the current main state, ignoring private parallel states.&lt;br /&gt;
: To get the state as an array, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()-&amp;gt;toArray()&amp;lt;/code&amp;gt; and it will get a result similar to $this-&amp;gt;gamestate-&amp;gt;state()&lt;br /&gt;
: To get the state name, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()-&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentMainStateId()&lt;br /&gt;
: Returns the current main state id, ignoring private parallel states. (previously, it was the state_id() function, that returned the state numer as a string).&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentState(int $playerId)&lt;br /&gt;
: Returns the current state for a player. If the player is in private parallel state, it means the current private state for this player.&lt;br /&gt;
: To get the state as an array, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentState($playerId)-&amp;gt;toArray()&amp;lt;/code&amp;gt;&lt;br /&gt;
: To get the state name, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentState($playerId)-&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentStateId(int $playerId)&lt;br /&gt;
: Returns the current state id for a player. If the player is in private parallel state, it means the current private state for this player.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;isMultiactiveState()&lt;br /&gt;
: Return true if we are in MULTIPLE_ACTIVE_PLAYER state, false otherwise&lt;br /&gt;
&lt;br /&gt;
=== Private parallel states ===&lt;br /&gt;
&lt;br /&gt;
See the overview of private parallel states [[Your_game_state_machine:_states.inc.php#Private_parallel_states|here]].&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers()&lt;br /&gt;
: All active players in a multiactive state are entering a first private state defined in the master state&#039;s initialprivate parameter.&lt;br /&gt;
: Every time you need to start a private parallel states you need to call this or similar methods below.&lt;br /&gt;
: Note: at least one player needs to be active (see [[#Multiple_activate_player_handling|above]]) and current game state must be a multiactive state with initialprivate parameter defined&lt;br /&gt;
: Note: initialprivate parameter of master state should be set to the id of the first private state. This private state needs to be defined in states.php with the type set to &#039;private&#039;.&lt;br /&gt;
: Note: this method is usually preceded with activating some or all players&lt;br /&gt;
: Note: initializing private state can run action or args methods of the initial private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stStartPlayerTurn() {&lt;br /&gt;
        // This is usually done in master state action method&lt;br /&gt;
        &lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers();&lt;br /&gt;
&lt;br /&gt;
        // in some cases you can move immediately some or all players to different private states&lt;br /&gt;
        if ($someCondition) {&lt;br /&gt;
            //move all players to different state &lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers(&amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($other condition) {&lt;br /&gt;
            //move single player to different state&lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($specificPlayerId, &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForPlayers($playerIds)&lt;br /&gt;
: Players with specified ids are entering a first private state defined in the master state initialprivate parameter.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateState($playerId)&lt;br /&gt;
: Player with the specified id is entering a first private state defined in the master state initialprivate parameter.&lt;br /&gt;
: Everytime you need to start a private parallel states you need to call this or similar methods above&lt;br /&gt;
: Note: player needs to be active (see [[#Multiple_activate_player_handling|above]]) and current game state must be a multiactive state with initialprivate parameter defined&lt;br /&gt;
: Note: initialprivate parameter of master state should be set to the id of the first private state. This private state needs to be defined in states.php with the type set to &#039;private&#039;.&lt;br /&gt;
: Note: this method is usually preceded with activating that player&lt;br /&gt;
: Note: initializing private state can run action or args methods of the initial private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function st_ChangeMind() {&lt;br /&gt;
        // This player finished his move before, but now decides change something while other players are still active&lt;br /&gt;
        // We activate the player and initialize his private state&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive([$this-&amp;gt;getCurrentPlayerId()], &amp;quot;&amp;quot;);&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateState(this-&amp;gt;getCurrentPlayerId());&lt;br /&gt;
&lt;br /&gt;
        // It is also possible to move the player to some other specific state immediately&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers($transition)&lt;br /&gt;
: All active players will transition to next private state by specified transition&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: transition should lead to another private state (i.e. a state with type defined as &#039;private&#039;&lt;br /&gt;
: Note: transition should be defined in private state in which the players currently are, or be a state class name.&lt;br /&gt;
: Note: this method can run action or args methods of the target state&lt;br /&gt;
: Note: this is usually used after initializing the private state to move players to specific private state according to the game logic&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stStartPlayerTurn() {&lt;br /&gt;
        // This is usually done in master state action method&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers();&lt;br /&gt;
&lt;br /&gt;
        if ($specificOption) {&lt;br /&gt;
            //move all players to different state &lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers(&amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForPlayers($playerIds, $transition)&lt;br /&gt;
: Players with specified ids will transition to next private state specified by provided transition, by transition name or State class name.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($playerId, $transition)&lt;br /&gt;
: Player with specified id will transition to next private state specified by provided transition, by transition name or State class name.&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: transition should lead to another private state (i.e. a state with type defined as &#039;private&#039;&lt;br /&gt;
: Note: transition should be defined in private state in which the players currently are. &lt;br /&gt;
: Note: this method can run action or args methods of the target state for specified player&lt;br /&gt;
: Note: this is usually used after some player actions to move to next private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actSomeAction() {&lt;br /&gt;
        $this-&amp;gt;checkAction(&amp;quot;actSomeAction&amp;quot;); //needs to be defined in the current state&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForAllPlayers()&lt;br /&gt;
: All players private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used &lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this is usually used to clean up after leaving a master state in which private states were used, but can be used in other cases when we want to exit private parallel states and use a regular multiactive state for all players&lt;br /&gt;
: Note: After unseting private state only actions on master state are possible&lt;br /&gt;
: Note: Usually it is not necessary to unset private states as they will be initialized to first private state when private states are needed again. Nevertheless it is generally better to clean private state after exiting private parallel states to avoid bugs. &lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stNextRound() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForAllPlayers();&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForPlayers($playerIds, $transition)&lt;br /&gt;
: For players with specified ids private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateState($playerId)&lt;br /&gt;
: For player with specified id private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used &lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this is usually used when deactivating player to clean up their parallel state&lt;br /&gt;
: Note: After unseting private state only actions on master state are possible&lt;br /&gt;
: Note: Usually it is not necessary to unset private state as it will be initialized to first private state when private states are needed again. Nevertheless it is generally better to clean private state when not needed to avoid bugs. &lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function done() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $this-&amp;gt;getCurrentPlayerId(), &amp;quot;newTurn&amp;quot; );&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;unsetPrivateState($this-&amp;gt;getCurrentPlayerId());&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPrivateState($playerId, $newStateId)&lt;br /&gt;
: For player with specified id a new private state would be set&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this should be rarely used as it doesn&#039;t check if the transition is allowed (it doesn&#039;t even specifies transition). This can be useful in very complex cases when standard state machine is not adequate (i.e. specific cards can lead to some micro action in various states where defining transitions back and forth can become very tedious.) NewStateId can also be a state class name.&lt;br /&gt;
: Note: this method can run action or args methods of the target state for specified player&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actSomeAction() {&lt;br /&gt;
        $this-&amp;gt;checkAction(&amp;quot;actSomeAction&amp;quot;); //needs to be defined in the current state&lt;br /&gt;
&lt;br /&gt;
        if ($playerHaveSpecificCard)&lt;br /&gt;
            return $this-&amp;gt;gamestate-&amp;gt;setPrivateState($this-&amp;gt;getCurrentPlayerId(), 35);&lt;br /&gt;
&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);        &lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getPrivateState($playerId) &lt;br /&gt;
: This return the private state or null if not initialized or not in private state&lt;br /&gt;
&lt;br /&gt;
==== State Arguments in Private parallel states ====&lt;br /&gt;
&lt;br /&gt;
The args method called for private states will have the player_id passed to it, allowing you to customise the arguments returned for that player.&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function argMyPrivateState($player_id) {&lt;br /&gt;
        return array(&lt;br /&gt;
          &#039;my_data&#039; =&amp;gt; $this-&amp;gt;getPlayerSpecificData($player_id)&lt;br /&gt;
        );&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inactive Players ====&lt;br /&gt;
&lt;br /&gt;
During Private Parallel State, active players will be managed by the private state that is current assigned to them.&lt;br /&gt;
&lt;br /&gt;
Inactive players will be managed by the master MULTIPLE_ACTIVE_PLAYER state, so your client should respond to that state in order to display any status message advising players that they are waiting for others to have their turn, or to add any buttons that allow players to potentially &amp;quot;break in&amp;quot; and become active.&lt;br /&gt;
&lt;br /&gt;
== Actions (autowired) ==&lt;br /&gt;
The action function should be prefixed by &amp;quot;act&amp;quot; and match the names specified in the &amp;quot;possibleactions&amp;quot; field on the state file.&lt;br /&gt;
&lt;br /&gt;
If your actions start with &amp;quot;act&amp;quot;, they will be autowired, that means you can declare action functions on the game.php file and call them directly from the front (with bgaPerformAction). You don&#039;t need to use action.php file anymore. The query param from the front request will be matched with the PHP variable of the same name, and it needs to be properly typed. This works for basic types: int, bool, float, string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public function actPlayCard(int $cardId) { ... }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This function can be called from front-side with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.bgaPerformAction(&#039;actPlayCard&#039;, {&lt;br /&gt;
  cardId: this.selectedCardId // the &amp;quot;cardId&amp;quot; param match the PHP variable name&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note: if you also declare the function in the action.php, it will be used instead of the autowiring)&lt;br /&gt;
&lt;br /&gt;
If you want more complex types like int array or JSON, you&#039;ll need to specify it using the Param attributes. Same if the PHP variable name is different from the front query param, or if you want to specify the tests that should be realized on the parameter before calling the function.&lt;br /&gt;
&lt;br /&gt;
=== Possible attributes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BoolParam(?string $name = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\BoolParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actRaiseBet(#[BoolParam(name: &#039;raise&#039;)] bool $raiseBet)&lt;br /&gt;
&lt;br /&gt;
public function actRaiseBet(#[BoolParam(name: &#039;raise&#039;)] bool $raise) // NOTE: it&#039;s the same as actRaiseBet(bool $raise) if PHP var name and param name are the same&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IntParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\IntParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actPlayCard(#[IntParam(name: &#039;id&#039;)] int $cardId)&lt;br /&gt;
&lt;br /&gt;
public function actSpendGold(#[IntParam(min: 1)] int $gold) // will trigger an exception if param is &amp;lt; 1&lt;br /&gt;
&lt;br /&gt;
public function actPlaceCardOnSpot(int $cardId, #[IntParam(min: 1, max: 5)] int $spot) // will trigger an exception if spot is not in 1 to 5 range&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FloatParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Works the same way as IntParam, import is &amp;lt;code&amp;gt;use \Bga\GameFramework\Actions\Types\FloatParam;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;StringParam(?string $name = null, public ?bool $alphanum = false, public ?bool $alphanum_dash = false, public ?bool $base64 = false, public ?array $enum)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\StringParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actSubmitWord(#[StringParam(alphanum: true)] string $word) // will trigger an exception if the word is not alphanum&lt;br /&gt;
&lt;br /&gt;
public function actChooseAction(#[StringParam(enum: [&#039;move&#039;, &#039;attack&#039;, &#039;pass&#039;])] string $action)  // will trigger an exception if the parameter doesn&#039;t match a value in the enum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: You should do one of the tests of the attribute, or test it yourself on the function, to ensure the user is not sending forbidden characters to the function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IntArrayParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\IntArrayParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actDiscardCards(#[IntArrayParam()] array $ids)&lt;br /&gt;
&lt;br /&gt;
public function actDiscardCards(#[IntArrayParam(min: 2, max: 8)] array $ids)  // will trigger an exception if the array length is not in the 2 to 8 range. It doesn&#039;t check the min/max of the array values!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function can be called from front-side with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const selectedCardIds = [8, 12, 25];&lt;br /&gt;
this.bgaPerformAction(&#039;actDiscardCards&#039;, {&lt;br /&gt;
  ids: selectedCardIds&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;JsonParam(?string $name = null, public ?bool $associative = true, public ?bool $alphanum = true)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\JsonParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam()] array $answer) {} // force conversion to array during PHP json decode&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(associative: false)] object $answer) {} // force conversion to object during PHP json decode&lt;br /&gt;
&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(associative: null)] mixed $answer) {} // default PHP json decode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 On client side:&lt;br /&gt;
&lt;br /&gt;
      const lala ={a: 2, b: &amp;quot;string&amp;quot;, c: [1,2,4]};&lt;br /&gt;
      this.bgaPerformAction(&amp;quot;actPlanComplexStuff&amp;quot;, {&lt;br /&gt;
        answer: JSON.stringify(lala)&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to decode the Json to a PHP class, similar to what is done with $this-&amp;gt;globals-&amp;gt;get with class parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\JsonParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
class Answer {&lt;br /&gt;
    public function __construct(&lt;br /&gt;
        public int $a,&lt;br /&gt;
        public string $b,&lt;br /&gt;
        public array $c,&lt;br /&gt;
    ) {}&lt;br /&gt;
}&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(class: Answer::class)] $answer) {} // specifying the class to map the json to&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam] Answer $answer) {} // same result, but the class is detected automatically by the framework thanks to the typed param.&lt;br /&gt;
&lt;br /&gt;
public function actPlanMultipleComplexStuff(#[JsonParam(class: Answer::class)] array $answers) {} // can decode an array of Answer::class&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== checkAction ===&lt;br /&gt;
The autowiring also triggers the checkAction, so you don&#039;t have to call it at the beginning of the function. If you need a function that should not trigger checkAction (an action that can be played during someone else turn), you can disable it this way: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\CheckAction;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#[CheckAction(false)]&lt;br /&gt;
public function actSetAutopass(bool $autopass) { ... }&lt;br /&gt;
&lt;br /&gt;
#[CheckAction(false)]&lt;br /&gt;
public function actCancelChooseAction() {&lt;br /&gt;
  $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction(&#039;actCancelChooseAction&#039;);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you disable &amp;lt;code&amp;gt;checkAction&amp;lt;/code&amp;gt;, you probably need to call &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;checkPossibleAction&amp;lt;/code&amp;gt; instead at the beginning of your function. You likely also want to disable client checkAction calls implied by bgaPerformAction.&lt;br /&gt;
&lt;br /&gt;
=== act prefix ===&lt;br /&gt;
The act prefix needed to activate the autowiring is not just to have some consistency in naming, it&#039;s also intended to protect your code. If we let autowired action to any function, a player may do a request to &#039;setPlayerScore&#039; function, even if you never intended for it to be called front side, and it would allow almost undetectable cheating for anyone reading the code of your game.&lt;br /&gt;
&lt;br /&gt;
== Players turn order ==&lt;br /&gt;
&lt;br /&gt;
When table is created the &amp;quot;natural&amp;quot; player order is assigned to player at random, and stored in &amp;quot;read-only&amp;quot; field &amp;quot;player_no&amp;quot;.&lt;br /&gt;
If you need to create a custom order you should never change natural order but have a separate data structure. &lt;br /&gt;
For example you can alter the players table to add another &amp;quot;custom_order&amp;quot; field, you can use state globals or you can use your natural board database, &lt;br /&gt;
to store meeple_color/position_location pair.&lt;br /&gt;
BGA currently does not provide any API to create/store custom player order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getNextPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return an associative array which associate each player with the next player around the table.&lt;br /&gt;
&lt;br /&gt;
In addition, key 0 is associated to the first player to play.&lt;br /&gt;
&lt;br /&gt;
Example: if three player with ID 1000, 2000 and 3000 are around the table, in this order, the method returns:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   array( &lt;br /&gt;
    1000 =&amp;gt; 2000, &lt;br /&gt;
    2000 =&amp;gt; 3000, &lt;br /&gt;
    3000 =&amp;gt; 1000, &lt;br /&gt;
    0 =&amp;gt; 1000 &lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPrevPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, but the associative array associate the previous player around the table. However there no 0 index here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerAfter( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing after given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerBefore( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing before given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
Note: There is no API to modify this order, if you have custom player order you have to maintain it in your database&lt;br /&gt;
and have custom function to access it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;createNextPlayerTable( $players, $bLoop=true )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using $players array creates a map of current =&amp;gt; next as in example from getNextPlayerTable(), however you can use custom order here. &lt;br /&gt;
If parmeter $bLoop is set to true then last player will points to first (creaing a loop), false otherwise.&lt;br /&gt;
In any case index 0 points to first player (first element of $players array). $players is array of player ids in desired order.&lt;br /&gt;
&lt;br /&gt;
Note: This function &#039;&#039;&#039;DOES NOT&#039;&#039;&#039; change the order in database, it only creates a map using key/values as descibed.&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function getNextPlayerTableCustom() {&lt;br /&gt;
        $starting = $this-&amp;gt;getStartingPlayer(); // custom function to get starting player&lt;br /&gt;
        $player_ids = $this-&amp;gt;getPlayerIdsInOrder($starting); // custom function to create players array starting from starting player&lt;br /&gt;
        return $this-&amp;gt;createNextPlayerTable($player_ids, false); // create next player table in custom order&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$table = $this-&amp;gt;createNextPlayerTable([3000,2000,1000], false);&lt;br /&gt;
&lt;br /&gt;
will return:&lt;br /&gt;
   [ &lt;br /&gt;
    3000 =&amp;gt; 2000, &lt;br /&gt;
    2000 =&amp;gt; 1000, &lt;br /&gt;
    1000 =&amp;gt; null,&lt;br /&gt;
    0 =&amp;gt; 3000 &lt;br /&gt;
   ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
&lt;br /&gt;
To understand notifications, please read [http://www.slideshare.net/boardgamearena/the-bga-framework-at-a-glance The BGA Framework at a glance] first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Notifications are crutial part of BGA framework. Everything which players see, including all changes which happen on frontend (including setup), are done via notfications.&lt;br /&gt;
&lt;br /&gt;
Some notifications are built into the framework, and others are custom, game specific notifications. Generally, you should not send or handle framework notifications, except exposed APIs.&lt;br /&gt;
&lt;br /&gt;
Example of framework notifications:&lt;br /&gt;
* game setup (first time client connects to game)&lt;br /&gt;
* game state change&lt;br /&gt;
* active player change&lt;br /&gt;
Example of custom notifications:&lt;br /&gt;
* game piece moved&lt;br /&gt;
* player scored points&lt;br /&gt;
&lt;br /&gt;
Notifications are queued, i.e. sent at the very end of the action, when it ends normally. It means that if you throw an exception for any reason (i.e: move is not allowed), no notifications will be sent to players.&lt;br /&gt;
&lt;br /&gt;
Notification can be sent from the following functions (and transive calls):&lt;br /&gt;
&lt;br /&gt;
* action handler (act* in State classes or Game.php). It is a MUST actually. At least one notification must be sent (but it includes state transition which sends it)&lt;br /&gt;
* game state transition (onEnteringState in State classes)&lt;br /&gt;
* setupNewGame (after player tables setup is finished)&lt;br /&gt;
&lt;br /&gt;
Notification cannot be sent from the following:&lt;br /&gt;
* .view.php&lt;br /&gt;
* .action.php&lt;br /&gt;
* material.inc.php&lt;br /&gt;
* constructor of .game.php&lt;br /&gt;
* arg* methods of .game.php&lt;br /&gt;
&lt;br /&gt;
There are conceptually two types of notification:&lt;br /&gt;
* public - sent to all clients who are listening - that includes all players in the table as well as spectators&lt;br /&gt;
* private - sent only to a single player&lt;br /&gt;
&lt;br /&gt;
The bundle of notifications sent at the end of an action is considered a single &amp;quot;move&amp;quot; and the table&#039;s move counter increases.&lt;br /&gt;
If you are ONLY sending private notifications during action handling, they will not have an associated &amp;lt;code&amp;gt;move_id&amp;lt;/code&amp;gt; (to avoid this, add simple public notification with empty message). &lt;br /&gt;
In the rare case that you want to change this behavior, you can apply some hackery described in [[BGA_Studio_Cookbook]]&lt;br /&gt;
&lt;br /&gt;
Note: the total notification size is now limited to 128K. It seems a lot, but don&#039;t forget that notification are bundled and only send at the end of an action which also INCLUDES all game state transitions that follow.&lt;br /&gt;
&lt;br /&gt;
The notifications are handled on JS side by subscribing to notifications (only do it for custom notifications!). See [Game_interface_logic:_yourgamename.js#Notifications]&lt;br /&gt;
&lt;br /&gt;
Do not put HTML in the notifications. If you want to have pretty pictures in the log check this [[BGA_Studio_Cookbook#Inject_images_and_styled_html_in_the_log]].&lt;br /&gt;
&lt;br /&gt;
=== Notify ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;all(string $notification_type,string | NotificationMessage $message,array $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Send a notification to all players of the game and spectators (public).&lt;br /&gt;
&lt;br /&gt;
* notification_type: A string that defines the type of your notification.&lt;br /&gt;
&lt;br /&gt;
Your game interface Javascript logic will use this to know what is the type of the received notification (and to trigger the corresponding method).&lt;br /&gt;
&lt;br /&gt;
* message: A string that defines what is to be displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
You can use an empty string here (&#039;&#039;). In this case, nothing is displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
Unless its empty, use &amp;quot;\clienttranslate&amp;quot; method to make sure string is translated.&lt;br /&gt;
&lt;br /&gt;
You can use arguments in your $notification_log string, that refers to values defines in the &amp;quot;$notification_args&amp;quot; argument (see below). &lt;br /&gt;
Note: Make sure you only use single quotes (&#039;), otherwise PHP will try to interpolate the variable and will ignore the values in the args array.&lt;br /&gt;
&lt;br /&gt;
* notification_args: The arguments of your notifications, as an associative array.&lt;br /&gt;
&lt;br /&gt;
This array will be transmitted to the game interface logic, in order the game interface can be updated.&lt;br /&gt;
&lt;br /&gt;
Complete notify all example (from &amp;quot;Reversi&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all( &amp;quot;playDisc&amp;quot;, clienttranslate( &#039;${player_name} plays a disc and turns over ${returned_nbr} disc(s)&#039; ),&lt;br /&gt;
 array(&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id),&lt;br /&gt;
        &#039;returned_nbr&#039; =&amp;gt; count( $turnedOverDiscs ),&lt;br /&gt;
        &#039;x&#039; =&amp;gt; $x,&lt;br /&gt;
        &#039;y&#039; =&amp;gt; $y&lt;br /&gt;
     ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see in the example above the use of the &amp;quot;\clienttranslate&amp;quot; method, and the use of 2 arguments &amp;quot;player_name&amp;quot; and &amp;quot;returned_nbr&amp;quot; in the notification log.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: NO private data must be sent with this method, as a cheater could see it even if it is not used explicitly by the game interface logic. If you want to send private information to a player, please use notify-&amp;gt;player below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: this array is serialized to be sent to the browsers, and will be saved with the notification to be able to replay the game later. If it is too big, it can make notifications slower / less reliable, and replay archives very big (to the point of failing). So as a general rule, you should send only the minimum of information necessary to update the client interface with no overhead in order to keep the notifications as light as possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: When the game page is reloaded (i.e. F5 or when loading turn based game) all previous notifications are replayed as history notifications. These notifications do not trigger notification handlers and are used basically to build the game log. Because of that most of the notification arguments (except i18n, player_id and all arguments referenced in the message), are removed from these history notifications. If you need additional arguments in history notifications you can add special field &amp;lt;b&amp;gt;preserve&amp;lt;/b&amp;gt; to notification arguments, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all( &amp;quot;playDisc&amp;quot;, clienttranslate( &#039;${player_name} plays a disc and turns over ${returned_nbr} disc(s)&#039; ),&lt;br /&gt;
 array(&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id),&lt;br /&gt;
        &#039;returned_nbr&#039; =&amp;gt; count( $turnedOverDiscs ),&lt;br /&gt;
        &#039;x&#039; =&amp;gt; $x,&lt;br /&gt;
        &#039;y&#039; =&amp;gt; $y,&lt;br /&gt;
        &#039;preserve&#039; =&amp;gt; [ &#039;x&#039;, &#039;y&#039; ]&lt;br /&gt;
     ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, fields x and y will be preserved when replaying history notification at the game load.&lt;br /&gt;
&lt;br /&gt;
NOTE: The ONLY reason &#039;preserve&#039; is useful if you have custom method to render notifications in game log which changes some text arguments into html (i.e. to insert the images instead of plain text). Do not use preserve &amp;quot;just in case&amp;quot; - it will only bloat the logs and make game load VERY slow.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: If both public and private notifications are sent to the same player in the same action (AJAX call), they will initially appear in the log in the order in which they were called, but they are placed into the game log in the following order: All private notifications first, then all public notifications. This means that when the page is refreshed, or when a player loads an asynchronous game, if you have called any public notifications &#039;&#039;before&#039;&#039; the last private notification, they will appear out of order in the log.&lt;br /&gt;
&lt;br /&gt;
==== Recursive Notifications ====&lt;br /&gt;
&lt;br /&gt;
If your notification contains some phrases that build programmatically you may need to use recursive notifications. In this case the argument can be not only the string but&lt;br /&gt;
an array itself, which contains &#039;log&#039; and &#039;args&#039;, i.e.&lt;br /&gt;
&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;message&#039;, clienttranslate(&#039;Game moves ${token_name_rec}&#039;),&lt;br /&gt;
                   [&#039;token_name_rec&#039; =&amp;gt; [&#039;log&#039; =&amp;gt; &#039;${token_name} #${token_number}&#039;,&lt;br /&gt;
                                       &#039;args&#039;=&amp;gt; [&#039;token_name&#039; =&amp;gt; \clienttranslate(&#039;Boo&#039;), &#039;token_number&#039; =&amp;gt; $number, &#039;i18n&#039; =&amp;gt; [&#039;token_name&#039;] ]&lt;br /&gt;
                                      ]&lt;br /&gt;
                   ]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Sending private data to some players ====&lt;br /&gt;
&lt;br /&gt;
Sometimes you want to notify all players of a message but not have it appear in the log of specific players (for example, have every player see &amp;quot;Player X draws a card&amp;quot; but have Player X will get a private notification &amp;quot;You draw the Ace of Spades&amp;quot;, so you want them to see a different message and get some private data.&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; arg to send private data to designated players, in a similar fashion of the onEnteringState &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; flag. &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; is an array that have the player id to send private information to, and the value if the different notification using NotificationMessage to send both the replacing log and the args that will be accessible on front side in args._private.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        use Bga\GameFramework\NotificationMessage;&lt;br /&gt;
&lt;br /&gt;
        (...)&lt;br /&gt;
&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;cardPicked&#039;, clienttranslate(&#039;${player_name} takes a secret card from the deck&#039;), [&lt;br /&gt;
            &#039;playerId&#039; =&amp;gt; $playerId,&lt;br /&gt;
            &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($playerId),&lt;br /&gt;
            &#039;_private&#039; =&amp;gt; [&lt;br /&gt;
                $playerId =&amp;gt; new NotificationMessage(clienttranslate(&#039;You take ${_private.card_name} from the deck&#039;), [&lt;br /&gt;
                    &#039;card&#039; =&amp;gt; $card,&lt;br /&gt;
                    &#039;card_name&#039; =&amp;gt; $this-&amp;gt;getCardName($card),&lt;br /&gt;
                    &#039;i18n&#039; =&amp;gt; [&#039;card_name&#039;]&lt;br /&gt;
                ]),&lt;br /&gt;
            ],&lt;br /&gt;
        ]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the message uses &amp;lt;code&amp;gt;${_private.card_name}&amp;lt;/code&amp;gt; to access the data in the private args.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t need to change the log, but only send private args, you can send an array of args instead of the NotificationMessage object.&lt;br /&gt;
&lt;br /&gt;
If you add &amp;lt;code&amp;gt;_merge_private =&amp;gt; true&amp;lt;/code&amp;gt; next to &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt;, the private informations will be accessible in `args` instead of `args._private`. This seems to be required for your interceptFormatStringToken to intercept and alter private args.&lt;br /&gt;
&lt;br /&gt;
If you want all your &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; objects to be merged (state args and notif args), call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;alwaysMergePrivate();&amp;lt;/code&amp;gt; in your Game constructor instead of adding the &amp;lt;code&amp;gt;_merge_private&amp;lt;/code&amp;gt; flag on each arg.&lt;br /&gt;
&lt;br /&gt;
==== Using player names  ====&lt;br /&gt;
&lt;br /&gt;
The variable for player name must be ${player_name} in order to be highlighted with the player color in the game log, it has to have matching &#039;player_id&#039; argument in $notification_args. If you want a second player name in the log, name the variable ${player_name2} and $player_id2, etc.  For the multiple player case, usage of player_id and player_name is not mandatory i.e. skipping to player_id1 and player_name1 is fine.&lt;br /&gt;
&lt;br /&gt;
Special handling of arguments:&lt;br /&gt;
* ${player_name}  - this will be wrapped in html and text shown using color of the corresponding player, some colors also have reserved background. This will apply recursively as well.&lt;br /&gt;
* ${player_name1}, ${player_name2}, ${player_name3}, etc. work the same as above&lt;br /&gt;
In order for this to work you must pass corresponding player_idX AND player_nameX in args i.e.&lt;br /&gt;
&lt;br /&gt;
    $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&lt;br /&gt;
      &#039;buyAndPassCard&#039;,&lt;br /&gt;
      clienttranslate(&#039;${player_name} buys ${card_name} and passes it to ${player_name2}&#039;),&lt;br /&gt;
      [&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player1[&#039;id&#039;],&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $player1[&#039;name&#039;],&lt;br /&gt;
        &#039;player_id2&#039; =&amp;gt; $player2[&#039;id&#039;],&lt;br /&gt;
        &#039;player_name2&#039; =&amp;gt; $player2[&#039;name&#039;],&lt;br /&gt;
        ...&lt;br /&gt;
      ]&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
Note: player_name is not translatable, never add it to i18n array&lt;br /&gt;
&lt;br /&gt;
=== NotifyPlayer ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;player(int $player_id, string $notification_type, string | NotificationMessage $message, $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, except that the notification is sent to one player only. The player must be the player at the game table.&lt;br /&gt;
&lt;br /&gt;
This method should be used only if you send some private information to a player, NOT wanting to send a public notification at the same time for the same reason. See paragraph &#039;&#039;&#039;Sending private data to some players&#039;&#039;&#039; that should cover most of your need to send a private notif.&lt;br /&gt;
&lt;br /&gt;
Important: the variable for player name must be ${player_name} in order to be highlighted with the player color in the game log. Since its a private notification it may be more appropriate to use &amp;quot;you&amp;quot; insted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;player($player_id,&#039;message&#039;, clienttranslate(&#039;You draw ${card_name}&#039;), [ ... ]);&lt;br /&gt;
or&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;player($player_id,&#039;message&#039;, clienttranslate(&#039;${player_name} draws ${card_name}&#039;), [ &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id), ... ]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Spectators cannot be notified using this method, because their player ID is not available via loadPlayersBasicInfos() or otherwise. You must use notify-&amp;gt;all() for any notification that spectators should get.&lt;br /&gt;
&lt;br /&gt;
=== Notification decorators ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;addDecorator(callable $fn)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a decorator function that will be called on notification args before each call of notify-&amp;gt;all and notify-&amp;gt;player. &#039;&#039;Note: it won&#039;t work with deprecated functions notifyAllPlayers and notifyPlayer.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To avoid duplicating the code in your notification args, you can register decorators in your Game __construct function.&lt;br /&gt;
 // in construct :&lt;br /&gt;
 $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator(fn(string $message, array $args) =&amp;gt; $this-&amp;gt;decoratePlayerNameNotifArg($message, $args));&lt;br /&gt;
 // could also be written this (ugly) way : $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator([$this, &#039;decoratePlayerNameNotifArg&#039;]);&lt;br /&gt;
 &lt;br /&gt;
 // with the Utils functions&lt;br /&gt;
 public function decoratePlayerNameNotifArg(string $message, array $args): array {&lt;br /&gt;
     // if the notif message contains ${player_name} but it isn&#039;t set in the args, add it on args from $args[&#039;player_id&#039;]&lt;br /&gt;
     if (isset($args[&#039;player_id&#039;]) &amp;amp;&amp;amp; !isset($args[&#039;player_name&#039;]) &amp;amp;&amp;amp; str_contains($message, &#039;${player_name}&#039;)) {&lt;br /&gt;
         $args[&#039;player_name&#039;] = $this-&amp;gt;getPlayerNameById($args[&#039;player_id&#039;]);&lt;br /&gt;
     }&lt;br /&gt;
     return $args;&lt;br /&gt;
 }&lt;br /&gt;
With this example, you can call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&amp;quot;pass&amp;quot;, clienttranslate(&#039;${player_name} passes&#039;), [ &amp;quot;player_id&amp;quot; =&amp;gt; $player_id ]);&amp;lt;/code&amp;gt; and the front will receive the player_name arg along the player_id one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also declare it as an inline function :&lt;br /&gt;
 // in construct :&lt;br /&gt;
 this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator(function(string $message, array $args) {&lt;br /&gt;
     // if the notif message contains ${card_name} but it isn&#039;t set in the args, add it on args from $args[&#039;card&#039;]&lt;br /&gt;
     // also set it up for translations by adding it to the i18n array&lt;br /&gt;
     if (isset($args[&#039;card&#039;]) &amp;amp;&amp;amp; !isset($args[&#039;card_name&#039;]) &amp;amp;&amp;amp; str_contains($message, &#039;${card_name}&#039;)) {&lt;br /&gt;
         $args[&#039;card_name&#039;] = $args[&#039;card&#039;]-&amp;gt;name;&lt;br /&gt;
         $args[&#039;i18n&#039;][] = [&#039;card_name&#039;];&lt;br /&gt;
     }&lt;br /&gt;
     return $args;&lt;br /&gt;
 });&lt;br /&gt;
With this example, you can call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&amp;quot;playCard&amp;quot;, clienttranslate(&#039;${player_name} plays ${card_name}&#039;), [ &amp;quot;player_id&amp;quot; =&amp;gt; $player_id, card =&amp;gt; $card ]);&amp;lt;/code&amp;gt; and the front will receive the card_name arg with the flag to translate it.&lt;br /&gt;
&lt;br /&gt;
== Randomization ==&lt;br /&gt;
&lt;br /&gt;
A large number of board games rely on random, most often based on dice, cards shuffling, picking some item in a bag, and so on. This is very important to ensure a high level of randomness for each of these situations.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s are a list of techniques you should use in these situations, from the best to the worst.&lt;br /&gt;
&lt;br /&gt;
=== Dice and bga_rand ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;\bga_rand( min, max )&#039;&#039;&#039; &lt;br /&gt;
This is a BGA framework function that provides you a random number between &amp;quot;min&amp;quot; and &amp;quot;max&amp;quot; (inclusive), using the best available random method available on the system.&lt;br /&gt;
&lt;br /&gt;
This is the preferred function you should use, because we are updating it when a better method is introduced.&lt;br /&gt;
&lt;br /&gt;
As of now, bga_rand is based on the PHP function &amp;quot;random_int&amp;quot;, which ensures a cryptographic level of randomness.&lt;br /&gt;
&lt;br /&gt;
In particular, it is &#039;&#039;&#039;mandatory&#039;&#039;&#039; to use it for all &#039;&#039;&#039;dice throw&#039;&#039;&#039; (ie: games using other methods for dice throwing will be rejected by BGA during review).&lt;br /&gt;
&lt;br /&gt;
Note: rand() and mt_rand() are deprecated on BGA and should not be used anymore, as their randomness is not as good as &amp;quot;bga_rand&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Arrays ===&lt;br /&gt;
&lt;br /&gt;
PHP&#039;s [https://www.php.net/array_rand array_rand()] and [https://www.php.net/shuffle shuffle()] functions are not cryptographically secure. Instead, the following code based on PHP&#039;s [https://www.php.net/random_int random_int()] provides a better method to choose a random key, value, or slice of an array. (the slice preserves keys)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    private function getRandomKey(array $array)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomKey(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $rand = random_int(0, $size - 1);&lt;br /&gt;
        $slice = array_slice($array, $rand, 1, true);&lt;br /&gt;
        foreach ($slice as $key =&amp;gt; $value) {&lt;br /&gt;
            return $key;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private function getRandomValue(array $array)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomValue(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $rand = random_int(0, $size - 1);&lt;br /&gt;
        $slice = array_slice($array, $rand, 1, true);&lt;br /&gt;
        foreach ($slice as $key =&amp;gt; $value) {&lt;br /&gt;
            return $value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private function getRandomSlice(array $array, int $count)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomSlice(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        if ($count &amp;lt; 1 || $count &amp;gt; $size) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomSlice(): Invalid count $count for array with size $size&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $slice = [];&lt;br /&gt;
        $randUnique = [];&lt;br /&gt;
        while (count($randUnique) &amp;lt; $count) {&lt;br /&gt;
            $rand = random_int(0, $size - 1);&lt;br /&gt;
            if (array_key_exists($rand, $randUnique)) {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
            $randUnique[$rand] = true;&lt;br /&gt;
            $slice += array_slice($array, $rand, 1, true);&lt;br /&gt;
        }&lt;br /&gt;
        return $slice;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== shuffle and cards shuffling ===&lt;br /&gt;
&lt;br /&gt;
To shuffle items, like a pile of cards, the best way is to use the BGA PHP [[Deck]] component and to use &amp;quot;shuffle&amp;quot; method. This ensures that the best available shuffling method is used, and that if in the future we improve it your game will be up to date.&lt;br /&gt;
&lt;br /&gt;
As of now, the Deck component shuffle method is based on PHP &amp;quot;shuffle&amp;quot; method, which has quite good randomness (even if not as good as bga_rand). In consequence, we accept other shuffling methods during reviews, as long as they are based on PHP &amp;quot;shuffle&amp;quot; function (or similar, like &amp;quot;array_rand&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Other methods ===&lt;br /&gt;
&lt;br /&gt;
Mysql &amp;quot;RAND()&amp;quot; function has not enough randomness to be a valid method to get a random element on BGA. This function has been used in some existing games and has given acceptable results, but now it should be avoided and you should use other methods instead.&lt;br /&gt;
&lt;br /&gt;
== Game statistics ==&lt;br /&gt;
&lt;br /&gt;
There are 2 types of statistics:&lt;br /&gt;
* a &amp;quot;player&amp;quot; statistic is a statistic associated to a player&lt;br /&gt;
* a &amp;quot;table&amp;quot; statistic is a statistic not associated to a player (global statistic for this game).&lt;br /&gt;
&lt;br /&gt;
See [[Game statistics: stats.json]] to see how you define statistics for your game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;init(string|array $nameOrNames, int|float|bool $value)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;init(string|array $nameOrNames, int|float|bool $value, bool $updateTableStat = false)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : initStat( $table_or_player, $name, $value)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a statistic entry with a default value.&lt;br /&gt;
&lt;br /&gt;
This method must be called for each statistic of your game, in your setupNewGame method.&lt;br /&gt;
If you neglect to call this for a statistic, and also do not update the value during the course of a certain game using xxxStats-&amp;gt;set or xxxStats-&amp;gt;inc, the value of the stat will be undefined rather than 0. This will result in it being ignored at the end of the game, as if it didn&#039;t apply to that particular game, and excluded from cumulative statistics. As a consequence - if do not want statistic to be applied, do not init it, or call set or inc on it.&lt;br /&gt;
&lt;br /&gt;
&#039;$nameOrNames&#039; is the name of your statistic, as it has been defined in your stats.inc.php file, or an array of those names.&lt;br /&gt;
&lt;br /&gt;
&#039;$value&#039; is the initial value of the statistic.&lt;br /&gt;
&lt;br /&gt;
&#039;updateTableStat&#039; for playerStats initiates the tableStats of the same name, so if you store for example &#039;playedTurns&#039; in both &#039;table&#039; and &#039;player&#039; call only &amp;lt;code&amp;gt;bga-&amp;gt;playerStats-&amp;gt;init(&#039;playedTurns&#039;, 0, true)&amp;lt;/code&amp;gt; and it will init for both &#039;table&#039; and &#039;player&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;set(string $name, int|float|bool $value)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;set(string $name, int|float|bool $value, int $player_id)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;setAll(string $name, int|float|bool $value)&#039;&#039;&#039; (same as set, but for all players at once)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : setStat( $value, $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set a statistic $name to $value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;inc(string $name, int|float $delta)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;inc(string $name, int|float $delta, int $player_id, bool $updateTableStat = false)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;incAll(string $name, int|float $delta)&#039;&#039;&#039; (same as inc, but for all players at once)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : incStat( $delta, $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Increment (or decrement) specified statistic value by $delta value. Same behavior as setStat function, except you cannot increment boolean values. &#039;updateTableStat&#039; will also inc the tableStats of the same name.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;get(string $name): int|float|bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;get(string $name, int $player_id): int|float|bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : getStat( $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Return the value of statistic specified by $name. Useful when creating derivative statistics such as average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;getAll(string $name): array&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Returns the values for all players, as an associative array $player_id =&amp;gt; $value&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
See [[Translations]]&lt;br /&gt;
&lt;br /&gt;
== Manage player scores and Tie breaker ==&lt;br /&gt;
&lt;br /&gt;
=== Normal scoring ===&lt;br /&gt;
&lt;br /&gt;
At the end of the game, players automatically get a rank depending on their score: the player with the biggest score is #1, the player with the second biggest score is #2, and so on...&lt;br /&gt;
&lt;br /&gt;
During the game, you update player&#039;s score using $this-&amp;gt;bga-&amp;gt;playerScore. bga-&amp;gt;playerScore is a [[PlayerCounter and TableCounter|PlayerCounter]], so it has the same methods.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  // +2 points to active player&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;inc($activePlayerId, 2);&lt;br /&gt;
&lt;br /&gt;
  // Set score of active player to 5&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;set($activePlayerId, 5);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tie breaker ===&lt;br /&gt;
&lt;br /&gt;
Tie breaker is used when two players get the same score at the end of a game.&lt;br /&gt;
&lt;br /&gt;
Tie breaker is using $this-&amp;gt;bga-&amp;gt;playerScoreAux. It is updated exactly like $this-&amp;gt;bga-&amp;gt;playerScore. bga-&amp;gt;playerScoreAux is a [[PlayerCounter and TableCounter|PlayerCounter]], so it has the same methods.&lt;br /&gt;
&lt;br /&gt;
Tie breaker score is displayed only for players who are tied at the end of the game. Most of the time, it is not supposed to be displayed explicitly during the game.&lt;br /&gt;
&lt;br /&gt;
When you are using &amp;quot;playerScoreAux&amp;quot; functionality, you must describe the formula to use in your gameinfos.jsonc file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         &amp;quot;tie_breaker_description&amp;quot;: &amp;quot;Describe here your tie breaker formula&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This description will be used as a tooltip to explain to players how this auxiliary score has been calculated.&lt;br /&gt;
&lt;br /&gt;
Note: if you need to need you score_aux to be reverse (lowest value wins), please contact Studio support to get a solution.&lt;br /&gt;
&lt;br /&gt;
See also [https://en.doc.boardgamearena.com/Game_meta-information:_gameinfos.jsonc#Multiple_tie_breaker_management Multiple Tie Breaker Management].&lt;br /&gt;
&lt;br /&gt;
=== Reverse scoring and reverse tie-breaker ===&lt;br /&gt;
&lt;br /&gt;
If your game has a reverse scoring (lowest value wins) or reverse tie-breaker (lowest tie-breaker wins), you need to set-up a GameResult object to tell BGA this specificity.&lt;br /&gt;
&lt;br /&gt;
On your last state (usually EndScore.php), instead of returning 99 to go the end game, return a GameResult. returning a GameResult object in a State class will then go the end game.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use Bga\GameFramework\GameResult\GameResult;&lt;br /&gt;
use Bga\GameFramework\GameResult\Player;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
    public function onEnteringState() {&lt;br /&gt;
        ...&lt;br /&gt;
&lt;br /&gt;
        $playersDb = $this-&amp;gt;game-&amp;gt;getCollectionFromDb(&amp;quot;SELECT * FROM `player`&amp;quot;);&lt;br /&gt;
        $players = Player::fromPlayersDb($playersDb);&lt;br /&gt;
        return GameResult::individualRanking($players, reverseScore: true);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For reverse tie-breaker, it will be `reverseScoreAux: true`.&lt;br /&gt;
&lt;br /&gt;
If your game has running tables with negative scores to handle reverse scoring and you want to use the reverse scoring, add this just before the return line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        if ($this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;getMin() &amp;lt; 0) {&lt;br /&gt;
            foreach ($players as &amp;amp;$player) {&lt;br /&gt;
                $player-&amp;gt;score = -$player-&amp;gt;score;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So game started before the change will reverse the score (negative to positive) before creating the GameResult object.&lt;br /&gt;
And anywhere you change the score, you must continue the way it was started :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $addedPoints = 3;&lt;br /&gt;
        if ($this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;getMin() &amp;lt; 0) {&lt;br /&gt;
            $addedPoints = -$addedPoints;&lt;br /&gt;
        }&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;inc($playerId, $addedPoints);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If there are negative score, the game will continue with negative scores, else it will continue with positive scores.&lt;br /&gt;
&lt;br /&gt;
=== Result neutralization ===&lt;br /&gt;
&lt;br /&gt;
when a player quits a running table, the results of the game will be neutralized (everyone has score set to 1, except the first quitter that will be at 0 and will be ranked last in addition to reputation drop). We cannot keep the ranking among the remaining players, as the quitter being replaced by a zombie might unbalance the rest of the game interaction, for example the player playing just after can get advantages with the situation.&lt;br /&gt;
&lt;br /&gt;
For some games where there is almost no interaction between player, like some roll &amp;amp; write games, there is no real reason to neutralize the game results when a player quits. In that case, you can ask the Studio Support to activate the &amp;quot;Keep ranking on player quit&amp;quot; flag for your game. The zombie mode must be fully functional to allow the game to continue with leavers. Note that the BGA team might refuse to activate it, if it is considered the zombie player will unbalance the results of the remaining players.&lt;br /&gt;
&lt;br /&gt;
When this flag is activated, a player quitting a game will still be penalized, but the ranking you set at the end of the game will stay, and the eliminated player(s) will have their score set to -1. It also means if a second player quits the game, he will also be penalized, because he has no reason to quit and can continue the game. If the game ends with 2 remaining players, it&#039;s now possible for one of them to concede.&lt;br /&gt;
&lt;br /&gt;
To request this mode, click on &amp;quot;Contact us / Support&amp;quot; at the bottom of the page in Studio and then work through to a &amp;quot;My problem has not been solved&amp;quot; and then enter your request. The flag can be set independently in Studio and Production, so make sure to request it for both (unless you just want to experiment in Studio).&lt;br /&gt;
&lt;br /&gt;
Note: the flag will fully work for games started AFTER activation. It may display incorrect messages for games started before the activation but players left after. For this reason, it&#039;s best to request it when going to alpha, else accept some strange bug reports about this situation, that will solve itself when all existing tables are started after the activation.&lt;br /&gt;
&lt;br /&gt;
=== Co-operative game ===&lt;br /&gt;
&lt;br /&gt;
To make everyone win/lose together in a full-coop game:&lt;br /&gt;
&lt;br /&gt;
Add the following in gameinfos.jsonc :&lt;br /&gt;
&amp;quot;is_coop&amp;quot;: 1, // full cooperative&lt;br /&gt;
&lt;br /&gt;
Assign a score of zero to everyone if it&#039;s a loss.&lt;br /&gt;
Assign the same score &amp;gt; 0 to everyone if it&#039;s a win.&lt;br /&gt;
&lt;br /&gt;
=== Semi-coop ===&lt;br /&gt;
&lt;br /&gt;
If the game is not full-coop, then everyone loses = everyone is tied. I.e. set score to 0 to everybody.&lt;br /&gt;
&lt;br /&gt;
=== Only &amp;quot;winners&amp;quot; and &amp;quot;losers&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
For some games, there is only a group (or a single) &amp;quot;winner&amp;quot;, and everyone else is a &amp;quot;loser&amp;quot;, with no &amp;quot;end of game rank&amp;quot; (1st, 2nd, 3rd...).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* Coup&lt;br /&gt;
* Not Alone&lt;br /&gt;
* Werewolves&lt;br /&gt;
* Quantum&lt;br /&gt;
&lt;br /&gt;
In this case:&lt;br /&gt;
* Set the scores so that the winner has the best score, and the other players have the same (lower) score.&lt;br /&gt;
* Add the following lines to gameinfos.jsonc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// If in the game, all losers are equal (no score to rank them or explicit in the rules that losers are not ranked between them), set this to true &lt;br /&gt;
// The game end result will display &amp;quot;Winner&amp;quot; for the 1st player and &amp;quot;Loser&amp;quot; for all other players&lt;br /&gt;
&amp;quot;losers_not_ranked&amp;quot;: true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Werewolves and Coup are implemented like this, as you can see here:&lt;br /&gt;
* https://boardgamearena.com/#!gamepanel?game=werewolves&amp;amp;section=lastresults&lt;br /&gt;
* https://boardgamearena.com/#!gamepanel?game=coupcitystate&amp;amp;section=lastresults&lt;br /&gt;
&lt;br /&gt;
Adding this has the following effects:&lt;br /&gt;
* On game results for this game, &amp;quot;Winner&amp;quot; or &amp;quot;Loser&amp;quot; is going to appear instead of the usual &amp;quot;1st, 2nd, 3rd, ...&amp;quot;.&lt;br /&gt;
* When a game is over, the result of the game will be &amp;quot;End of game: Victory&amp;quot; or &amp;quot;End of game: Defeat&amp;quot; depending on the result of the CURRENT player (instead of the usual &amp;quot;Victory of XXX&amp;quot;).&lt;br /&gt;
* When calculating ELO points, if there is at least one &amp;quot;Loser&amp;quot;, no &amp;quot;victorious&amp;quot; player can lose ELO points, and no &amp;quot;losing&amp;quot; player can win ELO point. Usually it may happened because being tie with many players with a low rank is considered as a tie and may cost you points. If losers_not_ranked is set, we prevent this behavior and make sure you only gain/loss ELO when you get the corresponding results.&lt;br /&gt;
&lt;br /&gt;
Important: this SHOULD NOT be used for cooperative games (see is_coop parameter), or for 2 players games (it makes no sense in this case).&lt;br /&gt;
&lt;br /&gt;
=== Solo ===&lt;br /&gt;
&lt;br /&gt;
If game supports solo variant, a negative or zero score means defeat, a positive score means victory.&lt;br /&gt;
&lt;br /&gt;
=== Player elimination ===&lt;br /&gt;
&lt;br /&gt;
In some games, this is useful to eliminate a player from the game in order he/she can start another game without waiting for the current game end.&lt;br /&gt;
&lt;br /&gt;
This case should be rare. Please don&#039;t use player elimination feature if some player just has to wait the last 10% of the game for game end. This feature should be used only in games where players are eliminated all along the game (typical examples: &amp;quot;Perudo&amp;quot; or &amp;quot;The Werewolves of Miller&#039;s Hollow&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
* In your PHP code:&lt;br /&gt;
  $this-&amp;gt;eliminatePlayer( &amp;lt;player_to_eliminate_id&amp;gt; );&lt;br /&gt;
* Player to eliminate should NOT be active anymore at the end of the action that triggers the eliminatePlayer function.&lt;br /&gt;
* the player is informed in a dialog box that he no longer have to play and can start another game if he/she wants too (with buttons &amp;quot;stay at this table&amp;quot; &amp;quot;quit table and back to main site&amp;quot;). In any case, the player is free to start &amp;amp; join another table from now.&lt;br /&gt;
* When your game is over, all players who have been eliminated before receive a &amp;quot;notification&amp;quot; (the small &amp;quot;!&amp;quot; icon on the top right of the BGA interface) that indicate them that &amp;quot;the game has ended&amp;quot; and invite them to review the game results.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; this should not be used on a player who has already left the game (&amp;quot;zombie&amp;quot;) as leaving/being kicked of the game (outside of the scope of the rules) is not the same as being eliminated from the game (according to the rules), except if in the course of the game, the zombie player is eliminated according to the rules.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; If you eliminate the last player, make sure the action will end by going to the end game state. If it doesn&#039;t, BGA will jump straight to it, without calling your end score state or anything similar.&lt;br /&gt;
&lt;br /&gt;
=== Player concede ===&lt;br /&gt;
&lt;br /&gt;
It should be rarely needed, but if you absolutely need to run some code when a player concedes, you can create a function called onConcede in the Game class like this :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function onConcede() {&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;test&#039;, &#039;Something to do when the player concedes&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to get the conceder id:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function onConcede($concederTeam) {&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;test&#039;, &#039;Something to do when the player concedes &#039;.$concederTeam-&amp;gt;players[0]-&amp;gt;id);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Never change state on this function. It should be limited to computing stats or similar small stuff.&lt;br /&gt;
&lt;br /&gt;
To not break the game end, any exception triggered by this function will be catched and simply logged, so make sure your code stay simple and never trigger an exception and it will be hard to detect!&lt;br /&gt;
&lt;br /&gt;
== Reflexion time ==&lt;br /&gt;
&lt;br /&gt;
; function giveExtraTime( $player_id, $specific_time=null )&lt;br /&gt;
: Give standard extra time to this player in real time game. It does not affect turn based games.&lt;br /&gt;
: Standard extra time (when you don&#039;t pass $specific_time) depends on the speed of the game (small with &amp;quot;slow&amp;quot; game option, bigger with other options).&lt;br /&gt;
: You can also specify an exact time to add, in seconds, with the &amp;quot;specific_time&amp;quot; argument (rarely used). Using $specific_time is not recommended as this does not adjust for the game speed.&lt;br /&gt;
: Important Note: the total reflection time cannot be more than time allowed for the turn. So you can never make it 10 minutes if turn max is 3 min (the max is determined by game speed). As a consequence there is no point adding this at the begging of the turn of in game setup, it only matters after the action which does not lead to turn end (which is when this player becomes inactive).&lt;br /&gt;
: Note: standard extra time is automatically doubled for begginer &lt;br /&gt;
&lt;br /&gt;
    function actionBla($args) {&lt;br /&gt;
        $this-&amp;gt;checkAction(&#039;actionBla&#039;);&lt;br /&gt;
        $playerId = (int)$this-&amp;gt;getActivePlayerId();&lt;br /&gt;
        $this-&amp;gt;giveExtraTime($player_id);&lt;br /&gt;
        // do some inter-turn action&lt;br /&gt;
        $this-&amp;gt;notifyAll(...);&lt;br /&gt;
        // no state transition as this player did an action but stayed active&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;tableOptions-&amp;gt;isTurnBased(): bool&#039;&#039;&#039;&lt;br /&gt;
: Returns true if game is turn based&lt;br /&gt;
:&lt;br /&gt;
; &#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;tableOptions-&amp;gt;isRealTime(): bool&#039;&#039;&#039;&lt;br /&gt;
: Returns true if game is in real time&lt;br /&gt;
&lt;br /&gt;
== Undo moves ==&lt;br /&gt;
&lt;br /&gt;
Please read our [[BGA Undo policy]] before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Before using these methods, you must also add the following to your &amp;quot;gameinfos.inc.php&amp;quot; file, otherwise these methods are ineffective:&lt;br /&gt;
  &#039;db_undo_support&#039; =&amp;gt; true&lt;br /&gt;
&lt;br /&gt;
Note: if you deploy undo support after game is in production this will take into effect for new games only, old games will give user an error if user choses Undo action, but otherwise it should not affect them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; function undoSavepoint( )&lt;br /&gt;
: Save the whole game situation inside an &amp;quot;Undo save point&amp;quot;.&lt;br /&gt;
: There is only ONE undo save point available (see [[BGA Undo policy]]). Cannot use in multiactivate state or in game state where next state is multiactive.&lt;br /&gt;
: Note: this function does not actually do anything when it is called, it only raises the flag to store the database AFTER transaction is over. So the actual state will be saved when you exit the function  calling it (technically before first queued notification is sent, which matters if you transition to game state not to user state after), this may affect what you end up saving.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; function undoRestorePoint()&lt;br /&gt;
: Restore the situation previously saved as an &amp;quot;Undo save point&amp;quot;.&lt;br /&gt;
: You must make sure that the active player is the same after and before the undoRestorePoint (ie: this is your responsibility to ensure that the player that is active when this method is called is exactly the same than the player that was active when the undoSavePoint method has been called).&lt;br /&gt;
&lt;br /&gt;
    function actUndo() {&lt;br /&gt;
        $this-&amp;gt;undoRestorePoint();&lt;br /&gt;
        return PlayTurn::class; // transition to single player state (i.e. beginning of player actions for this turn)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note&#039;&#039;&#039;: if you are reading game state variable right after restore (without changing state first) it won&#039;t work properly as the global table cache is not automatically refreshed after undoRestorePoint(). So you should either change state immediately to refresh game state values, or use $this-&amp;gt;gamestate-&amp;gt;reloadState() to refresh the state. If you choose to do the latest, be aware that this will bring the state machine back to the state during which the save point snapshot has been taken using undoSavepoint().&lt;br /&gt;
&lt;br /&gt;
=== Manually remove game logs ===&lt;br /&gt;
&amp;lt;strong style=&amp;quot;color: red;&amp;quot;&amp;gt;Only use it if you have custom undo and you fully understand how logs and replay works!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;getCurrentMoveId()&lt;br /&gt;
: Returns the current move id, when doing an action, that should be stored along informations to undo.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;remove(int $startMoveId)&lt;br /&gt;
: Remove all logs from a move id that was stored during an action using `getCurrentMoveId()`. &amp;lt;strong&amp;gt;The game should be in the exact same point as it was before the stored action!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        // in the action code, do all the action code, notify it, and store the custom undo&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(UNDO_ACTION, new Undo(&lt;br /&gt;
            movedTiles: $tiles, &lt;br /&gt;
            moveId: $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;getCurrentMoveId(),&lt;br /&gt;
        ));&lt;br /&gt;
&lt;br /&gt;
        return ConfirmAction::class;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO_ACTION);&lt;br /&gt;
        // in the undo action code, do all the revert action code, notify it, then remove the logs&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;remove($undo-&amp;gt;moveId);&lt;br /&gt;
        // don&#039;t do any action/notif after removing the logs&lt;br /&gt;
        return PlayAction::class;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Managing errors and exceptions ==&lt;br /&gt;
&lt;br /&gt;
Note: when you throw an exception, all database changes and all notifications are cancelled immediately. This way, the game situation that existed before the request is completely restored.&lt;br /&gt;
&lt;br /&gt;
; throw new UserException(string|NotificationMessage $message)&lt;br /&gt;
: Base class to notify a user error&lt;br /&gt;
: You must throw this exception when a player wants to do something that they are not allowed to do.&lt;br /&gt;
: The error message will be shown to the player as a &amp;quot;red message&amp;quot;.&lt;br /&gt;
: The error will be displayed to the player, as it&#039;s a UserException, the error message should be translated (with clientranslate(), and if there are args wrap them into a NotificationMessage)&lt;br /&gt;
: Throwing such an exception is NOT considered a bug, so it is not traced in BGA error logs.&lt;br /&gt;
&lt;br /&gt;
Note: if your IDE doesn&#039;t do it for you, you&#039;ll need to add &amp;lt;code&amp;gt;use Bga\GameFramework\UserException;&amp;lt;/code&amp;gt; at the top of your file.&lt;br /&gt;
&lt;br /&gt;
Example from Gomoku:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     throw new UserException(clienttranslate(&amp;quot;There is already a stone on this intersection, you can&#039;t play there&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example with translated UserException using args :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     throw new UserException(new NotificationMessage(clienttranslate(&#039;You must play a card bigger than ${min}&#039;, [min =&amp;gt; $minCardValue])));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; throw new SystemException (string|NotificationMessage $message)&lt;br /&gt;
: Base class to notify a system exception. The message will be hidden from the user, but show in the logs. Use this if the message contains technical information.&lt;br /&gt;
&lt;br /&gt;
; throw new VisibleSystemException (string|NotificationMessage $message)&lt;br /&gt;
: You must throw this exception when you detect something that is not supposed to happened in your code.&lt;br /&gt;
: The error message is shown to the user as an &amp;quot;Unexpected error&amp;quot;, in order that he can report it in the forum.&lt;br /&gt;
: The error message is logged in BGA error logs. &lt;br /&gt;
: it should not be translated, as it&#039;s just to bring debug details to you when the player reports the issue.&lt;br /&gt;
&lt;br /&gt;
== Zombie mode ==&lt;br /&gt;
&lt;br /&gt;
When a player leaves a game for any reason (expelled, quit), he becomes a &amp;quot;zombie player&amp;quot;. You must implement a Zombie that will handle the role of the leaver player&lt;br /&gt;
&lt;br /&gt;
Read [[Zombie Mode|Zombie mode]] to get all details of the expected code.&lt;br /&gt;
&lt;br /&gt;
== User preferences ==&lt;br /&gt;
&#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;userPreferences-&amp;gt;get(int $playerId, int $prefId): ?int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the value of a user preference for a player. It will return the value currently selected in the select combo box, in the top-right menu.&lt;br /&gt;
&lt;br /&gt;
== Player color preferences ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BGA premium users may choose their preferred color for playing. For example, if they are used to play green for every board game, they can select &amp;quot;green&amp;quot; in their BGA preferences page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To test it, you can set your preferred color on your BGA Studio account.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Making your game compatible with colors preferences is very easy and requires only 1 line of configuration change:&lt;br /&gt;
&lt;br /&gt;
On your gameinfos.jsonc file, add the following lines :&lt;br /&gt;
&lt;br /&gt;
  // Favorite colors support: if set to &amp;quot;true&amp;quot;, support attribution of favorite colors based on player&#039;s preferences (see reattributeColorsBasedOnPreferences PHP method)&lt;br /&gt;
  // NB: this parameter is used only to flag games supporting this feature; you must use (or not use) reattributeColorsBasedOnPreferences PHP method to actually enable or disable the feature.&lt;br /&gt;
  &amp;quot;favorite_colors_support&amp;quot;: true,&lt;br /&gt;
&lt;br /&gt;
Then, on your main &amp;lt;your_game&amp;gt;.game.php file check the code of &amp;quot;setupNewGame&amp;quot;. New template already have correct code, but if you editing very old game and it may be absent.&lt;br /&gt;
&lt;br /&gt;
        $gameinfos = $this-&amp;gt;getGameinfos();&lt;br /&gt;
        ...&lt;br /&gt;
        if ($gameinfos[&#039;favorite_colors_support&#039;])&lt;br /&gt;
            $this-&amp;gt;reattributeColorsBasedOnPreferences($players, $gameinfos[&#039;player_colors&#039;]); // this should be above reloadPlayersBasicInfos()&lt;br /&gt;
        $this-&amp;gt;reloadPlayersBasicInfos();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;reattributeColorsBasedOnPreferences&amp;quot; method reattributes all colors, taking into account players color preferences and available colors.&lt;br /&gt;
&lt;br /&gt;
Note that you must update the colors to indicate the colors available for your game.&lt;br /&gt;
&lt;br /&gt;
Some important remarks:&lt;br /&gt;
* for some games (i.e. Chess), the color has an influence on a mechanism of the game, most of the time by giving a special advantage to a player (i.e. Starting the game). Color preference mechanism must NOT be used in such a case.&lt;br /&gt;
* your logic should NEVER consider that the first player has the color X, that the second player has the color Y, and so on. If this is the case, your game will NOT be compatible with reattributeColorsBasedOnPreferences as this method attribute colors to players based on their preferences and not based as their order at the table.&lt;br /&gt;
&lt;br /&gt;
=== Custom color assignments ===&lt;br /&gt;
Some colors don&#039;t play nicely with BGA&#039;s color difference algorithm. If you receive feedback that colors are not well chosen, you can bypass the BGA algorithm by specifying a map from user preference colors to game colors.&lt;br /&gt;
&lt;br /&gt;
For example, you may wish to assign BGA&#039;s blue to your game&#039;s baby blue: &amp;lt;code&amp;gt;&amp;quot;0000ff&amp;quot; /* Blue */ =&amp;gt; &amp;quot;89CFF0&amp;quot;,&amp;lt;/code&amp;gt; whereas otherwise, a deep purple might be chosen instead. Just be sure that the assigned colors are also present in the &amp;lt;code&amp;gt;player_colors&amp;lt;/code&amp;gt; array passed to &amp;lt;code&amp;gt;reattributeColorsBasedOnPreferences&amp;lt;/code&amp;gt;, otherwise the assignment will be ignored.&lt;br /&gt;
&lt;br /&gt;
To do this, implement this method in your &amp;lt;code&amp;gt;X.game.php&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
Note: the user preference colors (the keys in the returned array) should not be modified, or the code may not work as expected. These are the colors players can choose between in their profile.&lt;br /&gt;
     /**&lt;br /&gt;
      * Returns an array of user preference colors to game colors.&lt;br /&gt;
      * Game colors must be among those which are passed to reattributeColorsBasedOnPreferences()&lt;br /&gt;
      * Each game color can be an array of suitable colors, or a single color:&lt;br /&gt;
      * [&lt;br /&gt;
      *    // The first available color chosen:&lt;br /&gt;
      *    &#039;ff0000&#039; =&amp;gt; [&#039;990000&#039;, &#039;aa1122&#039;],&lt;br /&gt;
      *    // This color is chosen, if available&lt;br /&gt;
      *    &#039;0000ff&#039; =&amp;gt; &#039;000099&#039;,&lt;br /&gt;
      * ]&lt;br /&gt;
      * If no color can be matched from this array, then the default implementation is used.&lt;br /&gt;
      */&lt;br /&gt;
     function getSpecificColorPairings(): array {&lt;br /&gt;
         return array(&lt;br /&gt;
             &amp;quot;ff0000&amp;quot; /* Red */         =&amp;gt; null,&lt;br /&gt;
             &amp;quot;008000&amp;quot; /* Green */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;0000ff&amp;quot; /* Blue */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;ffa500&amp;quot; /* Yellow */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;000000&amp;quot; /* Black */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;ffffff&amp;quot; /* White */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;e94190&amp;quot; /* Pink */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;982fff&amp;quot; /* Purple */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;72c3b1&amp;quot; /* Cyan */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;f07f16&amp;quot; /* Orange */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;bdd002&amp;quot; /* Khaki green */ =&amp;gt; null,&lt;br /&gt;
             &amp;quot;7b7b7b&amp;quot; /* Gray */        =&amp;gt; null,&lt;br /&gt;
         );&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
== Legacy games API ==&lt;br /&gt;
&lt;br /&gt;
For some very specific games (&amp;quot;legacy&amp;quot;, &amp;quot;campaign&amp;quot;), you need to keep some informations from a game to another.&lt;br /&gt;
&lt;br /&gt;
This should be an exceptional situation: the legacy API is costing resources on Board Game Arena databases, and is slowing down the game setup process + game end of game process. Please do not use it for things like:&lt;br /&gt;
* keeping a player preference/settings (=&amp;gt; player preferences and game options should be used instead)&lt;br /&gt;
* keeping a statistics, a score, or a ranking, while it is not planned in the physical board game, or while there is no added value compared to BGA statistics / rankings.&lt;br /&gt;
&lt;br /&gt;
You should use it for:&lt;br /&gt;
* legacy games: when some components of the game has been altered in a previous game and should be kept as it is.&lt;br /&gt;
* &amp;quot;campaign style&amp;quot; games: when a player is getting a &amp;quot;reward&amp;quot; at the end of a game, and should be able to use it in further games.&lt;br /&gt;
&lt;br /&gt;
Important: you cannot store more than 64k of data (serialized as JSON) per player per game. If you go over 64k, storeLegacyData function is going to FAIL, and there is a risk to create a major bug (= players blocked) in your game. You MUST make sure that no more than 64k of data is used for each player for your game. For example, if you are implementing a &amp;quot;campaign style&amp;quot; game and if you allow a player to start multiple campaign, you must LIMIT the number of different campaign so that the total data size to not go over the limit. We strongly recommend you to use this:&lt;br /&gt;
&lt;br /&gt;
  try &lt;br /&gt;
  {&lt;br /&gt;
  	$this-&amp;gt;bga-&amp;gt;legacy-&amp;gt;setTeam( $my_data );&lt;br /&gt;
  }&lt;br /&gt;
  catch( \feException $e ) // \feException is a base class of \BgaSystemException and others...&lt;br /&gt;
  {&lt;br /&gt;
  	if( $e-&amp;gt;getCode() == FEX_legacy_size_exceeded )&lt;br /&gt;
  	{&lt;br /&gt;
  		// Do something here to free some space in Legacy data (ex: by removing some variables)&lt;br /&gt;
  	}&lt;br /&gt;
  	else&lt;br /&gt;
  		throw $e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
The keys may only contain letters and numbers, underscore seems not to be allowed.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;set(string $key, int $playerId, mixed $value, int $ttl = 365)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;storeLegacyData($player_id, $key, $data, $ttl = 365) )&lt;br /&gt;
: Store some data associated with $key for the given user / current game&lt;br /&gt;
: In the opposite of all other game data, this data will PERSIST after the end of this table, and can be re-used&lt;br /&gt;
: in a future table with the same game.&lt;br /&gt;
: IMPORTANT: The only possible place where you can use this method is when the game is over at your table (last game action). Otherwise, there is a risk of conflicts between ongoing games.    &lt;br /&gt;
: TTL is a time-to-live: the maximum, and default, is 365 days.&lt;br /&gt;
: In any way, the total data (= all keys) you can store for a given user+game is 64k (note: data is store serialized as JSON data)&lt;br /&gt;
: NOTICE: You can store some persistant data across all tables from your game using the specific player_id 0 which is unused. In such case, it&#039;s even more important to manage correctly the size of your data to avoid any exception or issue while storing updated data (ie. you can use this for some kind of leaderbord for solo game or contest)&lt;br /&gt;
: Note: This function cannot be called during game setup (will throw an error).&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;get(string $key, int $playerId, mixed $defaultValue = null)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;retrieveLegacyData($player_id, $key) ⚠️ this alias was returning a JSON-encoded value, while the get function returns the real value )&lt;br /&gt;
: Get data associated with $key for the current game&lt;br /&gt;
: This data is common to ALL tables from the same game for this player, and persist from one table to another.&lt;br /&gt;
: Note: calling this function has an important cost =&amp;gt; please call it few times (possibly: only ONCE) for each player for 1 game if possible&lt;br /&gt;
: Note: you can use &#039;%&#039; in $key to retrieve all keys matching the given patterns&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;delete(string $key, int $playerId)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;removeLegacyData($player_id, $key) )&lt;br /&gt;
: Remove some legacy data with the given key&lt;br /&gt;
: (useful to free some data to avoid going over 64k)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;setTeam(mixed $value, int $ttl = 365)&lt;br /&gt;
: ( deprecated alias: storeLegacyTeamData( $data, $ttl = 365 ) )&lt;br /&gt;
: Same as storeLegacyData, except that it stores some data for the whole team within the current table and does not use a key&lt;br /&gt;
: Ie: if players A, B and C are at a table, the legacy data will be saved for future table with (exactly) A, B and C on the table.&lt;br /&gt;
: This is useful for games which are intended to be played several time by the same team.&lt;br /&gt;
: Note: the data total size is still limited, so you must implement catch the FEX_legacy_size_exceeded exception if it happens&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;getTeam(mixed $defaultValue = null)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;retrieveLegacyData() ⚠️ this alias was returning a JSON-encoded value, while the getTeam function returns the real value )&lt;br /&gt;
: Same as retrieveLegacyData, except that it retrieves some data for the whole team within the current table (set by storeLegacyTeamData)&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;deleteTeam()&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;removeLegacyTeamData() )&lt;br /&gt;
: Same as removeLegacyData, except that it retrieves some data for the whole team within the current table (set by storeLegacyTeamData)&lt;br /&gt;
&lt;br /&gt;
== Players text input and moderation ==&lt;br /&gt;
This section concerns only games where the players have to write some words to play: games based on words, like &amp;quot;Just one&amp;quot; or &amp;quot;Codenames&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some players will use your game to write insults or profanities. As this is part of the game and not in the game chat, these words cannot be reported by players and moderated.&lt;br /&gt;
&lt;br /&gt;
If you met the following situation:&lt;br /&gt;
&lt;br /&gt;
* You are asking a player to type a text (word(s) or sentence)&lt;br /&gt;
* The player can enter any text (this is not a pre-selection or anything you can control)&lt;br /&gt;
* This text is visible by at least one other player&lt;br /&gt;
&lt;br /&gt;
Then, you must use the following method:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;function logTextForModeration( $player_id, $text )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
player_id = player who write the text&lt;br /&gt;
&lt;br /&gt;
text = text that has been written&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This function will have no visible consequence for your game, but will allow players to report the text to moderators if something happens.&lt;br /&gt;
&lt;br /&gt;
== Tournament API (🚧 Beta) ==&lt;br /&gt;
&lt;br /&gt;
The Tournament API is meant only for tournament encounters. It lets you persist per‑player data within a tournament and access deterministic seeds shared by all encounters of a tournament step.&lt;br /&gt;
&lt;br /&gt;
Do not use this for preferences or long‑term progression: if a table is not linked to a tournament, these requests will fail, and all tournament data is wiped when the tournament ends anyway.&lt;br /&gt;
&lt;br /&gt;
You can use it for:&lt;br /&gt;
* enforcing tournament‑wide constraints (ex: keep the same deck across all rounds)&lt;br /&gt;
* deterministic setup shared across a tournament step (ex: generate the same map layout for all encounters in a step)&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;isTournament()&lt;br /&gt;
: Returns true if this table is a tournament encounter.&lt;br /&gt;
: Use this to guard tournament‑only logic.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;getSeedInfo()&lt;br /&gt;
: Returns an associative array containing deterministic seeds for tournament encounters.&lt;br /&gt;
: Keys:&lt;br /&gt;
:* &amp;lt;code&amp;gt;tournament_seed&amp;lt;/code&amp;gt;: stable across the whole tournament.&lt;br /&gt;
:* &amp;lt;code&amp;gt;step_seed&amp;lt;/code&amp;gt;: stable across a tournament step (same for all encounters in that step).&lt;br /&gt;
:* &amp;lt;code&amp;gt;parent_tournament_seed&amp;lt;/code&amp;gt;: stable across the parent tournament (the reference tournament for sub-tournaments of Groups Stage tournament mode).&lt;br /&gt;
:&lt;br /&gt;
: Note: This call is already guarded internally, no external call is made unless the table is a tournament encounter.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;storePlayerGameData(int $playerId, string $key, mixed $data)&lt;br /&gt;
: Store per‑player game data for the current tournament.&lt;br /&gt;
: Data is JSON‑encoded automatically.&lt;br /&gt;
: The cumulative size of all data stored for a player in a tournament (even over multiple keys) is limited to 64 KiB.&lt;br /&gt;
: Keys must be 1–16 characters and letters/numbers only.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;retrievePlayerGameData(int $playerId, string $key)&lt;br /&gt;
: Retrieve per‑player game data for the current tournament.&lt;br /&gt;
: If `$key` contains &#039;%&#039;, returns an array of key =&amp;gt; value pairs (or [] if no match).&lt;br /&gt;
: Otherwise, returns a single value (or null if no match).&lt;br /&gt;
: Returned values are JSON‑decoded automatically.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;removePlayerGameData(int $playerId, string $key)&lt;br /&gt;
: Remove per‑player game data for the current tournament.&lt;br /&gt;
: You can use &#039;%&#039; in `$key` to remove multiple entries at once.&lt;br /&gt;
: All tournament data is removed automatically when the tournament is finished.&lt;br /&gt;
&lt;br /&gt;
== Language dependent games API ==&lt;br /&gt;
&lt;br /&gt;
This API is used for games that are heavily language dependent. Two most common use cases are:&lt;br /&gt;
* Games that have a language dependent component that are not necessarily translatable, typically a list of words. (Think of games like Codenames, Decrypto, Just One...)&lt;br /&gt;
* Games with massive communication where players would like to ensure that all participants speak the same language. (Think of games like Werewolf, The Resistance, maybe even dixit...)&lt;br /&gt;
&lt;br /&gt;
If this option is used, the table created will be limited only to users that have specific language in their profile. Player starting the game would be able to chose one of the languages they speak.&lt;br /&gt;
&lt;br /&gt;
There is a new property language_dependency in gameinfos.jsonc which can be set like this:&lt;br /&gt;
  &amp;quot;language_dependency&amp;quot;: false,  //or if the property is missing, the game is not language dependent&lt;br /&gt;
  &amp;quot;language_dependency&amp;quot;: true, //all players at the table must speak the same language&lt;br /&gt;
  &amp;quot;language_dependency&amp;quot;: { &amp;quot;1&amp;quot;: &amp;quot;en&amp;quot;, &amp;quot;2&amp;quot;: &amp;quot;fr&amp;quot;, &amp;quot;3&amp;quot;: &amp;quot;it&amp;quot; }, //1-based list of supported languages&lt;br /&gt;
&lt;br /&gt;
In the gamename.game.php file, you can get the id of selected language with the method &#039;&#039;&#039;getGameLanguage&#039;&#039;&#039;.&lt;br /&gt;
; function getGameLanguage()&lt;br /&gt;
: Returns an index of the selected language as defined in gameinfos.jsonc.&lt;br /&gt;
&lt;br /&gt;
Languages currently available on BGA are:&lt;br /&gt;
  &#039;ar&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;العربية&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ar_AE&#039; ),             // Arabic&lt;br /&gt;
  &#039;be&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;беларуская мова&amp;quot;, &#039;code&#039; =&amp;gt; &#039;be_BY&#039; ),     // Belarusian&lt;br /&gt;
  &#039;bn&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;বাংলা&amp;quot;, &#039;code&#039; =&amp;gt; &#039;bn_BD&#039; ),                // Bengali&lt;br /&gt;
  &#039;bg&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;български език&amp;quot;, &#039;code&#039; =&amp;gt; &#039;bg_BG&#039; ),      // Bulgarian&lt;br /&gt;
  &#039;ca&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;català&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ca_ES&#039; ),              // Catalan&lt;br /&gt;
  &#039;cs&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;čeština&amp;quot;, &#039;code&#039; =&amp;gt; &#039;cs_CZ&#039; ),             // Czech&lt;br /&gt;
  &#039;da&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;dansk&amp;quot;, &#039;code&#039; =&amp;gt; &#039;da_DK&#039; ),               // Danish&lt;br /&gt;
  &#039;de&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;deutsch&amp;quot;, &#039;code&#039; =&amp;gt; &#039;de_DE&#039; ),             // German&lt;br /&gt;
  &#039;el&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Ελληνικά&amp;quot;, &#039;code&#039; =&amp;gt; &#039;el_GR&#039; ),            // Greek&lt;br /&gt;
  &#039;en&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;English&amp;quot;, &#039;code&#039; =&amp;gt; &#039;en_US&#039; ),             // English&lt;br /&gt;
  &#039;es&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;español&amp;quot;, &#039;code&#039; =&amp;gt; &#039;es_ES&#039; ),             // Spanish&lt;br /&gt;
  &#039;et&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;eesti keel&amp;quot;, &#039;code&#039; =&amp;gt; &#039;et_EE&#039; ),          // Estonian       &lt;br /&gt;
  &#039;fi&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;suomi&amp;quot;, &#039;code&#039; =&amp;gt; &#039;fi_FI&#039; ),               // Finnish&lt;br /&gt;
  &#039;fr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;français&amp;quot;, &#039;code&#039; =&amp;gt; &#039;fr_FR&#039; ),            // French&lt;br /&gt;
  &#039;he&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;עברית&amp;quot;, &#039;code&#039; =&amp;gt; &#039;he_IL&#039; ),               // Hebrew       &lt;br /&gt;
  &#039;hi&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;हिन्दी&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hi_IN&#039; ),                 // Hindi&lt;br /&gt;
  &#039;hr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Hrvatski&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hr_HR&#039; ),            // Croatian&lt;br /&gt;
  &#039;hu&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;magyar&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hu_HU&#039; ),              // Hungarian&lt;br /&gt;
  &#039;id&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Bahasa Indonesia&amp;quot;, &#039;code&#039; =&amp;gt; &#039;id_ID&#039; ),    // Indonesian&lt;br /&gt;
  &#039;ms&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Bahasa Malaysia&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ms_MY&#039; ),     // Malaysian&lt;br /&gt;
  &#039;it&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;italiano&amp;quot;, &#039;code&#039; =&amp;gt; &#039;it_IT&#039; ),            // Italian&lt;br /&gt;
  &#039;ja&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;日本語&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ja_JP&#039; ),               // Japanese&lt;br /&gt;
  &#039;jv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Basa Jawa&amp;quot;, &#039;code&#039; =&amp;gt; &#039;jv_JV&#039; ),           // Javanese                       &lt;br /&gt;
  &#039;ko&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;한국어&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ko_KR&#039; ),               // Korean&lt;br /&gt;
  &#039;lt&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;lietuvių&amp;quot;, &#039;code&#039; =&amp;gt; &#039;lt_LT&#039; ),            // Lithuanian&lt;br /&gt;
  &#039;lv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;latviešu&amp;quot;, &#039;code&#039; =&amp;gt; &#039;lv_LV&#039; ),            // Latvian&lt;br /&gt;
  &#039;nl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;nederlands&amp;quot;, &#039;code&#039; =&amp;gt; &#039;nl_NL&#039; ),          // Dutch&lt;br /&gt;
  &#039;no&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;norsk&amp;quot;, &#039;code&#039; =&amp;gt; &#039;nb_NO&#039; ),               // Norwegian&lt;br /&gt;
  &#039;oc&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;occitan&amp;quot;, &#039;code&#039; =&amp;gt; &#039;oc_FR&#039; ),             // Occitan&lt;br /&gt;
  &#039;pl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;polski&amp;quot;, &#039;code&#039; =&amp;gt; &#039;pl_PL&#039; ),              // Polish&lt;br /&gt;
  &#039;pt&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;português&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;pt_PT&#039; ),          // Portuguese&lt;br /&gt;
  &#039;ro&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;română&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;ro_RO&#039;  ),            // Romanian&lt;br /&gt;
  &#039;ru&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Русский язык&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ru_RU&#039; ),        // Russian&lt;br /&gt;
  &#039;sk&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;slovenčina&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sk_SK&#039; ),          // Slovak&lt;br /&gt;
  &#039;sl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;slovenščina&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sl_SI&#039; ),         // Slovenian       &lt;br /&gt;
  &#039;sr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Српски&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sr_RS&#039; ),              // Serbian       &lt;br /&gt;
  &#039;sv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;svenska&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sv_SE&#039; ),             // Swedish&lt;br /&gt;
  &#039;tr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Türkçe&amp;quot;, &#039;code&#039; =&amp;gt; &#039;tr_TR&#039; ),              // Turkish       &lt;br /&gt;
  &#039;uk&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Українська мова&amp;quot;, &#039;code&#039; =&amp;gt; &#039;uk_UA&#039; ),     // Ukrainian&lt;br /&gt;
  &#039;zh&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;中文 (漢)&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;zh_TW&#039; ),           // Traditional Chinese (Hong Kong, Macau, Taiwan)&lt;br /&gt;
  &#039;zh-cn&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;中文 (汉)&amp;quot;, &#039;code&#039; =&amp;gt; &#039;zh_CN&#039; ),         // Simplified Chinese (Mainland China, Singapore)&lt;br /&gt;
&lt;br /&gt;
== Debugging and Tracing ==&lt;br /&gt;
&lt;br /&gt;
To debug php code you can use some tracing functions available from the parent class such as debug, trace, error, warn, dump.&lt;br /&gt;
  &lt;br /&gt;
  $this-&amp;gt;debug(&amp;quot;Ahh!&amp;quot;);&lt;br /&gt;
  $this-&amp;gt;dump(&#039;my_var&#039;,$my_var);&lt;br /&gt;
&lt;br /&gt;
See [[Practical_debugging]] section for complete information about debugging interfaces and where to find logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getBgaEnvironment(): string&#039;&#039;&#039;&lt;br /&gt;
:Returns &amp;quot;studio&amp;quot; for studio and &amp;quot;prod&amp;quot; for production environment (i.e. where games current runs). Only useful for debbugging hooks.&lt;br /&gt;
Note: alpha server is also &amp;quot;prod&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Creating other classes ==&lt;br /&gt;
&lt;br /&gt;
You can create other classes in the &amp;lt;code&amp;gt;modules/php&amp;lt;/code&amp;gt; dir, next to your &amp;lt;code&amp;gt;Game.php&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
If they are names following the PSR-4, they will be autoloaded by BGA (no require_once needed). This doesn&#039;t work for the &amp;quot;legacy way&amp;quot; (=&amp;lt;code&amp;gt;YourGameName.game.php&amp;lt;/code&amp;gt; at the game root dir).&lt;br /&gt;
&lt;br /&gt;
For example, writing &amp;lt;code&amp;gt;new ScoreManager()&amp;lt;/code&amp;gt; in your Game file will try to load the class &amp;lt;code&amp;gt;ScoreManager&amp;lt;/code&amp;gt; of namespace &amp;lt;code&amp;gt;Bga\Games\YourGameName&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;modules/php/ScoreManager.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to add namespace &amp;lt;code&amp;gt;Bga\Games\YourGameName;&amp;lt;/code&amp;gt; at the beginning of your module.&lt;br /&gt;
&lt;br /&gt;
You can even put these classes in sublevels : the class &amp;lt;code&amp;gt;Bga\Games\YourGameName\Cards\StandardCard&amp;lt;/code&amp;gt; will be automatically loaded if it is stored in &amp;lt;code&amp;gt;modules/php/Cards/StandardCard.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Main_game_logic:_Game.php&amp;diff=28950</id>
		<title>Main game logic: Game.php</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Main_game_logic:_Game.php&amp;diff=28950"/>
		<updated>2026-03-16T01:17:11Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Result neutralization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
This is the main file for your game logic. Here you initialize the game, persist data, implement the rules and notify the client interface of changes.&lt;br /&gt;
&lt;br /&gt;
This is the main  class that implements the &amp;quot;server&amp;quot; callbacks. As it is a server it cannot initiate any data communicate with the game client (running in browser) and only can respond to client using notifications.&lt;br /&gt;
&lt;br /&gt;
Your php class instance won&#039;t be in memory between two callbacks, every time client send a request a new class will be created, constructor will be called and eventually your callback function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this file is now named Game.php, located in the modules/php directory. If you see it named yourgamename.game.php in the root dir, it&#039;s the legacy usage. In the legacy usage, the namepaces don&#039;t exists.&lt;br /&gt;
&lt;br /&gt;
== File Structure ==&lt;br /&gt;
&lt;br /&gt;
The details of how the file is structured are described directly with comments in the code skeleton provided to you.&lt;br /&gt;
 &lt;br /&gt;
Here is the basic structure:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;__construct&#039;&#039;&#039;: the game constructor, where you define global variables and initiaze class members.&lt;br /&gt;
* &#039;&#039;&#039;setupNewGame&#039;&#039;&#039;: initial setup of the game. Takes an array of players, indexed by player_id. Structure of each player includes player_name, player_canal, player_avatar, and flags indicating admin/ai/premium/order/language/beginner.&lt;br /&gt;
* &#039;&#039;&#039;getAllDatas&#039;&#039;&#039;: where you retrieve all game data during a complete reload of the game. Return value must be associative array. Value of &#039;players&#039; is reserved for returning players data from players table, if you set it it must follow certain rules &lt;br /&gt;
        $result [&#039;players&#039;] = $this-&amp;gt;getCollectionFromDb(&amp;quot;SELECT `player_id` `id`, `player_score` `score`, `player_no` `no`, `player_color` `color` FROM `player`&amp;quot;);&lt;br /&gt;
        // Returned value must include [&#039;players&#039;][$player_id]][&#039;score&#039;] for scores to populate when F5 is pressed.&lt;br /&gt;
getAllDatas accepts a magic parameter &amp;lt;code&amp;gt;int $currentPlayerId&amp;lt;/code&amp;gt; to fetch the information from the point of view of the current player id. It should not have any other parameter&lt;br /&gt;
* &#039;&#039;&#039;getGameProgression&#039;&#039;&#039;: where you compute the game progression indicator. Returns a number indicating percent of progression (0-100). Used to calculate ELO changes of remaining players when a player quits, or as a conceding requirement (in non-tournament 2 player games, a player may concede if the progression is at least 50%).&lt;br /&gt;
* Utility functions: your utility functions.&lt;br /&gt;
* Player actions: the entry points for players actions ([https://en.doc.boardgamearena.com/Players_actions:_yourgamename.action.php more info here]). &lt;br /&gt;
* Game state arguments: methods to return additional data on specific game states ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#args more info here]).&lt;br /&gt;
* Game state actions: the logic to run when entering a new game state ([http://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php#action more info here]).&lt;br /&gt;
* &#039;&#039;&#039;initTable&#039;&#039;&#039;: (not part of template) - this function is called for every php callback by the framework and it can be implement by the game (empty by default). You can use it in rare cases where you need to read database and manipulate some data before any ANY php entry functions are called (such as getAllDatas,action*,st*, etc). Note: it is not called before arg* methods &lt;br /&gt;
* &#039;&#039;&#039;zombieTurn&#039;&#039;&#039;: what to do it&#039;s the turn of a zombie player.&lt;br /&gt;
* &#039;&#039;&#039;upgradeTableDb&#039;&#039;&#039;: function to migrate database if you change it after release on production.&lt;br /&gt;
* &#039;&#039;&#039;getGameName&#039;&#039;&#039;: returns the game name. This will be setup when you create the project. If you are copying files in from another project, make sure you keep this function intact. It must return the right game name, or lots of things will be broken.&lt;br /&gt;
&lt;br /&gt;
== Accessing player information ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: In the following methods, be mindful of the difference between the &amp;quot;active&amp;quot; player and the &amp;quot;current&amp;quot; player. The &#039;&#039;&#039;active&#039;&#039;&#039; player is the player whose turn it is - not necessarily the player who sent a request! The &#039;&#039;&#039;current&#039;&#039;&#039; player is the player who sent the request and will see the results returned by your methods: not necessarily the player whose turn it is!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; getPlayerCount() (or getPlayersNumber() that is an alias )&lt;br /&gt;
: Returns the number of players playing at the table&lt;br /&gt;
: Note: doesn&#039;t work in the beggining of setupNewGame (use count($players) instead). It will work after initialization of player table.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;getActivePlayerId(): string&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot;, whatever what is the current state type.&lt;br /&gt;
: Note: it does NOT mean that this player is active right now, because state type could be &amp;quot;game&amp;quot; or &amp;quot;multiplayer&amp;quot;&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in getArgs / onEnteringState / act functions, and shouldn&#039;t be needed anywhere else.&lt;br /&gt;
&lt;br /&gt;
; getActivePlayerName()&lt;br /&gt;
: Get the &amp;quot;active_player&amp;quot; name&lt;br /&gt;
: Note: avoid using this method in a &amp;quot;multiplayer&amp;quot; state because it does not mean anything.&lt;br /&gt;
&lt;br /&gt;
; getPlayerNameById($player_id)&lt;br /&gt;
: Get the name by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerColorById($player_id)&lt;br /&gt;
: Get the color by id&lt;br /&gt;
&lt;br /&gt;
; getPlayerNoById($player_id)&lt;br /&gt;
: Get &#039;player_no&#039; (number) by id&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; loadPlayersBasicInfos()&lt;br /&gt;
: Get an associative array with generic data about players (ie: not game specific data).&lt;br /&gt;
: The key of the associative array is the player id. The returned table is cached, so ok to call multiple times without performance concerns.&lt;br /&gt;
: The content of each value is:&lt;br /&gt;
: * player_name - the name of the player&lt;br /&gt;
: * player_color (ex: ff0000) - the color code of the player (as string)&lt;br /&gt;
: * player_no - the position of the player at the start of the game in natural table order, i.e. 1,2,3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                $players = $this-&amp;gt;loadPlayersBasicInfos();&lt;br /&gt;
                foreach ($players as $player_id =&amp;gt; $info) {&lt;br /&gt;
                    $player_color = $info[&#039;player_color&#039;];&lt;br /&gt;
                    ...&lt;br /&gt;
                }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: if you want array of player ids only you can do this:&lt;br /&gt;
    $player_ids =  array_keys($this-&amp;gt;loadPlayersBasicInfos());  &lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerId(bool $bReturnNullIfNotLogged = false) string&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot;. The current player is the one from which the action originated (the one who sent the request).&lt;br /&gt;
: &#039;&#039;&#039;Be careful&#039;&#039;&#039;: This is not necessarily the active player!&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in act functions, and also in getAllDatas, and shouldn&#039;t be needed anywhere.&lt;br /&gt;
: &#039;&#039;&#039;Very important&#039;&#039;&#039;: in your setupNewGame and zombieTurn function, you must never use getCurrentPlayerId() or getCurrentPlayerName(), &lt;br /&gt;
: otherwise it will fail with a &amp;quot;Not logged&amp;quot; error message (these actions are triggered from the main site and propagated to the gameserver from a server, not from a browser. As a consequence, there is no current player associated to these actions).&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerName(bool $bReturnEmptyIfNotLogged = false) string&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; name. &lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Can be easily replaced by $this-&amp;gt;getPlayerNameById($currentPlayerId);&lt;br /&gt;
&lt;br /&gt;
; getCurrentPlayerColor()&lt;br /&gt;
: Get the &amp;quot;current_player&amp;quot; color. &lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Can be easily replaced by $this-&amp;gt;getPlayerColorById($currentPlayerId);&lt;br /&gt;
&lt;br /&gt;
; isCurrentPlayerZombie()&lt;br /&gt;
: Check the &amp;quot;current_player&amp;quot; zombie status. If true, player is zombie, i.e. left or was kicked out of the game.&lt;br /&gt;
: Note: this will throw an exception if current player is not at the table, i.e. spectator&lt;br /&gt;
: Be careful using this method (see above). Should never be needed, zombie players should behave like real players, and everything specific to zombie should be set in the zombie method only.&lt;br /&gt;
&lt;br /&gt;
; isSpectator()&lt;br /&gt;
: Check the &amp;quot;current_player&amp;quot; spectator status. If true, the user accessing the game is a spectator (not part of the game). For this user, the interface should display all public information, and no private information (like a friend sitting at the same table as players and just spectating the game).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For player score and tiebreaker, see [[Main game logic: Game.php#Manage player scores and Tie breaker]]&lt;br /&gt;
&lt;br /&gt;
== Accessing the database ==&lt;br /&gt;
&lt;br /&gt;
The main game logic should be the only point from which you should access the game database. You access your database using SQL queries with the methods below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BGA uses [http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-transactions.html database transactions]. This means that your database changes WON&#039;T BE APPLIED to the database until your request ends normally (web request, not database request). Using transactions is in fact very useful for you; at any time, if your game logic detects that something is wrong (example: a disallowed move), you just have to throw an exception and all changes to the game situation will be removed. This also means that you need not (and in fact cannot) use your own transactions for multiple related database operations.&lt;br /&gt;
&lt;br /&gt;
However there are sets of database operation that will do implicit commit (most common mistake is to use &amp;quot;TRUNCATE&amp;quot;), you cannot use these operations during the game, it breaks the unrolling of transactions and will lead to nasty issues&lt;br /&gt;
(https://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit).&lt;br /&gt;
&lt;br /&gt;
All methods below are part of game class (and view class) and can be accessed using $this-&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; DbQuery( string $sql )&lt;br /&gt;
: This is the generic method to access the database.&lt;br /&gt;
: It can execute any type of SELECT/UPDATE/DELETE/REPLACE/INSERT query on the database. Returns result of the query.&lt;br /&gt;
: For SELECT queries, the specialized methods below are much better.&lt;br /&gt;
: Do not use method for TRUNCATE, DROP and other table altering operations. See disclamer above about implicit commits. If you really need TRUNCATE use DELETE FROM xxx instead.&lt;br /&gt;
&lt;br /&gt;
; getUniqueValueFromDB( string $sql )&lt;br /&gt;
: Returns a unique value from DB or null if no value is found.&lt;br /&gt;
: $sql must be a SELECT query.&lt;br /&gt;
: Raise an exception if more than 1 row is returned.&lt;br /&gt;
&lt;br /&gt;
; getCollectionFromDB( string $sql, bool $bSingleValue=false ) array&lt;br /&gt;
: Returns an associative array of rows for a sql SELECT query.&lt;br /&gt;
: The key of the resulting associative array is the first field specified in the SELECT query.&lt;br /&gt;
: The value of the resulting associative array is an associative array with all the field specified in the SELECT query and associated values.&lt;br /&gt;
: First column must be a primary or alternate key (semantically, it does not actually have to declared in sql as such).&lt;br /&gt;
: The resulting collection can be empty (it won&#039;t be null).&lt;br /&gt;
: If you specified $bSingleValue=true and if your SQL query requests 2 fields A and B, the method returns an associative array &amp;quot;A=&amp;gt;B&amp;quot;, otherwise its A=&amp;gt;[A,B]&lt;br /&gt;
: Note: The name a bit misleading, it really return associative array, i.e. map and NOT a collection. You cannot use it to get list of values which may have duplicates (hence primary key requirement on first column). If you need simple array use getObjectListFromDB() method.&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getCollectionFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player`&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 1234 =&amp;gt; [ &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ],&lt;br /&gt;
 1235 =&amp;gt; [ &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 ]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getCollectionFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name` FROM `player`&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 1234 =&amp;gt; &#039;myuser0&#039;,&lt;br /&gt;
 1235 =&amp;gt; &#039;myuser1&#039;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyCollectionFromDB(string $sql) array&lt;br /&gt;
: Same as getCollectionFromDB($sdl), but raise an exception if the collection is empty. Note: this function does NOT have 2nd argument as previous one does.&lt;br /&gt;
&lt;br /&gt;
; getObjectFromDB(string $sql) array&lt;br /&gt;
: Returns one row for the sql SELECT query as an associative array or null if there is no result (where fields are keys mapped to values)&lt;br /&gt;
: Raise an exception if the query return more than one row (you can use LIMIT 1 in the query to avoid the exception)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player` WHERE `player_id` = &#039;$player_id&#039;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
  &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 &lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getNonEmptyObjectFromDB(string $sql) array&lt;br /&gt;
: Similar to previous one, but raise an exception if no row is found&lt;br /&gt;
&lt;br /&gt;
; getObjectListFromDB(string $sql, bool $bUniqueValue=false) array&lt;br /&gt;
: Return an array of rows for a sql SELECT query.&lt;br /&gt;
: The result is the same as &amp;quot;getCollectionFromDB&amp;quot; except that the result is a simple array (and not an associative array).&lt;br /&gt;
: The result can be empty.&lt;br /&gt;
: If you specified $bUniqueValue=true and if your SQL query request 1 field, the method returns directly an array of values.&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectListFromDB( &amp;quot;SELECT `player_id` `id`, `player_name` `name`, `player_score` `score` FROM `player`&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 [ &#039;id&#039;=&amp;gt;1234, &#039;name&#039;=&amp;gt;&#039;myuser0&#039;, &#039;score&#039;=&amp;gt;1 ],&lt;br /&gt;
 [ &#039;id&#039;=&amp;gt;1235, &#039;name&#039;=&amp;gt;&#039;myuser1&#039;, &#039;score&#039;=&amp;gt;0 ]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$result = $this-&amp;gt;getObjectListFromDB( &amp;quot;SELECT `player_name` `name` FROM `player`&amp;quot;, true );&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
[&lt;br /&gt;
 &#039;myuser0&#039;,&lt;br /&gt;
 &#039;myuser1&#039;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; getDoubleKeyCollectionFromDB(string $sql, bool $bSingleValue=false) array&lt;br /&gt;
: Return an associative array of associative array, from a SQL SELECT query.&lt;br /&gt;
: First array level correspond to first column specified in SQL query.&lt;br /&gt;
: Second array level correspond to second column specified in SQL query.&lt;br /&gt;
: If $bSingleValue = true, keep only third column on result&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; DbGetLastId()&lt;br /&gt;
: Return the PRIMARY key of the last inserted row (see PHP mysql_insert_id function).&lt;br /&gt;
&lt;br /&gt;
; DbAffectedRow() int&lt;br /&gt;
: Return the number of row affected by the last operation&lt;br /&gt;
&lt;br /&gt;
; escapeStringForDB(string $string) string&lt;br /&gt;
: You must use this function on every string type data in your database that contains unsafe data.&lt;br /&gt;
: (unsafe = can be modified by a player).&lt;br /&gt;
: This method makes sure that no SQL injection will be done through the string used, &#039;&#039;&#039;as long as the SQL statement uses single quotes around the string.  This is important!&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;Note: if you using standard types in ajax actions, like AT_alphanum it is sanitized before arrival. This function is only needed if you manage to get an unchecked string, like in the games where user has to enter text as a response.&#039;&#039;&lt;br /&gt;
&#039;&#039;Note: This function does not escape % and _ by default, which are wildcards if used in an SQL &amp;quot;LIKE&amp;quot; statement. The developer must determine if this is desirable behavior.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: see Editing [[Game database model: dbmodel.sql]] to know how to define your database model.&lt;br /&gt;
&lt;br /&gt;
== Use bga globals ==&lt;br /&gt;
Sometimes, you want a single global value for your game, and you don&#039;t want to create a DB table specifically for it.&lt;br /&gt;
&lt;br /&gt;
You can do this with the BGA framework &amp;quot;globals&amp;quot;. Your value will be stored in the &amp;quot;bga_globals&amp;quot; table in the database, and you can access it with simple methods.&lt;br /&gt;
&lt;br /&gt;
The keys are strings, so you might want to store them in constants to avoid mistakes (the key must be at maximum 50 characters long).&lt;br /&gt;
&lt;br /&gt;
The variable can be of any type (number, string, array, object) and will be stored as a JSON (so functions cannot be stored, and circular references on objects will trigger an Exception when storing).&lt;br /&gt;
&lt;br /&gt;
Having a string key and a JSON serialization allows you to debug easily by looking at the bga_globals table content.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: this globals module doesn&#039;t use cache, so every call to one of the following methods makes a DB request.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;set(string $name, $mixed $obj): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Define the value of a global variable.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const FIRST_PLAYER_ID = &amp;quot;firstPlayerId&amp;quot;;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(FIRST_PLAYER_ID, array_keys($players)[0]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;get(string $name, $mixed $defaultValue = null, ?string $class = null): mixed&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the value of a global variable. Returns `null` if not set, except specified otherwise in the optional `$defaultValue`.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$currentFirstPlayerId = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(FIRST_PLAYER_ID);&lt;br /&gt;
...&lt;br /&gt;
$selectedCardsIds = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(SELECTED_CARDS_IDS, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can specify the expected class type, if you save a class and don&#039;t want it returned as a stdClass.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$undo = new Undo($playerId, $moves);&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(UNDO, $undo);&lt;br /&gt;
&lt;br /&gt;
$undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO); // will return an stdClass&lt;br /&gt;
$undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO, class: Undo::class); // will return an Undo class&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: your class should be a plain object with no mandatory constructor params. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Undo {&lt;br /&gt;
    public function __construct(&lt;br /&gt;
        public ?int $playerId = null,&lt;br /&gt;
        public ?array $moves = null,&lt;br /&gt;
    ) {}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;getAll(...$names): array&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the value of all global variables, as a key=&amp;gt;value array. You can set a list of names to only get matching variables. In that case, non-existent keys will not be set in the returned array, so if you have a key with null value, it means the key has been set to null previously.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$variables = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll();&lt;br /&gt;
...&lt;br /&gt;
$diceVariables = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll(DIE1, DIE2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use with PHP&#039;s [https://www.php.net/extract extract()] function to quickly assign multiple variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
extract($this-&amp;gt;bga-&amp;gt;globals-&amp;gt;getAll(&#039;endTime&#039;, &#039;hour&#039;, &#039;vipWelcome&#039;));&lt;br /&gt;
// $endTime, $hour, and $vipWelcome (may) now exist&lt;br /&gt;
&lt;br /&gt;
if (!empty($endTime)) {&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;delete(...$names): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Delete a global variable or a list of global variables stored in database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;delete(SELECTED_CARDS_IDS);&lt;br /&gt;
...&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;delete(SELECTED_CARDS_IDS, UNDO, AFTER_DISCARD_RETURN_STATE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;has(string $name): bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Indicates if a global variable is stored in database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cardSelectionIsStarted = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;has(SELECTED_CARDS_IDS);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;globals-&amp;gt;inc(string $name, $int $inc): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increments the value of a global variable, and return the incremented value. Will trigger an exception if the variable is not a numeric value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;globals-&amp;gt;inc(PLAYED_ACTIONS_IN_CURRENT_TURN, 1);&lt;br /&gt;
...&lt;br /&gt;
$totalSpent = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;inc(SPENT_COINS_IN_CURRENT_TURN, $cardCost);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use globals (numbers only / game options) ==&lt;br /&gt;
&lt;br /&gt;
Before the `$this-&amp;gt;globals`, you could only store numeric values as globals. Theses &amp;quot;GameStateValues&amp;quot; are stored in the &amp;quot;global&amp;quot; table in the database, and you can access it with simple methods.&lt;br /&gt;
&lt;br /&gt;
All methods below are members of the game class and should be accessed via $this-&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;initGameStateLabels(array $labelsMap): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This method should be located at the beginning of constructor of &#039;&#039;yourgamename.game.php&#039;&#039;. This is where you define the globals used in your game logic, by assigning them IDs.&lt;br /&gt;
&lt;br /&gt;
You can define up to 80 globals, with IDs from 10 to 89 (inclusive, there can be gaps). &lt;br /&gt;
Also you must use this method to access value of game options [[Game_options_and_preferences:_gameoptions.inc.php]], in that case, IDs need to be between 100 and 199.&lt;br /&gt;
You must &#039;&#039;&#039;not&#039;&#039;&#039; use globals outside the range defined above, as those values are used by other components of the framework.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   function __construct() {&lt;br /&gt;
        parent::__construct();&lt;br /&gt;
        $this-&amp;gt;initGameStateLabels([ &lt;br /&gt;
                &amp;quot;my_first_global_variable&amp;quot; =&amp;gt; 10,&lt;br /&gt;
                &amp;quot;my_second_global_variable&amp;quot; =&amp;gt; 11,&lt;br /&gt;
                &amp;quot;my_game_variant&amp;quot; =&amp;gt; 100&lt;br /&gt;
        ]);&lt;br /&gt;
         // other code ...&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: The methods below WILL throw an exception if label is not defined using the call above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateInitialValue( string $label, int $value ): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Initialize global value. This is not required if you ok with default value if 0. This should be called from setupNewGame function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getGameStateValue( string $label, int $default = 0): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Retrieve the value of a global. Returns $default if global is not been initialized (by setGameStateInitialValue).&lt;br /&gt;
&lt;br /&gt;
NOTE: this method use globals &amp;quot;cache&amp;quot; if you directly manipulated globals table OR call this function after undoRestorePoint() - it won&#039;t work as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $value = $this-&amp;gt;getGameStateValue(&#039;my_first_global_variable&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;setGameStateValue( string $label, int $value ): void&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Set the current value of a global. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $this-&amp;gt;setGameStateValue(&#039;my_first_global_variable&#039;, 42);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;incGameStateValue( string $label, int $increment ): int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Increment the current value of a global. If increment is negative, decrement the value of the global.&lt;br /&gt;
&lt;br /&gt;
Return the final value of the global. If global was not initialized it will initialize it as 0.&lt;br /&gt;
&lt;br /&gt;
NOTE: this method use globals &amp;quot;cache&amp;quot; if you directly manipulated globals table OR call this function after undoRestorePoint() - it won&#039;t work as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $value = $this-&amp;gt;incGameStateValue(&#039;my_first_global_variable&#039;, 1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BGA predefined globals ===&lt;br /&gt;
&lt;br /&gt;
BGA already defines some globals in the &#039;&#039;global&#039;&#039; database table. You should not change them directly but it can be useful to know what they mean when debugging:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! global_id !! label !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Current state &lt;br /&gt;
|-&lt;br /&gt;
| 2 || || Active player id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || next_move_id || Next move number&lt;br /&gt;
|-&lt;br /&gt;
| 4 ||  || Game id&lt;br /&gt;
|-&lt;br /&gt;
| 5 ||  || Table creator id&lt;br /&gt;
|-&lt;br /&gt;
| 6 || playerturn_nbr || Player turn number&lt;br /&gt;
|-&lt;br /&gt;
| 7 || gameprogression || Game progression&lt;br /&gt;
|-&lt;br /&gt;
| 8 || initial_reflexion_time || Initial reflection time&lt;br /&gt;
|-&lt;br /&gt;
| 9 || additional_reflexion_time || Additional reflection time&lt;br /&gt;
|-&lt;br /&gt;
| 200 || reflexion_time_profile ||  Game speed&lt;br /&gt;
Real-time games:&lt;br /&gt;
* 0 = Real-time • Fast paced&lt;br /&gt;
* 1 = Real-time • Normal speed&lt;br /&gt;
* 2 = Real-time • Slow speed&lt;br /&gt;
* 9 = No time limit • with friends only&lt;br /&gt;
&lt;br /&gt;
Turn-based games:&lt;br /&gt;
* 10 = Fast Turn-based • 24 moves per day&lt;br /&gt;
* 11 = Fast Turn-based • 12 moves per day&lt;br /&gt;
* 12 = Fast Turn-based • 8 moves per day&lt;br /&gt;
* 13 = Turn-based • 4 moves per day&lt;br /&gt;
* 14 = Turn-based • 3 moves per day&lt;br /&gt;
* 15 = Turn-based • 2 moves per day&lt;br /&gt;
* 17 = Turn-based • 1 move per day&lt;br /&gt;
* 19 = Turn-based • 1 move per 2 days&lt;br /&gt;
* 20 = No time limit • with friends only&lt;br /&gt;
|-&lt;br /&gt;
| 201 || bgaranking_mode || Game mode&lt;br /&gt;
* 0 = Normal mode&lt;br /&gt;
* 1 = Friendly mode (no ELO)&lt;br /&gt;
* 2 = Arena mode&lt;br /&gt;
|-&lt;br /&gt;
| 207 || game_language ||GAMESTATE_GAME_LANG&lt;br /&gt;
|-&lt;br /&gt;
| 300 || game_db_version ||GAMESTATE_GAMEVERSION: Current version of the game (when in production)&lt;br /&gt;
|-&lt;br /&gt;
| 301 || game_result_neutralized ||GAMESTATE_GAME_RESULT_NEUTRALIZED&lt;br /&gt;
|-&lt;br /&gt;
| 302 || neutralized_player_id ||GAMESTATE_NEUTRALIZED_PLAYER_ID&lt;br /&gt;
|-&lt;br /&gt;
| 304 || undo_moves_stored ||GAMESTATE_UNDO_MOVES_STORED&lt;br /&gt;
|-&lt;br /&gt;
| 305 || undo_moves_player ||GAMESTATE_UNDO_MOVES_PLAYER&lt;br /&gt;
|-&lt;br /&gt;
| 306 || lock_screen_timestamp ||GAMESTATE_LOCK_TIMESTAMP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game states and active players ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Activate player handling ===&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;activeNextPlayer()&lt;br /&gt;
: Make the next player active in the natural player order.&lt;br /&gt;
: Note: you CANNOT use this method in a ACTIVE_PLAYER or MULTIPLE_ACTIVE_PLAYER state. You must use a GAME type game state for this.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;activePrevPlayer()&lt;br /&gt;
: Make the previous player active (in the natural player order).&lt;br /&gt;
: Note: you CANNOT use this method in a ACTIVE_PLAYER or MULTIPLE_ACTIVE_PLAYER state. You must use a GAME type game state for this.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;changeActivePlayer( $player_id )&lt;br /&gt;
: You can call this method to make any player active.&lt;br /&gt;
: Note: you CANNOT use this method in a ACTIVE_PLAYER or MULTIPLE_ACTIVE_PLAYER state. You must use a GAME type game state for this.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;getActivePlayerId() string&lt;br /&gt;
: Return the &amp;quot;active_player&amp;quot; id&lt;br /&gt;
: Note: it does NOT mean that this player is active right now, because state type could be GAME or MULTIPLE_ACTIVE_PLAYER&lt;br /&gt;
: Note: avoid using this method in a MULTIPLE_ACTIVE_PLAYER state because it does not mean anything.&lt;br /&gt;
: In general, you shouldn&#039;t use this method. It is available as a magic param in getArgs / onEnteringState / act functions, and shouldn&#039;t be needed anywhere else.&lt;br /&gt;
&lt;br /&gt;
=== Multiple activate player handling ===&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive()&lt;br /&gt;
: All playing players are made active. Update notification is sent to all players (this will trigger &#039;&#039;&#039;onUpdateActionButtons&#039;&#039;&#039;).&lt;br /&gt;
: Usually, you use this method at the beginning of a game state (e.g., &amp;quot;stGameState&amp;quot;) which transitions to a MULTIPLE_ACTIVE_PLAYER state in which multiple players have to perform some action. Do not use this method if you going to make some more changes in the active player list. (I.e., if you want to take away MULTIPLE_ACTIVE_PLAYER status immediately afterwards, use setPlayersMultiactive instead.)&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function st_MultiPlayerInit() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;stMakeEveryoneActive()&lt;br /&gt;
:this method can be used in state machine to make everybody active as &amp;quot;st&amp;quot; method of multiplayeractive state, it just calls $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive()&lt;br /&gt;
&lt;br /&gt;
This is to be used in state declaration:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    2 =&amp;gt; array(&lt;br /&gt;
    		&amp;quot;name&amp;quot; =&amp;gt; &amp;quot;playerTurnPlace&amp;quot;,&lt;br /&gt;
    		&amp;quot;description&amp;quot; =&amp;gt; \clienttranslate(&#039;Other player must place ships&#039;),&lt;br /&gt;
    		&amp;quot;descriptionmyturn&amp;quot; =&amp;gt; \clienttranslate(&#039;${you} must place ships (click on YOUR SHIPS board to place)&#039;),&lt;br /&gt;
    		&amp;quot;type&amp;quot; =&amp;gt; MULTIPLE_ACTIVE_PLAYER,&lt;br /&gt;
                &#039;action&#039; =&amp;gt; &#039;stMakeEveryoneActive&#039;,&lt;br /&gt;
                &#039;args&#039; =&amp;gt; &#039;arg_playerTurnPlace&#039;,&lt;br /&gt;
    	     	&amp;quot;possibleactions&amp;quot; =&amp;gt; array( &amp;quot;actionBla&amp;quot; ),&lt;br /&gt;
                &amp;quot;transitions&amp;quot; =&amp;gt; array( &amp;quot;next&amp;quot; =&amp;gt; 4, &amp;quot;last&amp;quot; =&amp;gt; 99)&lt;br /&gt;
    ),&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setAllPlayersNonMultiactive( $next_state )&lt;br /&gt;
: All playing players are made inactive. Transition to next state, by transition name or State class name.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive( $players, $next_state, $bExclusive = false )&lt;br /&gt;
: Make a specific list of players active during a multiactive gamestate. Update notification is sent to all players whose state changed.&lt;br /&gt;
: &amp;quot;players&amp;quot; is the array of player id that should be made active. If &amp;quot;players&amp;quot; is not empty the value of &amp;quot;next_state&amp;quot; will be ignored (you can put whatever you want)&lt;br /&gt;
: If &amp;quot;bExclusive&amp;quot; parameter is not set or false it doesn&#039;t deactivate other previously active players. If its set to true, the players who will be multiactive at the end are only these in &amp;quot;$players&amp;quot; array&lt;br /&gt;
&lt;br /&gt;
: In case &amp;quot;players&amp;quot; is empty, the method trigger the &amp;quot;next_state&amp;quot; transition, by transition name or State class name, to go to the next game state.&lt;br /&gt;
: returns true if state transition happened, false otherwise&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $player_id, $next_state )&lt;br /&gt;
: During a multiactive game state, make the specified player inactive.&lt;br /&gt;
: Usually, you call this method during a multiactive game state after a player did his action. It is also possible to call it directly from multiplayer action handler.&lt;br /&gt;
: If this player was the last active player, the method trigger the &amp;quot;next_state&amp;quot; transition, by transition name or State class name, to go to the next game state.&lt;br /&gt;
: returns true if state transition happened, false otherwise&lt;br /&gt;
Example of usage (see state declaration of playerTurnPlace above):&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actionBla($args) {&lt;br /&gt;
        $this-&amp;gt;checkAction(&#039;actionBla&#039;);&lt;br /&gt;
        // handle the action using $this-&amp;gt;getCurrentPlayerId()&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $this-&amp;gt;getCurrentPlayerId(), &#039;next&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getActivePlayerList()&lt;br /&gt;
: With this method you can retrieve the list of the active player at any time.&lt;br /&gt;
: During a GAME type gamestate, it will return a void array.&lt;br /&gt;
: During a ACTIVE_PLAYER type gamestate, it will return an array with one value (the active player id).&lt;br /&gt;
: During a MULTIPLE_ACTIVE_PLAYER type gamestate, it will return an array of the active players id.&lt;br /&gt;
: Note: you should only use this method in the latter case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;  $this-&amp;gt;gamestate-&amp;gt;updateMultiactiveOrNextState( $next_state_if_none )&lt;br /&gt;
: Sends update notification about multiplayer changes. All multiactive set* functions above do that, however if you want to change state manually using db queries for complex calculations, you have to call this yourself after. Do not call this if you calling one of the other setters above. Next state param is a transition name or State class name.&lt;br /&gt;
Example: you have player teams and you want to activate all players in one team&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;0&#039;&amp;quot;;&lt;br /&gt;
        $this-&amp;gt;DbQuery( $sql );&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;1&#039; WHERE `player_id` = &#039;$player_id&#039; AND `player_team` = &#039;$team_no&#039;&amp;quot;;&lt;br /&gt;
        $this-&amp;gt;DbQuery( $sql );&lt;br /&gt;
        &lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;updateMultiactiveOrNextState( &#039;error&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; updating database manually&lt;br /&gt;
: Use this helper function to change multiactive state without sending notification&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    /**&lt;br /&gt;
     * Changes values of multiactivity in db, does not sent notifications.&lt;br /&gt;
     * To send notifications after use updateMultiactiveOrNextState&lt;br /&gt;
     * @param number $player_id, player id &amp;lt;=0 or null - means ALL&lt;br /&gt;
     * @param number $value - 1 multiactive, 0 non multiactive&lt;br /&gt;
     */&lt;br /&gt;
    function dbSetPlayerMultiactive($player_id = -1, $value = 1) {&lt;br /&gt;
        if (! $value)&lt;br /&gt;
            $value = 0;&lt;br /&gt;
        else&lt;br /&gt;
            $value = 1;&lt;br /&gt;
        $sql = &amp;quot;UPDATE `player` SET `player_is_multiactive` = &#039;$value&#039; WHERE `player_zombie` = 0 and `player_eliminated` = 0&amp;quot;;&lt;br /&gt;
        if ($player_id &amp;gt; 0) {&lt;br /&gt;
            $sql .= &amp;quot; AND `player_id` = $player_id&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $this-&amp;gt;DbQuery($sql);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;$this-&amp;gt;gamestate-&amp;gt;isPlayerActive($player_id)&lt;br /&gt;
:Return true if specified player is active right now.&lt;br /&gt;
:This method take into account game state type, ie nobody is active if game state is &amp;quot;game&amp;quot; and several players can be active if game state is &amp;quot;multiplayer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;$this-&amp;gt;bIndependantMultiactiveTable&lt;br /&gt;
:This flag can be set to true in constructor of game.php to force creation of second table to handle multiplayer states (normally these are in player table), this is very advanced feature.&lt;br /&gt;
:ONLY use it after you deploy you game to production if you receive unusual amount of bug report with dead lock symptoms DURING multiactiveplayer states&lt;br /&gt;
    function __construct() {&lt;br /&gt;
      ...&lt;br /&gt;
      $this-&amp;gt;bIndependantMultiactiveTable=true;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== States functions ===&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextState( $transition )&lt;br /&gt;
: Change current state to a new state. Important: the $transition parameter is the name of the transition (or the state class name), and NOT the name of the target game state, see [[Your game state machine: states.inc.php]] for more information about states.&lt;br /&gt;
:&#039;&#039;with State classes, you should not need it and you can just return the class name of the next state.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$this-&amp;gt;gamestate-&amp;gt;jumpToState($stateNum)&#039;&#039;&#039;&lt;br /&gt;
: Change current state to a new state. Important: the $stateNum parameter is the key of the state. See [[Your game state machine: states.inc.php]] for more information about states.&lt;br /&gt;
: Note: this is very advanced method, it should not be used in normal cases. Specific advanced cases include - jumping to specific state from &amp;quot;do_anytime&amp;quot; actions, jumping to dispatcher state or jumping to recovery state from zombie player function&lt;br /&gt;
:&#039;&#039;with State classes, you should not need it and you can just return the class name of the next state.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;checkAction( $actionName, $bThrowException=true )&lt;br /&gt;
: Check if the current player can perform a specific action in the current game state, and optionally throw an exception if they can&#039;t.&lt;br /&gt;
: The action is valid if it is listed in the &amp;quot;possibleactions&amp;quot; array for the current game state (see game state description).&lt;br /&gt;
: This method MUST be the first one called in ALL your PHP methods that handle player actions that are not using [[Main game logic: yourgamename.game.php#Actions (autowired)|Action autowiring]], in order to make sure a player doesn&#039;t perform an action not allowed by the rules at the point in the game.  It should not be called from methods where the current player is not necessarily the active player, otherwise it may fail with an &amp;quot;It is not your turn&amp;quot; exception.&lt;br /&gt;
: If &amp;quot;bThrowException&amp;quot; is set to &amp;quot;false&amp;quot;, the function returns &#039;&#039;&#039;false&#039;&#039;&#039; in case of failure instead of throwing an exception. This is useful when several actions are possible, in order to test each of them without throwing exceptions.&lt;br /&gt;
:&#039;&#039;With auto-wired actions, you should not need it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction( $action )&lt;br /&gt;
: (rarely used)&lt;br /&gt;
: This works exactly like &amp;quot;checkAction&amp;quot; (above), except that it does NOT check if the current player is active.&lt;br /&gt;
: &#039;&#039;&#039;Note: This does NOT check either spectator or eliminated status, so those checks must be done manually.&#039;&#039;&#039;&lt;br /&gt;
: This is used specifically in certain game states when you want to authorize additional actions for players that are not active at the moment.&lt;br /&gt;
: Example: in &#039;&#039;Libertalia&#039;&#039;, you want to authorize players to change their mind about the card played. They are of course not active at the time they change their mind, so you cannot use &amp;quot;checkAction&amp;quot;; use &amp;quot;checkPossibleAction&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
This is how PHP action looks that returns player to active state (only for multiplayeractive states). To be able to execute this on client do not call checkAction on js side for this specific action.&lt;br /&gt;
&lt;br /&gt;
   function actUnpass(int $currentPlayerId) {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction(&#039;actUnpass&#039;); // player changed mind about passing while others were thinking&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive([$currentPlayerId], &#039;error&#039;, false);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()&lt;br /&gt;
: Returns the current main state, ignoring private parallel states.&lt;br /&gt;
: To get the state as an array, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()-&amp;gt;toArray()&amp;lt;/code&amp;gt; and it will get a result similar to $this-&amp;gt;gamestate-&amp;gt;state()&lt;br /&gt;
: To get the state name, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentMainState()-&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentMainStateId()&lt;br /&gt;
: Returns the current main state id, ignoring private parallel states. (previously, it was the state_id() function, that returned the state numer as a string).&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentState(int $playerId)&lt;br /&gt;
: Returns the current state for a player. If the player is in private parallel state, it means the current private state for this player.&lt;br /&gt;
: To get the state as an array, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentState($playerId)-&amp;gt;toArray()&amp;lt;/code&amp;gt;&lt;br /&gt;
: To get the state name, use &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;getCurrentState($playerId)-&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getCurrentStateId(int $playerId)&lt;br /&gt;
: Returns the current state id for a player. If the player is in private parallel state, it means the current private state for this player.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;isMultiactiveState()&lt;br /&gt;
: Return true if we are in MULTIPLE_ACTIVE_PLAYER state, false otherwise&lt;br /&gt;
&lt;br /&gt;
=== Private parallel states ===&lt;br /&gt;
&lt;br /&gt;
See the overview of private parallel states [[Your_game_state_machine:_states.inc.php#Private_parallel_states|here]].&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers()&lt;br /&gt;
: All active players in a multiactive state are entering a first private state defined in the master state&#039;s initialprivate parameter.&lt;br /&gt;
: Every time you need to start a private parallel states you need to call this or similar methods below.&lt;br /&gt;
: Note: at least one player needs to be active (see [[#Multiple_activate_player_handling|above]]) and current game state must be a multiactive state with initialprivate parameter defined&lt;br /&gt;
: Note: initialprivate parameter of master state should be set to the id of the first private state. This private state needs to be defined in states.php with the type set to &#039;private&#039;.&lt;br /&gt;
: Note: this method is usually preceded with activating some or all players&lt;br /&gt;
: Note: initializing private state can run action or args methods of the initial private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stStartPlayerTurn() {&lt;br /&gt;
        // This is usually done in master state action method&lt;br /&gt;
        &lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers();&lt;br /&gt;
&lt;br /&gt;
        // in some cases you can move immediately some or all players to different private states&lt;br /&gt;
        if ($someCondition) {&lt;br /&gt;
            //move all players to different state &lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers(&amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($other condition) {&lt;br /&gt;
            //move single player to different state&lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($specificPlayerId, &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForPlayers($playerIds)&lt;br /&gt;
: Players with specified ids are entering a first private state defined in the master state initialprivate parameter.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;initializePrivateState($playerId)&lt;br /&gt;
: Player with the specified id is entering a first private state defined in the master state initialprivate parameter.&lt;br /&gt;
: Everytime you need to start a private parallel states you need to call this or similar methods above&lt;br /&gt;
: Note: player needs to be active (see [[#Multiple_activate_player_handling|above]]) and current game state must be a multiactive state with initialprivate parameter defined&lt;br /&gt;
: Note: initialprivate parameter of master state should be set to the id of the first private state. This private state needs to be defined in states.php with the type set to &#039;private&#039;.&lt;br /&gt;
: Note: this method is usually preceded with activating that player&lt;br /&gt;
: Note: initializing private state can run action or args methods of the initial private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function st_ChangeMind() {&lt;br /&gt;
        // This player finished his move before, but now decides change something while other players are still active&lt;br /&gt;
        // We activate the player and initialize his private state&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayersMultiactive([$this-&amp;gt;getCurrentPlayerId()], &amp;quot;&amp;quot;);&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateState(this-&amp;gt;getCurrentPlayerId());&lt;br /&gt;
&lt;br /&gt;
        // It is also possible to move the player to some other specific state immediately&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers($transition)&lt;br /&gt;
: All active players will transition to next private state by specified transition&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: transition should lead to another private state (i.e. a state with type defined as &#039;private&#039;&lt;br /&gt;
: Note: transition should be defined in private state in which the players currently are, or be a state class name.&lt;br /&gt;
: Note: this method can run action or args methods of the target state&lt;br /&gt;
: Note: this is usually used after initializing the private state to move players to specific private state according to the game logic&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stStartPlayerTurn() {&lt;br /&gt;
        // This is usually done in master state action method&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setAllPlayersMultiactive();&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;initializePrivateStateForAllActivePlayers();&lt;br /&gt;
&lt;br /&gt;
        if ($specificOption) {&lt;br /&gt;
            //move all players to different state &lt;br /&gt;
            $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForAllActivePlayers(&amp;quot;some_transition&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateStateForPlayers($playerIds, $transition)&lt;br /&gt;
: Players with specified ids will transition to next private state specified by provided transition, by transition name or State class name.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($playerId, $transition)&lt;br /&gt;
: Player with specified id will transition to next private state specified by provided transition, by transition name or State class name.&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: transition should lead to another private state (i.e. a state with type defined as &#039;private&#039;&lt;br /&gt;
: Note: transition should be defined in private state in which the players currently are. &lt;br /&gt;
: Note: this method can run action or args methods of the target state for specified player&lt;br /&gt;
: Note: this is usually used after some player actions to move to next private state&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actSomeAction() {&lt;br /&gt;
        $this-&amp;gt;checkAction(&amp;quot;actSomeAction&amp;quot;); //needs to be defined in the current state&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForAllPlayers()&lt;br /&gt;
: All players private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used &lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this is usually used to clean up after leaving a master state in which private states were used, but can be used in other cases when we want to exit private parallel states and use a regular multiactive state for all players&lt;br /&gt;
: Note: After unseting private state only actions on master state are possible&lt;br /&gt;
: Note: Usually it is not necessary to unset private states as they will be initialized to first private state when private states are needed again. Nevertheless it is generally better to clean private state after exiting private parallel states to avoid bugs. &lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function stNextRound() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForAllPlayers();&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateStateForPlayers($playerIds, $transition)&lt;br /&gt;
: For players with specified ids private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used.&lt;br /&gt;
: Same considerations apply as for the method above.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;unsetPrivateState($playerId)&lt;br /&gt;
: For player with specified id private state will be reset to null, which means they will get out of private parallel states and be in a master state like the private states are not used &lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this is usually used when deactivating player to clean up their parallel state&lt;br /&gt;
: Note: After unseting private state only actions on master state are possible&lt;br /&gt;
: Note: Usually it is not necessary to unset private state as it will be initialized to first private state when private states are needed again. Nevertheless it is generally better to clean private state when not needed to avoid bugs. &lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function done() {&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;setPlayerNonMultiactive( $this-&amp;gt;getCurrentPlayerId(), &amp;quot;newTurn&amp;quot; );&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;unsetPrivateState($this-&amp;gt;getCurrentPlayerId());&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;setPrivateState($playerId, $newStateId)&lt;br /&gt;
: For player with specified id a new private state would be set&lt;br /&gt;
: Note: game needs to be in a master state which allows private parallel states&lt;br /&gt;
: Note: this should be rarely used as it doesn&#039;t check if the transition is allowed (it doesn&#039;t even specifies transition). This can be useful in very complex cases when standard state machine is not adequate (i.e. specific cards can lead to some micro action in various states where defining transitions back and forth can become very tedious.) NewStateId can also be a state class name.&lt;br /&gt;
: Note: this method can run action or args methods of the target state for specified player&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function actSomeAction() {&lt;br /&gt;
        $this-&amp;gt;checkAction(&amp;quot;actSomeAction&amp;quot;); //needs to be defined in the current state&lt;br /&gt;
&lt;br /&gt;
        if ($playerHaveSpecificCard)&lt;br /&gt;
            return $this-&amp;gt;gamestate-&amp;gt;setPrivateState($this-&amp;gt;getCurrentPlayerId(), 35);&lt;br /&gt;
&lt;br /&gt;
        $this-&amp;gt;gamestate-&amp;gt;nextPrivateState($this-&amp;gt;getCurrentPlayerId(), &amp;quot;some_transition&amp;quot;);        &lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;gamestate-&amp;gt;getPrivateState($playerId) &lt;br /&gt;
: This return the private state or null if not initialized or not in private state&lt;br /&gt;
&lt;br /&gt;
==== State Arguments in Private parallel states ====&lt;br /&gt;
&lt;br /&gt;
The args method called for private states will have the player_id passed to it, allowing you to customise the arguments returned for that player.&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
    &amp;lt;pre&amp;gt;&lt;br /&gt;
    function argMyPrivateState($player_id) {&lt;br /&gt;
        return array(&lt;br /&gt;
          &#039;my_data&#039; =&amp;gt; $this-&amp;gt;getPlayerSpecificData($player_id)&lt;br /&gt;
        );&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inactive Players ====&lt;br /&gt;
&lt;br /&gt;
During Private Parallel State, active players will be managed by the private state that is current assigned to them.&lt;br /&gt;
&lt;br /&gt;
Inactive players will be managed by the master MULTIPLE_ACTIVE_PLAYER state, so your client should respond to that state in order to display any status message advising players that they are waiting for others to have their turn, or to add any buttons that allow players to potentially &amp;quot;break in&amp;quot; and become active.&lt;br /&gt;
&lt;br /&gt;
== Actions (autowired) ==&lt;br /&gt;
The action function should be prefixed by &amp;quot;act&amp;quot; and match the names specified in the &amp;quot;possibleactions&amp;quot; field on the state file.&lt;br /&gt;
&lt;br /&gt;
If your actions start with &amp;quot;act&amp;quot;, they will be autowired, that means you can declare action functions on the game.php file and call them directly from the front (with bgaPerformAction). You don&#039;t need to use action.php file anymore. The query param from the front request will be matched with the PHP variable of the same name, and it needs to be properly typed. This works for basic types: int, bool, float, string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public function actPlayCard(int $cardId) { ... }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This function can be called from front-side with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
this.bgaPerformAction(&#039;actPlayCard&#039;, {&lt;br /&gt;
  cardId: this.selectedCardId // the &amp;quot;cardId&amp;quot; param match the PHP variable name&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note: if you also declare the function in the action.php, it will be used instead of the autowiring)&lt;br /&gt;
&lt;br /&gt;
If you want more complex types like int array or JSON, you&#039;ll need to specify it using the Param attributes. Same if the PHP variable name is different from the front query param, or if you want to specify the tests that should be realized on the parameter before calling the function.&lt;br /&gt;
&lt;br /&gt;
=== Possible attributes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BoolParam(?string $name = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\BoolParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actRaiseBet(#[BoolParam(name: &#039;raise&#039;)] bool $raiseBet)&lt;br /&gt;
&lt;br /&gt;
public function actRaiseBet(#[BoolParam(name: &#039;raise&#039;)] bool $raise) // NOTE: it&#039;s the same as actRaiseBet(bool $raise) if PHP var name and param name are the same&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IntParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\IntParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actPlayCard(#[IntParam(name: &#039;id&#039;)] int $cardId)&lt;br /&gt;
&lt;br /&gt;
public function actSpendGold(#[IntParam(min: 1)] int $gold) // will trigger an exception if param is &amp;lt; 1&lt;br /&gt;
&lt;br /&gt;
public function actPlaceCardOnSpot(int $cardId, #[IntParam(min: 1, max: 5)] int $spot) // will trigger an exception if spot is not in 1 to 5 range&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FloatParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Works the same way as IntParam, import is &amp;lt;code&amp;gt;use \Bga\GameFramework\Actions\Types\FloatParam;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;StringParam(?string $name = null, public ?bool $alphanum = false, public ?bool $alphanum_dash = false, public ?bool $base64 = false, public ?array $enum)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\StringParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actSubmitWord(#[StringParam(alphanum: true)] string $word) // will trigger an exception if the word is not alphanum&lt;br /&gt;
&lt;br /&gt;
public function actChooseAction(#[StringParam(enum: [&#039;move&#039;, &#039;attack&#039;, &#039;pass&#039;])] string $action)  // will trigger an exception if the parameter doesn&#039;t match a value in the enum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: You should do one of the tests of the attribute, or test it yourself on the function, to ensure the user is not sending forbidden characters to the function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IntArrayParam(?string $name = null, public ?int $min = null, public ?int $max = null)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\IntArrayParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actDiscardCards(#[IntArrayParam()] array $ids)&lt;br /&gt;
&lt;br /&gt;
public function actDiscardCards(#[IntArrayParam(min: 2, max: 8)] array $ids)  // will trigger an exception if the array length is not in the 2 to 8 range. It doesn&#039;t check the min/max of the array values!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function can be called from front-side with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const selectedCardIds = [8, 12, 25];&lt;br /&gt;
this.bgaPerformAction(&#039;actDiscardCards&#039;, {&lt;br /&gt;
  ids: selectedCardIds&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;JsonParam(?string $name = null, public ?bool $associative = true, public ?bool $alphanum = true)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\Types\JsonParam;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam()] array $answer) {} // force conversion to array during PHP json decode&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(associative: false)] object $answer) {} // force conversion to object during PHP json decode&lt;br /&gt;
&lt;br /&gt;
public function actPlanComplexStuff(#[JsonParam(associative: null)] mixed $answer) {} // default PHP json decode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 On client side:&lt;br /&gt;
&lt;br /&gt;
      const lala ={a: 2, b: &amp;quot;string&amp;quot;, c: [1,2,4]};&lt;br /&gt;
      this.bgaPerformAction(&amp;quot;actPlanComplexStuff&amp;quot;, {&lt;br /&gt;
        answer: JSON.stringify(lala)&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
=== checkAction ===&lt;br /&gt;
The autowiring also triggers the checkAction, so you don&#039;t have to call it at the beginning of the function. If you need a function that should not trigger checkAction (an action that can be played during someone else turn), you can disable it this way: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use \Bga\GameFramework\Actions\CheckAction;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#[CheckAction(false)]&lt;br /&gt;
public function actSetAutopass(bool $autopass) { ... }&lt;br /&gt;
&lt;br /&gt;
#[CheckAction(false)]&lt;br /&gt;
public function actCancelChooseAction() {&lt;br /&gt;
  $this-&amp;gt;gamestate-&amp;gt;checkPossibleAction(&#039;actCancelChooseAction&#039;);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you disable &amp;lt;code&amp;gt;checkAction&amp;lt;/code&amp;gt;, you probably need to call &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;checkPossibleAction&amp;lt;/code&amp;gt; instead at the beginning of your function. You likely also want to disable client checkAction calls implied by bgaPerformAction.&lt;br /&gt;
&lt;br /&gt;
=== act prefix ===&lt;br /&gt;
The act prefix needed to activate the autowiring is not just to have some consistency in naming, it&#039;s also intended to protect your code. If we let autowired action to any function, a player may do a request to &#039;setPlayerScore&#039; function, even if you never intended for it to be called front side, and it would allow almost undetectable cheating for anyone reading the code of your game.&lt;br /&gt;
&lt;br /&gt;
== Players turn order ==&lt;br /&gt;
&lt;br /&gt;
When table is created the &amp;quot;natural&amp;quot; player order is assigned to player at random, and stored in &amp;quot;read-only&amp;quot; field &amp;quot;player_no&amp;quot;.&lt;br /&gt;
If you need to create a custom order you should never change natural order but have a separate data structure. &lt;br /&gt;
For example you can alter the players table to add another &amp;quot;custom_order&amp;quot; field, you can use state globals or you can use your natural board database, &lt;br /&gt;
to store meeple_color/position_location pair.&lt;br /&gt;
BGA currently does not provide any API to create/store custom player order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getNextPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return an associative array which associate each player with the next player around the table.&lt;br /&gt;
&lt;br /&gt;
In addition, key 0 is associated to the first player to play.&lt;br /&gt;
&lt;br /&gt;
Example: if three player with ID 1000, 2000 and 3000 are around the table, in this order, the method returns:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   array( &lt;br /&gt;
    1000 =&amp;gt; 2000, &lt;br /&gt;
    2000 =&amp;gt; 3000, &lt;br /&gt;
    3000 =&amp;gt; 1000, &lt;br /&gt;
    0 =&amp;gt; 1000 &lt;br /&gt;
   );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPrevPlayerTable()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, but the associative array associate the previous player around the table. However there no 0 index here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerAfter( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing after given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getPlayerBefore( $player_id )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get player playing before given player in natural playing order.&lt;br /&gt;
&lt;br /&gt;
Note: There is no API to modify this order, if you have custom player order you have to maintain it in your database&lt;br /&gt;
and have custom function to access it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;createNextPlayerTable( $players, $bLoop=true )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using $players array creates a map of current =&amp;gt; next as in example from getNextPlayerTable(), however you can use custom order here. &lt;br /&gt;
If parmeter $bLoop is set to true then last player will points to first (creaing a loop), false otherwise.&lt;br /&gt;
In any case index 0 points to first player (first element of $players array). $players is array of player ids in desired order.&lt;br /&gt;
&lt;br /&gt;
Note: This function &#039;&#039;&#039;DOES NOT&#039;&#039;&#039; change the order in database, it only creates a map using key/values as descibed.&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function getNextPlayerTableCustom() {&lt;br /&gt;
        $starting = $this-&amp;gt;getStartingPlayer(); // custom function to get starting player&lt;br /&gt;
        $player_ids = $this-&amp;gt;getPlayerIdsInOrder($starting); // custom function to create players array starting from starting player&lt;br /&gt;
        return $this-&amp;gt;createNextPlayerTable($player_ids, false); // create next player table in custom order&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$table = $this-&amp;gt;createNextPlayerTable([3000,2000,1000], false);&lt;br /&gt;
&lt;br /&gt;
will return:&lt;br /&gt;
   [ &lt;br /&gt;
    3000 =&amp;gt; 2000, &lt;br /&gt;
    2000 =&amp;gt; 1000, &lt;br /&gt;
    1000 =&amp;gt; null,&lt;br /&gt;
    0 =&amp;gt; 3000 &lt;br /&gt;
   ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
&lt;br /&gt;
To understand notifications, please read [http://www.slideshare.net/boardgamearena/the-bga-framework-at-a-glance The BGA Framework at a glance] first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Notifications are crutial part of BGA framework. Everything which players see, including all changes which happen on frontend (including setup), are done via notfications.&lt;br /&gt;
&lt;br /&gt;
Some notifications are built into the framework, and others are custom, game specific notifications. Generally, you should not send or handle framework notifications, except exposed APIs.&lt;br /&gt;
&lt;br /&gt;
Example of framework notifications:&lt;br /&gt;
* game setup (first time client connects to game)&lt;br /&gt;
* game state change&lt;br /&gt;
* active player change&lt;br /&gt;
Example of custom notifications:&lt;br /&gt;
* game piece moved&lt;br /&gt;
* player scored points&lt;br /&gt;
&lt;br /&gt;
Notifications are queued, i.e. sent at the very end of the action, when it ends normally. It means that if you throw an exception for any reason (i.e: move is not allowed), no notifications will be sent to players.&lt;br /&gt;
&lt;br /&gt;
Notification can be sent from the following functions (and transive calls):&lt;br /&gt;
&lt;br /&gt;
* action handler (act* in State classes or Game.php). It is a MUST actually. At least one notification must be sent (but it includes state transition which sends it)&lt;br /&gt;
* game state transition (onEnteringState in State classes)&lt;br /&gt;
* setupNewGame (after player tables setup is finished)&lt;br /&gt;
&lt;br /&gt;
Notification cannot be sent from the following:&lt;br /&gt;
* .view.php&lt;br /&gt;
* .action.php&lt;br /&gt;
* material.inc.php&lt;br /&gt;
* constructor of .game.php&lt;br /&gt;
* arg* methods of .game.php&lt;br /&gt;
&lt;br /&gt;
There are conceptually two types of notification:&lt;br /&gt;
* public - sent to all clients who are listening - that includes all players in the table as well as spectators&lt;br /&gt;
* private - sent only to a single player&lt;br /&gt;
&lt;br /&gt;
The bundle of notifications sent at the end of an action is considered a single &amp;quot;move&amp;quot; and the table&#039;s move counter increases.&lt;br /&gt;
If you are ONLY sending private notifications during action handling, they will not have an associated &amp;lt;code&amp;gt;move_id&amp;lt;/code&amp;gt; (to avoid this, add simple public notification with empty message). &lt;br /&gt;
In the rare case that you want to change this behavior, you can apply some hackery described in [[BGA_Studio_Cookbook]]&lt;br /&gt;
&lt;br /&gt;
Note: the total notification size is now limited to 128K. It seems a lot, but don&#039;t forget that notification are bundled and only send at the end of an action which also INCLUDES all game state transitions that follow.&lt;br /&gt;
&lt;br /&gt;
The notifications are handled on JS side by subscribing to notifications (only do it for custom notifications!). See [Game_interface_logic:_yourgamename.js#Notifications]&lt;br /&gt;
&lt;br /&gt;
Do not put HTML in the notifications. If you want to have pretty pictures in the log check this [[BGA_Studio_Cookbook#Inject_images_and_styled_html_in_the_log]].&lt;br /&gt;
&lt;br /&gt;
=== Notify ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;all(string $notification_type,string | NotificationMessage $message,array $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Send a notification to all players of the game and spectators (public).&lt;br /&gt;
&lt;br /&gt;
* notification_type: A string that defines the type of your notification.&lt;br /&gt;
&lt;br /&gt;
Your game interface Javascript logic will use this to know what is the type of the received notification (and to trigger the corresponding method).&lt;br /&gt;
&lt;br /&gt;
* message: A string that defines what is to be displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
You can use an empty string here (&#039;&#039;). In this case, nothing is displayed in the game log.&lt;br /&gt;
&lt;br /&gt;
Unless its empty, use &amp;quot;\clienttranslate&amp;quot; method to make sure string is translated.&lt;br /&gt;
&lt;br /&gt;
You can use arguments in your $notification_log string, that refers to values defines in the &amp;quot;$notification_args&amp;quot; argument (see below). &lt;br /&gt;
Note: Make sure you only use single quotes (&#039;), otherwise PHP will try to interpolate the variable and will ignore the values in the args array.&lt;br /&gt;
&lt;br /&gt;
* notification_args: The arguments of your notifications, as an associative array.&lt;br /&gt;
&lt;br /&gt;
This array will be transmitted to the game interface logic, in order the game interface can be updated.&lt;br /&gt;
&lt;br /&gt;
Complete notify all example (from &amp;quot;Reversi&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all( &amp;quot;playDisc&amp;quot;, clienttranslate( &#039;${player_name} plays a disc and turns over ${returned_nbr} disc(s)&#039; ),&lt;br /&gt;
 array(&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id),&lt;br /&gt;
        &#039;returned_nbr&#039; =&amp;gt; count( $turnedOverDiscs ),&lt;br /&gt;
        &#039;x&#039; =&amp;gt; $x,&lt;br /&gt;
        &#039;y&#039; =&amp;gt; $y&lt;br /&gt;
     ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see in the example above the use of the &amp;quot;\clienttranslate&amp;quot; method, and the use of 2 arguments &amp;quot;player_name&amp;quot; and &amp;quot;returned_nbr&amp;quot; in the notification log.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: NO private data must be sent with this method, as a cheater could see it even if it is not used explicitly by the game interface logic. If you want to send private information to a player, please use notify-&amp;gt;player below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: this array is serialized to be sent to the browsers, and will be saved with the notification to be able to replay the game later. If it is too big, it can make notifications slower / less reliable, and replay archives very big (to the point of failing). So as a general rule, you should send only the minimum of information necessary to update the client interface with no overhead in order to keep the notifications as light as possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: When the game page is reloaded (i.e. F5 or when loading turn based game) all previous notifications are replayed as history notifications. These notifications do not trigger notification handlers and are used basically to build the game log. Because of that most of the notification arguments (except i18n, player_id and all arguments referenced in the message), are removed from these history notifications. If you need additional arguments in history notifications you can add special field &amp;lt;b&amp;gt;preserve&amp;lt;/b&amp;gt; to notification arguments, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all( &amp;quot;playDisc&amp;quot;, clienttranslate( &#039;${player_name} plays a disc and turns over ${returned_nbr} disc(s)&#039; ),&lt;br /&gt;
 array(&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id),&lt;br /&gt;
        &#039;returned_nbr&#039; =&amp;gt; count( $turnedOverDiscs ),&lt;br /&gt;
        &#039;x&#039; =&amp;gt; $x,&lt;br /&gt;
        &#039;y&#039; =&amp;gt; $y,&lt;br /&gt;
        &#039;preserve&#039; =&amp;gt; [ &#039;x&#039;, &#039;y&#039; ]&lt;br /&gt;
     ) );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, fields x and y will be preserved when replaying history notification at the game load.&lt;br /&gt;
&lt;br /&gt;
NOTE: The ONLY reason &#039;preserve&#039; is useful if you have custom method to render notifications in game log which changes some text arguments into html (i.e. to insert the images instead of plain text). Do not use preserve &amp;quot;just in case&amp;quot; - it will only bloat the logs and make game load VERY slow.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: If both public and private notifications are sent to the same player in the same action (AJAX call), they will initially appear in the log in the order in which they were called, but they are placed into the game log in the following order: All private notifications first, then all public notifications. This means that when the page is refreshed, or when a player loads an asynchronous game, if you have called any public notifications &#039;&#039;before&#039;&#039; the last private notification, they will appear out of order in the log.&lt;br /&gt;
&lt;br /&gt;
==== Recursive Notifications ====&lt;br /&gt;
&lt;br /&gt;
If your notification contains some phrases that build programmatically you may need to use recursive notifications. In this case the argument can be not only the string but&lt;br /&gt;
an array itself, which contains &#039;log&#039; and &#039;args&#039;, i.e.&lt;br /&gt;
&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;message&#039;, clienttranslate(&#039;Game moves ${token_name_rec}&#039;),&lt;br /&gt;
                   [&#039;token_name_rec&#039; =&amp;gt; [&#039;log&#039; =&amp;gt; &#039;${token_name} #${token_number}&#039;,&lt;br /&gt;
                                       &#039;args&#039;=&amp;gt; [&#039;token_name&#039; =&amp;gt; \clienttranslate(&#039;Boo&#039;), &#039;token_number&#039; =&amp;gt; $number, &#039;i18n&#039; =&amp;gt; [&#039;token_name&#039;] ]&lt;br /&gt;
                                      ]&lt;br /&gt;
                   ]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Sending private data to some players ====&lt;br /&gt;
&lt;br /&gt;
Sometimes you want to notify all players of a message but not have it appear in the log of specific players (for example, have every player see &amp;quot;Player X draws a card&amp;quot; but have Player X will get a private notification &amp;quot;You draw the Ace of Spades&amp;quot;, so you want them to see a different message and get some private data.&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; arg to send private data to designated players, in a similar fashion of the onEnteringState &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; flag. &amp;lt;code&amp;gt;_private&amp;lt;/code&amp;gt; is an array that have the player id to send private information to, and the value if the different notification using NotificationMessage to send both the replacing log and the args that will be accessible on front side in args._private.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        use Bga\GameFramework\NotificationMessage;&lt;br /&gt;
&lt;br /&gt;
        (...)&lt;br /&gt;
&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;cardPicked&#039;, clienttranslate(&#039;${player_name} takes a secret card from the deck&#039;), [&lt;br /&gt;
            &#039;playerId&#039; =&amp;gt; $playerId,&lt;br /&gt;
            &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($playerId),&lt;br /&gt;
            &#039;_private&#039; =&amp;gt; [&lt;br /&gt;
                $playerId =&amp;gt; new NotificationMessage(clienttranslate(&#039;You take ${_private.card_name} from the deck&#039;), [&lt;br /&gt;
                    &#039;card&#039; =&amp;gt; $card,&lt;br /&gt;
                    &#039;card_name&#039; =&amp;gt; $this-&amp;gt;getCardName($card),&lt;br /&gt;
                    &#039;i18n&#039; =&amp;gt; [&#039;card_name&#039;]&lt;br /&gt;
                ]),&lt;br /&gt;
            ],&lt;br /&gt;
        ]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the message uses &amp;lt;code&amp;gt;${_private.card_name}&amp;lt;/code&amp;gt; to access the data in the private args.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t need to change the log, but only send private args, you can send an array of args instead of the NotificationMessage object.&lt;br /&gt;
&lt;br /&gt;
==== Using player names  ====&lt;br /&gt;
&lt;br /&gt;
The variable for player name must be ${player_name} in order to be highlighted with the player color in the game log, it has to have matching &#039;player_id&#039; argument in $notification_args. If you want a second player name in the log, name the variable ${player_name2} and $player_id2, etc.  For the multiple player case, usage of player_id and player_name is not mandatory i.e. skipping to player_id1 and player_name1 is fine.&lt;br /&gt;
&lt;br /&gt;
Special handling of arguments:&lt;br /&gt;
* ${player_name}  - this will be wrapped in html and text shown using color of the corresponding player, some colors also have reserved background. This will apply recursively as well.&lt;br /&gt;
* ${player_name1}, ${player_name2}, ${player_name3}, etc. work the same as above&lt;br /&gt;
In order for this to work you must pass corresponding player_idX AND player_nameX in args i.e.&lt;br /&gt;
&lt;br /&gt;
    $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&lt;br /&gt;
      &#039;buyAndPassCard&#039;,&lt;br /&gt;
      clienttranslate(&#039;${player_name} buys ${card_name} and passes it to ${player_name2}&#039;),&lt;br /&gt;
      [&lt;br /&gt;
        &#039;player_id&#039; =&amp;gt; $player1[&#039;id&#039;],&lt;br /&gt;
        &#039;player_name&#039; =&amp;gt; $player1[&#039;name&#039;],&lt;br /&gt;
        &#039;player_id2&#039; =&amp;gt; $player2[&#039;id&#039;],&lt;br /&gt;
        &#039;player_name2&#039; =&amp;gt; $player2[&#039;name&#039;],&lt;br /&gt;
        ...&lt;br /&gt;
      ]&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
Note: player_name is not translatable, never add it to i18n array&lt;br /&gt;
&lt;br /&gt;
=== NotifyPlayer ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;player(int $player_id, string $notification_type, string | NotificationMessage $message, $notification_args )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as above, except that the notification is sent to one player only. The player must be the player at the game table.&lt;br /&gt;
&lt;br /&gt;
This method should be used only if you send some private information to a player, NOT wanting to send a public notification at the same time for the same reason. See paragraph &#039;&#039;&#039;Sending private data to some players&#039;&#039;&#039; that should cover most of your need to send a private notif.&lt;br /&gt;
&lt;br /&gt;
Important: the variable for player name must be ${player_name} in order to be highlighted with the player color in the game log. Since its a private notification it may be more appropriate to use &amp;quot;you&amp;quot; insted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;player($player_id,&#039;message&#039;, clienttranslate(&#039;You draw ${card_name}&#039;), [ ... ]);&lt;br /&gt;
or&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;player($player_id,&#039;message&#039;, clienttranslate(&#039;${player_name} draws ${card_name}&#039;), [ &#039;player_name&#039; =&amp;gt; $this-&amp;gt;getPlayerNameById($player_id), ... ]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Spectators cannot be notified using this method, because their player ID is not available via loadPlayersBasicInfos() or otherwise. You must use notify-&amp;gt;all() for any notification that spectators should get.&lt;br /&gt;
&lt;br /&gt;
=== Notification decorators ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;notify-&amp;gt;addDecorator(callable $fn)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add a decorator function that will be called on notification args before each call of notify-&amp;gt;all and notify-&amp;gt;player. &#039;&#039;Note: it won&#039;t work with deprecated functions notifyAllPlayers and notifyPlayer.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To avoid duplicating the code in your notification args, you can register decorators in your Game __construct function.&lt;br /&gt;
 // in construct :&lt;br /&gt;
 $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator(fn(string $message, array $args) =&amp;gt; $this-&amp;gt;decoratePlayerNameNotifArg($message, $args));&lt;br /&gt;
 // could also be written this (ugly) way : $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator([$this, &#039;decoratePlayerNameNotifArg&#039;]);&lt;br /&gt;
 &lt;br /&gt;
 // with the Utils functions&lt;br /&gt;
 public function decoratePlayerNameNotifArg(string $message, array $args): array {&lt;br /&gt;
     // if the notif message contains ${player_name} but it isn&#039;t set in the args, add it on args from $args[&#039;player_id&#039;]&lt;br /&gt;
     if (isset($args[&#039;player_id&#039;]) &amp;amp;&amp;amp; !isset($args[&#039;player_name&#039;]) &amp;amp;&amp;amp; str_contains($message, &#039;${player_name}&#039;)) {&lt;br /&gt;
         $args[&#039;player_name&#039;] = $this-&amp;gt;getPlayerNameById($args[&#039;player_id&#039;]);&lt;br /&gt;
     }&lt;br /&gt;
     return $args;&lt;br /&gt;
 }&lt;br /&gt;
With this example, you can call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&amp;quot;pass&amp;quot;, clienttranslate(&#039;${player_name} passes&#039;), [ &amp;quot;player_id&amp;quot; =&amp;gt; $player_id ]);&amp;lt;/code&amp;gt; and the front will receive the player_name arg along the player_id one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also declare it as an inline function :&lt;br /&gt;
 // in construct :&lt;br /&gt;
 this-&amp;gt;bga-&amp;gt;notify-&amp;gt;addDecorator(function(string $message, array $args) {&lt;br /&gt;
     // if the notif message contains ${card_name} but it isn&#039;t set in the args, add it on args from $args[&#039;card&#039;]&lt;br /&gt;
     // also set it up for translations by adding it to the i18n array&lt;br /&gt;
     if (isset($args[&#039;card&#039;]) &amp;amp;&amp;amp; !isset($args[&#039;card_name&#039;]) &amp;amp;&amp;amp; str_contains($message, &#039;${card_name}&#039;)) {&lt;br /&gt;
         $args[&#039;card_name&#039;] = $args[&#039;card&#039;]-&amp;gt;name;&lt;br /&gt;
         $args[&#039;i18n&#039;][] = [&#039;card_name&#039;];&lt;br /&gt;
     }&lt;br /&gt;
     return $args;&lt;br /&gt;
 });&lt;br /&gt;
With this example, you can call &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&amp;quot;playCard&amp;quot;, clienttranslate(&#039;${player_name} plays ${card_name}&#039;), [ &amp;quot;player_id&amp;quot; =&amp;gt; $player_id, card =&amp;gt; $card ]);&amp;lt;/code&amp;gt; and the front will receive the card_name arg with the flag to translate it.&lt;br /&gt;
&lt;br /&gt;
== Randomization ==&lt;br /&gt;
&lt;br /&gt;
A large number of board games rely on random, most often based on dice, cards shuffling, picking some item in a bag, and so on. This is very important to ensure a high level of randomness for each of these situations.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s are a list of techniques you should use in these situations, from the best to the worst.&lt;br /&gt;
&lt;br /&gt;
=== Dice and bga_rand ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;\bga_rand( min, max )&#039;&#039;&#039; &lt;br /&gt;
This is a BGA framework function that provides you a random number between &amp;quot;min&amp;quot; and &amp;quot;max&amp;quot; (inclusive), using the best available random method available on the system.&lt;br /&gt;
&lt;br /&gt;
This is the preferred function you should use, because we are updating it when a better method is introduced.&lt;br /&gt;
&lt;br /&gt;
As of now, bga_rand is based on the PHP function &amp;quot;random_int&amp;quot;, which ensures a cryptographic level of randomness.&lt;br /&gt;
&lt;br /&gt;
In particular, it is &#039;&#039;&#039;mandatory&#039;&#039;&#039; to use it for all &#039;&#039;&#039;dice throw&#039;&#039;&#039; (ie: games using other methods for dice throwing will be rejected by BGA during review).&lt;br /&gt;
&lt;br /&gt;
Note: rand() and mt_rand() are deprecated on BGA and should not be used anymore, as their randomness is not as good as &amp;quot;bga_rand&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Arrays ===&lt;br /&gt;
&lt;br /&gt;
PHP&#039;s [https://www.php.net/array_rand array_rand()] and [https://www.php.net/shuffle shuffle()] functions are not cryptographically secure. Instead, the following code based on PHP&#039;s [https://www.php.net/random_int random_int()] provides a better method to choose a random key, value, or slice of an array. (the slice preserves keys)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    private function getRandomKey(array $array)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomKey(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $rand = random_int(0, $size - 1);&lt;br /&gt;
        $slice = array_slice($array, $rand, 1, true);&lt;br /&gt;
        foreach ($slice as $key =&amp;gt; $value) {&lt;br /&gt;
            return $key;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private function getRandomValue(array $array)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomValue(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $rand = random_int(0, $size - 1);&lt;br /&gt;
        $slice = array_slice($array, $rand, 1, true);&lt;br /&gt;
        foreach ($slice as $key =&amp;gt; $value) {&lt;br /&gt;
            return $value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private function getRandomSlice(array $array, int $count)&lt;br /&gt;
    {&lt;br /&gt;
        $size = count($array);&lt;br /&gt;
        if ($size == 0) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomSlice(): Array is empty&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        if ($count &amp;lt; 1 || $count &amp;gt; $size) {&lt;br /&gt;
            trigger_error(&amp;quot;getRandomSlice(): Invalid count $count for array with size $size&amp;quot;, E_USER_WARNING);&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        $slice = [];&lt;br /&gt;
        $randUnique = [];&lt;br /&gt;
        while (count($randUnique) &amp;lt; $count) {&lt;br /&gt;
            $rand = random_int(0, $size - 1);&lt;br /&gt;
            if (array_key_exists($rand, $randUnique)) {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
            $randUnique[$rand] = true;&lt;br /&gt;
            $slice += array_slice($array, $rand, 1, true);&lt;br /&gt;
        }&lt;br /&gt;
        return $slice;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== shuffle and cards shuffling ===&lt;br /&gt;
&lt;br /&gt;
To shuffle items, like a pile of cards, the best way is to use the BGA PHP [[Deck]] component and to use &amp;quot;shuffle&amp;quot; method. This ensures that the best available shuffling method is used, and that if in the future we improve it your game will be up to date.&lt;br /&gt;
&lt;br /&gt;
As of now, the Deck component shuffle method is based on PHP &amp;quot;shuffle&amp;quot; method, which has quite good randomness (even if not as good as bga_rand). In consequence, we accept other shuffling methods during reviews, as long as they are based on PHP &amp;quot;shuffle&amp;quot; function (or similar, like &amp;quot;array_rand&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Other methods ===&lt;br /&gt;
&lt;br /&gt;
Mysql &amp;quot;RAND()&amp;quot; function has not enough randomness to be a valid method to get a random element on BGA. This function has been used in some existing games and has given acceptable results, but now it should be avoided and you should use other methods instead.&lt;br /&gt;
&lt;br /&gt;
== Game statistics ==&lt;br /&gt;
&lt;br /&gt;
There are 2 types of statistics:&lt;br /&gt;
* a &amp;quot;player&amp;quot; statistic is a statistic associated to a player&lt;br /&gt;
* a &amp;quot;table&amp;quot; statistic is a statistic not associated to a player (global statistic for this game).&lt;br /&gt;
&lt;br /&gt;
See [[Game statistics: stats.json]] to see how you define statistics for your game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;init(string|array $nameOrNames, int|float|bool $value)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;init(string|array $nameOrNames, int|float|bool $value, bool $updateTableStat = false)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : initStat( $table_or_player, $name, $value)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a statistic entry with a default value.&lt;br /&gt;
&lt;br /&gt;
This method must be called for each statistic of your game, in your setupNewGame method.&lt;br /&gt;
If you neglect to call this for a statistic, and also do not update the value during the course of a certain game using xxxStats-&amp;gt;set or xxxStats-&amp;gt;inc, the value of the stat will be undefined rather than 0. This will result in it being ignored at the end of the game, as if it didn&#039;t apply to that particular game, and excluded from cumulative statistics. As a consequence - if do not want statistic to be applied, do not init it, or call set or inc on it.&lt;br /&gt;
&lt;br /&gt;
&#039;$nameOrNames&#039; is the name of your statistic, as it has been defined in your stats.inc.php file, or an array of those names.&lt;br /&gt;
&lt;br /&gt;
&#039;$value&#039; is the initial value of the statistic.&lt;br /&gt;
&lt;br /&gt;
&#039;updateTableStat&#039; for playerStats initiates the tableStats of the same name, so if you store for example &#039;playedTurns&#039; in both &#039;table&#039; and &#039;player&#039; call only &amp;lt;code&amp;gt;bga-&amp;gt;playerStats-&amp;gt;init(&#039;playedTurns&#039;, 0, true)&amp;lt;/code&amp;gt; and it will init for both &#039;table&#039; and &#039;player&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;set(string $name, int|float|bool $value)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;set(string $name, int|float|bool $value, int $player_id)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;setAll(string $name, int|float|bool $value)&#039;&#039;&#039; (same as set, but for all players at once)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : setStat( $value, $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set a statistic $name to $value.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;inc(string $name, int|float $delta)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;inc(string $name, int|float $delta, int $player_id, bool $updateTableStat = false)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;incAll(string $name, int|float $delta)&#039;&#039;&#039; (same as inc, but for all players at once)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : incStat( $delta, $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Increment (or decrement) specified statistic value by $delta value. Same behavior as setStat function, except you cannot increment boolean values. &#039;updateTableStat&#039; will also inc the tableStats of the same name.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;tableStats-&amp;gt;get(string $name): int|float|bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;get(string $name, int $player_id): int|float|bool&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;previously : getStat( $name, $player_id = null )&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Return the value of statistic specified by $name. Useful when creating derivative statistics such as average.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bga-&amp;gt;playerStats-&amp;gt;getAll(string $name): array&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Returns the values for all players, as an associative array $player_id =&amp;gt; $value&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
See [[Translations]]&lt;br /&gt;
&lt;br /&gt;
== Manage player scores and Tie breaker ==&lt;br /&gt;
&lt;br /&gt;
=== Normal scoring ===&lt;br /&gt;
&lt;br /&gt;
At the end of the game, players automatically get a rank depending on their score: the player with the biggest score is #1, the player with the second biggest score is #2, and so on...&lt;br /&gt;
&lt;br /&gt;
During the game, you update player&#039;s score using $this-&amp;gt;bga-&amp;gt;playerScore. bga-&amp;gt;playerScore is a [[PlayerCounter and TableCounter|PlayerCounter]], so it has the same methods.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  // +2 points to active player&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;inc($activePlayerId, 2);&lt;br /&gt;
&lt;br /&gt;
  // Set score of active player to 5&lt;br /&gt;
  $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;set($activePlayerId, 5);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tie breaker ===&lt;br /&gt;
&lt;br /&gt;
Tie breaker is used when two players get the same score at the end of a game.&lt;br /&gt;
&lt;br /&gt;
Tie breaker is using $this-&amp;gt;bga-&amp;gt;playerScoreAux. It is updated exactly like $this-&amp;gt;bga-&amp;gt;playerScore. bga-&amp;gt;playerScoreAux is a [[PlayerCounter and TableCounter|PlayerCounter]], so it has the same methods.&lt;br /&gt;
&lt;br /&gt;
Tie breaker score is displayed only for players who are tied at the end of the game. Most of the time, it is not supposed to be displayed explicitly during the game.&lt;br /&gt;
&lt;br /&gt;
When you are using &amp;quot;playerScoreAux&amp;quot; functionality, you must describe the formula to use in your gameinfos.inc.php file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         &#039;tie_breaker_description&#039; =&amp;gt; totranslate(&amp;quot;Describe here your tie breaker formula&amp;quot;),&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This description will be used as a tooltip to explain to players how this auxiliary score has been calculated.&lt;br /&gt;
&lt;br /&gt;
Note: if you need to need you score_aux to be reverse (lowest value wins), please contact Studio support to get a solution.&lt;br /&gt;
&lt;br /&gt;
See also [https://en.doc.boardgamearena.com/Game_meta-information:_gameinfos.inc.php#Multiple_tie_breaker_management Multiple Tie Breaker Management].&lt;br /&gt;
&lt;br /&gt;
=== Reverse scoring and reverse tie-breaker ===&lt;br /&gt;
&lt;br /&gt;
If your game has a reverse scoring (lowest value wins) or reverse tie-breaker (lowest tie-breaker wins), you need to set-up a GameResult object to tell BGA this specificity.&lt;br /&gt;
&lt;br /&gt;
On your last state (usually EndScore.php), instead of returning 99 to go the end game, return a GameResult. returning a GameResult object in a State class will then go the end game.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use Bga\GameFramework\GameResult\GameResult;&lt;br /&gt;
use Bga\GameFramework\GameResult\Player;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
    public function onEnteringState() {&lt;br /&gt;
        ...&lt;br /&gt;
&lt;br /&gt;
        $playersDb = $this-&amp;gt;game-&amp;gt;getCollectionFromDb(&amp;quot;SELECT * FROM `player`&amp;quot;);&lt;br /&gt;
        $players = Player::fromPlayersDb($playersDb);&lt;br /&gt;
        return GameResult::individualRanking($players, reverseScore: true);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For reverse tie-breaker, it will be `reverseScoreAux: true`.&lt;br /&gt;
&lt;br /&gt;
If your game has running tables with negative scores to handle reverse scoring and you want to use the reverse scoring, add this just before the return line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        if ($this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;getMin() &amp;lt; 0) {&lt;br /&gt;
            foreach ($players as &amp;amp;$player) {&lt;br /&gt;
                $player-&amp;gt;score = -$player-&amp;gt;score;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So game started before the change will reverse the score (negative to positive) before creating the GameResult object.&lt;br /&gt;
And anywhere you change the score, you must continue the way it was started :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $addedPoints = 3;&lt;br /&gt;
        if ($this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;getMin() &amp;lt; 0) {&lt;br /&gt;
            $addedPoints = -$addedPoints;&lt;br /&gt;
        }&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;playerScore-&amp;gt;inc($playerId, $addedPoints);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If there are negative score, the game will continue with negative scores, else it will continue with positive scores.&lt;br /&gt;
&lt;br /&gt;
=== Result neutralization ===&lt;br /&gt;
&lt;br /&gt;
when a player quits a running table, the results of the game will be neutralized (everyone has score set to 1, except the first quitter that will be at 0 and will be ranked last in addition to reputation drop). We cannot keep the ranking among the remaining players, as the quitter being replaced by a zombie might unbalance the rest of the game interaction, for example the player playing just after can get advantages with the situation.&lt;br /&gt;
&lt;br /&gt;
For some games where there is almost no interaction between player, like some roll &amp;amp; write games, there is no real reason to neutralize the game results when a player quits. In that case, you can ask the Studio Support to activate the &amp;quot;Keep ranking on player quit&amp;quot; flag for your game. The zombie mode must be fully functional to allow the game to continue with leavers. Note that the BGA team might refuse to activate it, if it is considered the zombie player will unbalance the results of the remaining players.&lt;br /&gt;
&lt;br /&gt;
When this flag is activated, a player quitting a game will still be penalized, but the ranking you set at the end of the game will stay, and the eliminated player(s) will have their score set to -1. It also means if a second player quits the game, he will also be penalized, because he has no reason to quit and can continue the game. If the game ends with 2 remaining players, it&#039;s now possible for one of them to concede.&lt;br /&gt;
&lt;br /&gt;
To request this mode, click on &amp;quot;Contact us / Support&amp;quot; at the bottom of the page in Studio and then work through to a &amp;quot;My problem has not been solved&amp;quot; and then enter your request. The flag can be set independently in Studio and Production, so make sure to request it for both (unless you just want to experiment in Studio).&lt;br /&gt;
&lt;br /&gt;
Note: the flag will fully work for games started AFTER activation. It may display incorrect messages for games started before the activation but players left after. For this reason, it&#039;s best to request it when going to alpha, else accept some strange bug reports about this situation, that will solve itself when all existing tables are started after the activation.&lt;br /&gt;
&lt;br /&gt;
=== Co-operative game ===&lt;br /&gt;
&lt;br /&gt;
To make everyone win/lose together in a full-coop game:&lt;br /&gt;
&lt;br /&gt;
Add the following in gameinfos.inc.php :&lt;br /&gt;
&#039;is_coop&#039; =&amp;gt; 1, // full cooperative&lt;br /&gt;
&lt;br /&gt;
Assign a score of zero to everyone if it&#039;s a loss.&lt;br /&gt;
Assign the same score &amp;gt; 0 to everyone if it&#039;s a win.&lt;br /&gt;
&lt;br /&gt;
=== Semi-coop ===&lt;br /&gt;
&lt;br /&gt;
If the game is not full-coop, then everyone loses = everyone is tied. I.e. set score to 0 to everybody.&lt;br /&gt;
&lt;br /&gt;
=== Only &amp;quot;winners&amp;quot; and &amp;quot;losers&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
For some games, there is only a group (or a single) &amp;quot;winner&amp;quot;, and everyone else is a &amp;quot;loser&amp;quot;, with no &amp;quot;end of game rank&amp;quot; (1st, 2nd, 3rd...).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* Coup&lt;br /&gt;
* Not Alone&lt;br /&gt;
* Werewolves&lt;br /&gt;
* Quantum&lt;br /&gt;
&lt;br /&gt;
In this case:&lt;br /&gt;
* Set the scores so that the winner has the best score, and the other players have the same (lower) score.&lt;br /&gt;
* Add the following lines to gameinfos.inc.php:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// If in the game, all losers are equal (no score to rank them or explicit in the rules that losers are not ranked between them), set this to true &lt;br /&gt;
// The game end result will display &amp;quot;Winner&amp;quot; for the 1st player and &amp;quot;Loser&amp;quot; for all other players&lt;br /&gt;
&#039;losers_not_ranked&#039; =&amp;gt; true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Werewolves and Coup are implemented like this, as you can see here:&lt;br /&gt;
* https://boardgamearena.com/#!gamepanel?game=werewolves&amp;amp;section=lastresults&lt;br /&gt;
* https://boardgamearena.com/#!gamepanel?game=coupcitystate&amp;amp;section=lastresults&lt;br /&gt;
&lt;br /&gt;
Adding this has the following effects:&lt;br /&gt;
* On game results for this game, &amp;quot;Winner&amp;quot; or &amp;quot;Loser&amp;quot; is going to appear instead of the usual &amp;quot;1st, 2nd, 3rd, ...&amp;quot;.&lt;br /&gt;
* When a game is over, the result of the game will be &amp;quot;End of game: Victory&amp;quot; or &amp;quot;End of game: Defeat&amp;quot; depending on the result of the CURRENT player (instead of the usual &amp;quot;Victory of XXX&amp;quot;).&lt;br /&gt;
* When calculating ELO points, if there is at least one &amp;quot;Loser&amp;quot;, no &amp;quot;victorious&amp;quot; player can lose ELO points, and no &amp;quot;losing&amp;quot; player can win ELO point. Usually it may happened because being tie with many players with a low rank is considered as a tie and may cost you points. If losers_not_ranked is set, we prevent this behavior and make sure you only gain/loss ELO when you get the corresponding results.&lt;br /&gt;
&lt;br /&gt;
Important: this SHOULD NOT be used for cooperative games (see is_coop parameter), or for 2 players games (it makes no sense in this case).&lt;br /&gt;
&lt;br /&gt;
=== Solo ===&lt;br /&gt;
&lt;br /&gt;
If game supports solo variant, a negative or zero score means defeat, a positive score means victory.&lt;br /&gt;
&lt;br /&gt;
=== Player elimination ===&lt;br /&gt;
&lt;br /&gt;
In some games, this is useful to eliminate a player from the game in order he/she can start another game without waiting for the current game end.&lt;br /&gt;
&lt;br /&gt;
This case should be rare. Please don&#039;t use player elimination feature if some player just has to wait the last 10% of the game for game end. This feature should be used only in games where players are eliminated all along the game (typical examples: &amp;quot;Perudo&amp;quot; or &amp;quot;The Werewolves of Miller&#039;s Hollow&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
* In your PHP code:&lt;br /&gt;
  $this-&amp;gt;eliminatePlayer( &amp;lt;player_to_eliminate_id&amp;gt; );&lt;br /&gt;
* Player to eliminate should NOT be active anymore at the end of the action that triggers the eliminatePlayer function.&lt;br /&gt;
* the player is informed in a dialog box that he no longer have to play and can start another game if he/she wants too (with buttons &amp;quot;stay at this table&amp;quot; &amp;quot;quit table and back to main site&amp;quot;). In any case, the player is free to start &amp;amp; join another table from now.&lt;br /&gt;
* When your game is over, all players who have been eliminated before receive a &amp;quot;notification&amp;quot; (the small &amp;quot;!&amp;quot; icon on the top right of the BGA interface) that indicate them that &amp;quot;the game has ended&amp;quot; and invite them to review the game results.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; this should not be used on a player who has already left the game (&amp;quot;zombie&amp;quot;) as leaving/being kicked of the game (outside of the scope of the rules) is not the same as being eliminated from the game (according to the rules), except if in the course of the game, the zombie player is eliminated according to the rules.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; If you eliminate the last player, make sure the action will end by going to the end game state. If it doesn&#039;t, BGA will jump straight to it, without calling your end score state or anything similar.&lt;br /&gt;
&lt;br /&gt;
=== Player concede ===&lt;br /&gt;
&lt;br /&gt;
It should be rarely needed, but if you absolutely need to run some code when a player concedes, you can create a function called onConcede in the Game class like this :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function onConcede() {&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;test&#039;, &#039;Something to do when the player concedes&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to get the conceder id:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    function onConcede($concederTeam) {&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all(&#039;test&#039;, &#039;Something to do when the player concedes &#039;.$concederTeam-&amp;gt;players[0]-&amp;gt;id);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Never change state on this function. It should be limited to computing stats or similar small stuff.&lt;br /&gt;
&lt;br /&gt;
To not break the game end, any exception triggered by this function will be catched and simply logged, so make sure your code stay simple and never trigger an exception and it will be hard to detect!&lt;br /&gt;
&lt;br /&gt;
== Reflexion time ==&lt;br /&gt;
&lt;br /&gt;
; function giveExtraTime( $player_id, $specific_time=null )&lt;br /&gt;
: Give standard extra time to this player in real time game. It does not affect turn based games.&lt;br /&gt;
: Standard extra time (when you don&#039;t pass $specific_time) depends on the speed of the game (small with &amp;quot;slow&amp;quot; game option, bigger with other options).&lt;br /&gt;
: You can also specify an exact time to add, in seconds, with the &amp;quot;specific_time&amp;quot; argument (rarely used). Using $specific_time is not recommended as this does not adjust for the game speed.&lt;br /&gt;
: Important Note: the total reflection time cannot be more than time allowed for the turn. So you can never make it 10 minutes if turn max is 3 min (the max is determined by game speed). As a consequence there is no point adding this at the begging of the turn of in game setup, it only matters after the action which does not lead to turn end (which is when this player becomes inactive).&lt;br /&gt;
: Note: standard extra time is automatically doubled for begginer &lt;br /&gt;
&lt;br /&gt;
    function actionBla($args) {&lt;br /&gt;
        $this-&amp;gt;checkAction(&#039;actionBla&#039;);&lt;br /&gt;
        $playerId = (int)$this-&amp;gt;getActivePlayerId();&lt;br /&gt;
        $this-&amp;gt;giveExtraTime($player_id);&lt;br /&gt;
        // do some inter-turn action&lt;br /&gt;
        $this-&amp;gt;notifyAll(...);&lt;br /&gt;
        // no state transition as this player did an action but stayed active&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;tableOptions-&amp;gt;isTurnBased(): bool&#039;&#039;&#039;&lt;br /&gt;
: Returns true if game is turn based&lt;br /&gt;
:&lt;br /&gt;
; &#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;tableOptions-&amp;gt;isRealTime(): bool&#039;&#039;&#039;&lt;br /&gt;
: Returns true if game is in real time&lt;br /&gt;
&lt;br /&gt;
== Undo moves ==&lt;br /&gt;
&lt;br /&gt;
Please read our [[BGA Undo policy]] before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Before using these methods, you must also add the following to your &amp;quot;gameinfos.inc.php&amp;quot; file, otherwise these methods are ineffective:&lt;br /&gt;
  &#039;db_undo_support&#039; =&amp;gt; true&lt;br /&gt;
&lt;br /&gt;
Note: if you deploy undo support after game is in production this will take into effect for new games only, old games will give user an error if user choses Undo action, but otherwise it should not affect them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; function undoSavepoint( )&lt;br /&gt;
: Save the whole game situation inside an &amp;quot;Undo save point&amp;quot;.&lt;br /&gt;
: There is only ONE undo save point available (see [[BGA Undo policy]]). Cannot use in multiactivate state or in game state where next state is multiactive.&lt;br /&gt;
: Note: this function does not actually do anything when it is called, it only raises the flag to store the database AFTER transaction is over. So the actual state will be saved when you exit the function  calling it (technically before first queued notification is sent, which matters if you transition to game state not to user state after), this may affect what you end up saving.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; function undoRestorePoint()&lt;br /&gt;
: Restore the situation previously saved as an &amp;quot;Undo save point&amp;quot;.&lt;br /&gt;
: You must make sure that the active player is the same after and before the undoRestorePoint (ie: this is your responsibility to ensure that the player that is active when this method is called is exactly the same than the player that was active when the undoSavePoint method has been called).&lt;br /&gt;
&lt;br /&gt;
    function actUndo() {&lt;br /&gt;
        $this-&amp;gt;undoRestorePoint();&lt;br /&gt;
        return PlayTurn::class; // transition to single player state (i.e. beginning of player actions for this turn)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note&#039;&#039;&#039;: if you are reading game state variable right after restore (without changing state first) it won&#039;t work properly as the global table cache is not automatically refreshed after undoRestorePoint(). So you should either change state immediately to refresh game state values, or use $this-&amp;gt;gamestate-&amp;gt;reloadState() to refresh the state. If you choose to do the latest, be aware that this will bring the state machine back to the state during which the save point snapshot has been taken using undoSavepoint().&lt;br /&gt;
&lt;br /&gt;
=== Manually remove game logs ===&lt;br /&gt;
&amp;lt;strong style=&amp;quot;color: red;&amp;quot;&amp;gt;Only use it if you have custom undo and you fully understand how logs and replay works!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;getCurrentMoveId()&lt;br /&gt;
: Returns the current move id, when doing an action, that should be stored along informations to undo.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;remove(int $startMoveId)&lt;br /&gt;
: Remove all logs from a move id that was stored during an action using `getCurrentMoveId()`. &amp;lt;strong&amp;gt;The game should be in the exact same point as it was before the stored action!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        // in the action code, do all the action code, notify it, and store the custom undo&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;set(UNDO_ACTION, new Undo(&lt;br /&gt;
            movedTiles: $tiles, &lt;br /&gt;
            moveId: $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;getCurrentMoveId(),&lt;br /&gt;
        ));&lt;br /&gt;
&lt;br /&gt;
        return ConfirmAction::class;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $undo = $this-&amp;gt;bga-&amp;gt;globals-&amp;gt;get(UNDO_ACTION);&lt;br /&gt;
        // in the undo action code, do all the revert action code, notify it, then remove the logs&lt;br /&gt;
        $this-&amp;gt;bga-&amp;gt;logs-&amp;gt;remove($undo-&amp;gt;moveId);&lt;br /&gt;
        // don&#039;t do any action/notif after removing the logs&lt;br /&gt;
        return PlayAction::class;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Managing errors and exceptions ==&lt;br /&gt;
&lt;br /&gt;
Note: when you throw an exception, all database changes and all notifications are cancelled immediately. This way, the game situation that existed before the request is completely restored.&lt;br /&gt;
&lt;br /&gt;
; throw new UserException(string|NotificationMessage $message)&lt;br /&gt;
: Base class to notify a user error&lt;br /&gt;
: You must throw this exception when a player wants to do something that they are not allowed to do.&lt;br /&gt;
: The error message will be shown to the player as a &amp;quot;red message&amp;quot;.&lt;br /&gt;
: The error will be displayed to the player, as it&#039;s a UserException, the error message should be translated (with clientranslate(), and if there are args wrap them into a NotificationMessage)&lt;br /&gt;
: Throwing such an exception is NOT considered a bug, so it is not traced in BGA error logs.&lt;br /&gt;
&lt;br /&gt;
Note: if your IDE doesn&#039;t do it for you, you&#039;ll need to add &amp;lt;code&amp;gt;use Bga\GameFramework\UserException;&amp;lt;/code&amp;gt; at the top of your file.&lt;br /&gt;
&lt;br /&gt;
Example from Gomoku:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     throw new UserException(clienttranslate(&amp;quot;There is already a stone on this intersection, you can&#039;t play there&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Example with translated UserException using args :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     throw new UserException(new NotificationMessage(clienttranslate(&#039;You must play a card bigger than ${min}&#039;, [min =&amp;gt; $minCardValue])));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; throw new SystemException (string|NotificationMessage $message)&lt;br /&gt;
: Base class to notify a system exception. The message will be hidden from the user, but show in the logs. Use this if the message contains technical information.&lt;br /&gt;
&lt;br /&gt;
; throw new VisibleSystemException (string|NotificationMessage $message)&lt;br /&gt;
: You must throw this exception when you detect something that is not supposed to happened in your code.&lt;br /&gt;
: The error message is shown to the user as an &amp;quot;Unexpected error&amp;quot;, in order that he can report it in the forum.&lt;br /&gt;
: The error message is logged in BGA error logs. &lt;br /&gt;
: it should not be translated, as it&#039;s just to bring debug details to you when the player reports the issue.&lt;br /&gt;
&lt;br /&gt;
== Zombie mode ==&lt;br /&gt;
&lt;br /&gt;
When a player leaves a game for any reason (expelled, quit), he becomes a &amp;quot;zombie player&amp;quot;. You must implement a Zombie that will handle the role of the leaver player&lt;br /&gt;
&lt;br /&gt;
Read [[Zombie Mode|Zombie mode]] to get all details of the expected code.&lt;br /&gt;
&lt;br /&gt;
== User preferences ==&lt;br /&gt;
&#039;&#039;&#039;$this-&amp;gt;bga-&amp;gt;userPreferences-&amp;gt;get(int $playerId, int $prefId): ?int&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Return the value of a user preference for a player. It will return the value currently selected in the select combo box, in the top-right menu.&lt;br /&gt;
&lt;br /&gt;
== Player color preferences ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BGA premium users may choose their preferred color for playing. For example, if they are used to play green for every board game, they can select &amp;quot;green&amp;quot; in their BGA preferences page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To test it, you can set your preferred color on your BGA Studio account.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Making your game compatible with colors preferences is very easy and requires only 1 line of configuration change:&lt;br /&gt;
&lt;br /&gt;
On your gameinfos.inc.php file, add the following lines :&lt;br /&gt;
&lt;br /&gt;
  // Favorite colors support: if set to &amp;quot;true&amp;quot;, support attribution of favorite colors based on player&#039;s preferences (see reattributeColorsBasedOnPreferences PHP method)&lt;br /&gt;
  // NB: this parameter is used only to flag games supporting this feature; you must use (or not use) reattributeColorsBasedOnPreferences PHP method to actually enable or disable the feature.&lt;br /&gt;
  &#039;favorite_colors_support&#039; =&amp;gt; true,&lt;br /&gt;
&lt;br /&gt;
Then, on your main &amp;lt;your_game&amp;gt;.game.php file check the code of &amp;quot;setupNewGame&amp;quot;. New template already have correct code, but if you editing very old game and it may be absent.&lt;br /&gt;
&lt;br /&gt;
        $gameinfos = $this-&amp;gt;getGameinfos();&lt;br /&gt;
        ...&lt;br /&gt;
        if ($gameinfos[&#039;favorite_colors_support&#039;])&lt;br /&gt;
            $this-&amp;gt;reattributeColorsBasedOnPreferences($players, $gameinfos[&#039;player_colors&#039;]); // this should be above reloadPlayersBasicInfos()&lt;br /&gt;
        $this-&amp;gt;reloadPlayersBasicInfos();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;reattributeColorsBasedOnPreferences&amp;quot; method reattributes all colors, taking into account players color preferences and available colors.&lt;br /&gt;
&lt;br /&gt;
Note that you must update the colors to indicate the colors available for your game.&lt;br /&gt;
&lt;br /&gt;
Some important remarks:&lt;br /&gt;
* for some games (i.e. Chess), the color has an influence on a mechanism of the game, most of the time by giving a special advantage to a player (i.e. Starting the game). Color preference mechanism must NOT be used in such a case.&lt;br /&gt;
* your logic should NEVER consider that the first player has the color X, that the second player has the color Y, and so on. If this is the case, your game will NOT be compatible with reattributeColorsBasedOnPreferences as this method attribute colors to players based on their preferences and not based as their order at the table.&lt;br /&gt;
&lt;br /&gt;
=== Custom color assignments ===&lt;br /&gt;
Some colors don&#039;t play nicely with BGA&#039;s color difference algorithm. If you receive feedback that colors are not well chosen, you can bypass the BGA algorithm by specifying a map from user preference colors to game colors.&lt;br /&gt;
&lt;br /&gt;
For example, you may wish to assign BGA&#039;s blue to your game&#039;s baby blue: &amp;lt;code&amp;gt;&amp;quot;0000ff&amp;quot; /* Blue */ =&amp;gt; &amp;quot;89CFF0&amp;quot;,&amp;lt;/code&amp;gt; whereas otherwise, a deep purple might be chosen instead. Just be sure that the assigned colors are also present in the &amp;lt;code&amp;gt;player_colors&amp;lt;/code&amp;gt; array passed to &amp;lt;code&amp;gt;reattributeColorsBasedOnPreferences&amp;lt;/code&amp;gt;, otherwise the assignment will be ignored.&lt;br /&gt;
&lt;br /&gt;
To do this, implement this method in your &amp;lt;code&amp;gt;X.game.php&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
Note: the user preference colors (the keys in the returned array) should not be modified, or the code may not work as expected. These are the colors players can choose between in their profile.&lt;br /&gt;
     /**&lt;br /&gt;
      * Returns an array of user preference colors to game colors.&lt;br /&gt;
      * Game colors must be among those which are passed to reattributeColorsBasedOnPreferences()&lt;br /&gt;
      * Each game color can be an array of suitable colors, or a single color:&lt;br /&gt;
      * [&lt;br /&gt;
      *    // The first available color chosen:&lt;br /&gt;
      *    &#039;ff0000&#039; =&amp;gt; [&#039;990000&#039;, &#039;aa1122&#039;],&lt;br /&gt;
      *    // This color is chosen, if available&lt;br /&gt;
      *    &#039;0000ff&#039; =&amp;gt; &#039;000099&#039;,&lt;br /&gt;
      * ]&lt;br /&gt;
      * If no color can be matched from this array, then the default implementation is used.&lt;br /&gt;
      */&lt;br /&gt;
     function getSpecificColorPairings(): array {&lt;br /&gt;
         return array(&lt;br /&gt;
             &amp;quot;ff0000&amp;quot; /* Red */         =&amp;gt; null,&lt;br /&gt;
             &amp;quot;008000&amp;quot; /* Green */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;0000ff&amp;quot; /* Blue */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;ffa500&amp;quot; /* Yellow */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;000000&amp;quot; /* Black */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;ffffff&amp;quot; /* White */       =&amp;gt; null,&lt;br /&gt;
             &amp;quot;e94190&amp;quot; /* Pink */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;982fff&amp;quot; /* Purple */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;72c3b1&amp;quot; /* Cyan */        =&amp;gt; null,&lt;br /&gt;
             &amp;quot;f07f16&amp;quot; /* Orange */      =&amp;gt; null,&lt;br /&gt;
             &amp;quot;bdd002&amp;quot; /* Khaki green */ =&amp;gt; null,&lt;br /&gt;
             &amp;quot;7b7b7b&amp;quot; /* Gray */        =&amp;gt; null,&lt;br /&gt;
         );&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
== Legacy games API ==&lt;br /&gt;
&lt;br /&gt;
For some very specific games (&amp;quot;legacy&amp;quot;, &amp;quot;campaign&amp;quot;), you need to keep some informations from a game to another.&lt;br /&gt;
&lt;br /&gt;
This should be an exceptional situation: the legacy API is costing resources on Board Game Arena databases, and is slowing down the game setup process + game end of game process. Please do not use it for things like:&lt;br /&gt;
* keeping a player preference/settings (=&amp;gt; player preferences and game options should be used instead)&lt;br /&gt;
* keeping a statistics, a score, or a ranking, while it is not planned in the physical board game, or while there is no added value compared to BGA statistics / rankings.&lt;br /&gt;
&lt;br /&gt;
You should use it for:&lt;br /&gt;
* legacy games: when some components of the game has been altered in a previous game and should be kept as it is.&lt;br /&gt;
* &amp;quot;campaign style&amp;quot; games: when a player is getting a &amp;quot;reward&amp;quot; at the end of a game, and should be able to use it in further games.&lt;br /&gt;
&lt;br /&gt;
Important: you cannot store more than 64k of data (serialized as JSON) per player per game. If you go over 64k, storeLegacyData function is going to FAIL, and there is a risk to create a major bug (= players blocked) in your game. You MUST make sure that no more than 64k of data is used for each player for your game. For example, if you are implementing a &amp;quot;campaign style&amp;quot; game and if you allow a player to start multiple campaign, you must LIMIT the number of different campaign so that the total data size to not go over the limit. We strongly recommend you to use this:&lt;br /&gt;
&lt;br /&gt;
  try &lt;br /&gt;
  {&lt;br /&gt;
  	$this-&amp;gt;bga-&amp;gt;legacy-&amp;gt;setTeam( $my_data );&lt;br /&gt;
  }&lt;br /&gt;
  catch( \feException $e ) // \feException is a base class of \BgaSystemException and others...&lt;br /&gt;
  {&lt;br /&gt;
  	if( $e-&amp;gt;getCode() == FEX_legacy_size_exceeded )&lt;br /&gt;
  	{&lt;br /&gt;
  		// Do something here to free some space in Legacy data (ex: by removing some variables)&lt;br /&gt;
  	}&lt;br /&gt;
  	else&lt;br /&gt;
  		throw $e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
The keys may only contain letters and numbers, underscore seems not to be allowed.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;set(string $key, int $playerId, mixed $value, int $ttl = 365)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;storeLegacyData($player_id, $key, $data, $ttl = 365) )&lt;br /&gt;
: Store some data associated with $key for the given user / current game&lt;br /&gt;
: In the opposite of all other game data, this data will PERSIST after the end of this table, and can be re-used&lt;br /&gt;
: in a future table with the same game.&lt;br /&gt;
: IMPORTANT: The only possible place where you can use this method is when the game is over at your table (last game action). Otherwise, there is a risk of conflicts between ongoing games.    &lt;br /&gt;
: TTL is a time-to-live: the maximum, and default, is 365 days.&lt;br /&gt;
: In any way, the total data (= all keys) you can store for a given user+game is 64k (note: data is store serialized as JSON data)&lt;br /&gt;
: NOTICE: You can store some persistant data across all tables from your game using the specific player_id 0 which is unused. In such case, it&#039;s even more important to manage correctly the size of your data to avoid any exception or issue while storing updated data (ie. you can use this for some kind of leaderbord for solo game or contest)&lt;br /&gt;
: Note: This function cannot be called during game setup (will throw an error).&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;get(string $key, int $playerId, mixed $defaultValue = null)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;retrieveLegacyData($player_id, $key) ⚠️ this alias was returning a JSON-encoded value, while the get function returns the real value )&lt;br /&gt;
: Get data associated with $key for the current game&lt;br /&gt;
: This data is common to ALL tables from the same game for this player, and persist from one table to another.&lt;br /&gt;
: Note: calling this function has an important cost =&amp;gt; please call it few times (possibly: only ONCE) for each player for 1 game if possible&lt;br /&gt;
: Note: you can use &#039;%&#039; in $key to retrieve all keys matching the given patterns&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;delete(string $key, int $playerId)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;removeLegacyData($player_id, $key) )&lt;br /&gt;
: Remove some legacy data with the given key&lt;br /&gt;
: (useful to free some data to avoid going over 64k)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;setTeam(mixed $value, int $ttl = 365)&lt;br /&gt;
: ( deprecated alias: storeLegacyTeamData( $data, $ttl = 365 ) )&lt;br /&gt;
: Same as storeLegacyData, except that it stores some data for the whole team within the current table and does not use a key&lt;br /&gt;
: Ie: if players A, B and C are at a table, the legacy data will be saved for future table with (exactly) A, B and C on the table.&lt;br /&gt;
: This is useful for games which are intended to be played several time by the same team.&lt;br /&gt;
: Note: the data total size is still limited, so you must implement catch the FEX_legacy_size_exceeded exception if it happens&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;getTeam(mixed $defaultValue = null)&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;retrieveLegacyData() ⚠️ this alias was returning a JSON-encoded value, while the getTeam function returns the real value )&lt;br /&gt;
: Same as retrieveLegacyData, except that it retrieves some data for the whole team within the current table (set by storeLegacyTeamData)&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;legacy-&amp;gt;deleteTeam()&lt;br /&gt;
: ( deprecated alias: $this-&amp;gt;removeLegacyTeamData() )&lt;br /&gt;
: Same as removeLegacyData, except that it retrieves some data for the whole team within the current table (set by storeLegacyTeamData)&lt;br /&gt;
&lt;br /&gt;
== Players text input and moderation ==&lt;br /&gt;
This section concerns only games where the players have to write some words to play: games based on words, like &amp;quot;Just one&amp;quot; or &amp;quot;Codenames&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some players will use your game to write insults or profanities. As this is part of the game and not in the game chat, these words cannot be reported by players and moderated.&lt;br /&gt;
&lt;br /&gt;
If you met the following situation:&lt;br /&gt;
&lt;br /&gt;
* You are asking a player to type a text (word(s) or sentence)&lt;br /&gt;
* The player can enter any text (this is not a pre-selection or anything you can control)&lt;br /&gt;
* This text is visible by at least one other player&lt;br /&gt;
&lt;br /&gt;
Then, you must use the following method:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;function logTextForModeration( $player_id, $text )&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
player_id = player who write the text&lt;br /&gt;
&lt;br /&gt;
text = text that has been written&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This function will have no visible consequence for your game, but will allow players to report the text to moderators if something happens.&lt;br /&gt;
&lt;br /&gt;
== Tournament API (🚧 Beta) ==&lt;br /&gt;
&lt;br /&gt;
The Tournament API is meant only for tournament encounters. It lets you persist per‑player data within a tournament and access deterministic seeds shared by all encounters of a tournament step.&lt;br /&gt;
&lt;br /&gt;
Do not use this for preferences or long‑term progression: if a table is not linked to a tournament, these requests will fail, and all tournament data is wiped when the tournament ends anyway.&lt;br /&gt;
&lt;br /&gt;
You can use it for:&lt;br /&gt;
* enforcing tournament‑wide constraints (ex: keep the same deck across all rounds)&lt;br /&gt;
* deterministic setup shared across a tournament step (ex: generate the same map layout for all encounters in a step)&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;isTournament()&lt;br /&gt;
: Returns true if this table is a tournament encounter.&lt;br /&gt;
: Use this to guard tournament‑only logic.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;getSeedInfo()&lt;br /&gt;
: Returns an associative array containing deterministic seeds for tournament encounters.&lt;br /&gt;
: Keys:&lt;br /&gt;
:* &amp;lt;code&amp;gt;tournament_seed&amp;lt;/code&amp;gt;: stable across the whole tournament.&lt;br /&gt;
:* &amp;lt;code&amp;gt;step_seed&amp;lt;/code&amp;gt;: stable across a tournament step (same for all encounters in that step).&lt;br /&gt;
:* &amp;lt;code&amp;gt;parent_tournament_seed&amp;lt;/code&amp;gt;: stable across the parent tournament (the reference tournament for sub-tournaments of Groups Stage tournament mode).&lt;br /&gt;
:&lt;br /&gt;
: Note: This call is already guarded internally, no external call is made unless the table is a tournament encounter.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;storePlayerGameData(int $playerId, string $key, mixed $data)&lt;br /&gt;
: Store per‑player game data for the current tournament.&lt;br /&gt;
: Data is JSON‑encoded automatically.&lt;br /&gt;
: The cumulative size of all data stored for a player in a tournament (even over multiple keys) is limited to 64 KiB.&lt;br /&gt;
: Keys must be 1–16 characters and letters/numbers only.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;retrievePlayerGameData(int $playerId, string $key)&lt;br /&gt;
: Retrieve per‑player game data for the current tournament.&lt;br /&gt;
: If `$key` contains &#039;%&#039;, returns an array of key =&amp;gt; value pairs (or [] if no match).&lt;br /&gt;
: Otherwise, returns a single value (or null if no match).&lt;br /&gt;
: Returned values are JSON‑decoded automatically.&lt;br /&gt;
&lt;br /&gt;
; $this-&amp;gt;&#039;&#039;&#039;bga-&amp;gt;&#039;&#039;&#039;tournament-&amp;gt;removePlayerGameData(int $playerId, string $key)&lt;br /&gt;
: Remove per‑player game data for the current tournament.&lt;br /&gt;
: You can use &#039;%&#039; in `$key` to remove multiple entries at once.&lt;br /&gt;
: All tournament data is removed automatically when the tournament is finished.&lt;br /&gt;
&lt;br /&gt;
== Language dependent games API ==&lt;br /&gt;
&lt;br /&gt;
This API is used for games that are heavily language dependent. Two most common use cases are:&lt;br /&gt;
* Games that have a language dependent component that are not necessarily translatable, typically a list of words. (Think of games like Codenames, Decrypto, Just One...)&lt;br /&gt;
* Games with massive communication where players would like to ensure that all participants speak the same language. (Think of games like Werewolf, The Resistance, maybe even dixit...)&lt;br /&gt;
&lt;br /&gt;
If this option is used, the table created will be limited only to users that have specific language in their profile. Player starting the game would be able to chose one of the languages they speak.&lt;br /&gt;
&lt;br /&gt;
There is a new property language_dependency in gameinfos.inc.php which can be set like this:&lt;br /&gt;
  &#039;language_dependency&#039; =&amp;gt; false,  //or if the property is missing, the game is not language dependent&lt;br /&gt;
  &#039;language_dependency&#039; =&amp;gt; true, //all players at the table must speak the same language&lt;br /&gt;
  &#039;language_dependency&#039; =&amp;gt; array( 1 =&amp;gt; &#039;en&#039;, 2 =&amp;gt; &#039;fr&#039;, 3 =&amp;gt; &#039;it&#039; ), //1-based list of supported languages&lt;br /&gt;
&lt;br /&gt;
In the gamename.game.php file, you can get the id of selected language with the method &#039;&#039;&#039;getGameLanguage&#039;&#039;&#039;.&lt;br /&gt;
; function getGameLanguage()&lt;br /&gt;
: Returns an index of the selected language as defined in gameinfos.inc.php.&lt;br /&gt;
&lt;br /&gt;
Languages currently available on BGA are:&lt;br /&gt;
  &#039;ar&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;العربية&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ar_AE&#039; ),             // Arabic&lt;br /&gt;
  &#039;be&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;беларуская мова&amp;quot;, &#039;code&#039; =&amp;gt; &#039;be_BY&#039; ),     // Belarusian&lt;br /&gt;
  &#039;bn&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;বাংলা&amp;quot;, &#039;code&#039; =&amp;gt; &#039;bn_BD&#039; ),                // Bengali&lt;br /&gt;
  &#039;bg&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;български език&amp;quot;, &#039;code&#039; =&amp;gt; &#039;bg_BG&#039; ),      // Bulgarian&lt;br /&gt;
  &#039;ca&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;català&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ca_ES&#039; ),              // Catalan&lt;br /&gt;
  &#039;cs&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;čeština&amp;quot;, &#039;code&#039; =&amp;gt; &#039;cs_CZ&#039; ),             // Czech&lt;br /&gt;
  &#039;da&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;dansk&amp;quot;, &#039;code&#039; =&amp;gt; &#039;da_DK&#039; ),               // Danish&lt;br /&gt;
  &#039;de&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;deutsch&amp;quot;, &#039;code&#039; =&amp;gt; &#039;de_DE&#039; ),             // German&lt;br /&gt;
  &#039;el&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Ελληνικά&amp;quot;, &#039;code&#039; =&amp;gt; &#039;el_GR&#039; ),            // Greek&lt;br /&gt;
  &#039;en&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;English&amp;quot;, &#039;code&#039; =&amp;gt; &#039;en_US&#039; ),             // English&lt;br /&gt;
  &#039;es&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;español&amp;quot;, &#039;code&#039; =&amp;gt; &#039;es_ES&#039; ),             // Spanish&lt;br /&gt;
  &#039;et&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;eesti keel&amp;quot;, &#039;code&#039; =&amp;gt; &#039;et_EE&#039; ),          // Estonian       &lt;br /&gt;
  &#039;fi&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;suomi&amp;quot;, &#039;code&#039; =&amp;gt; &#039;fi_FI&#039; ),               // Finnish&lt;br /&gt;
  &#039;fr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;français&amp;quot;, &#039;code&#039; =&amp;gt; &#039;fr_FR&#039; ),            // French&lt;br /&gt;
  &#039;he&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;עברית&amp;quot;, &#039;code&#039; =&amp;gt; &#039;he_IL&#039; ),               // Hebrew       &lt;br /&gt;
  &#039;hi&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;हिन्दी&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hi_IN&#039; ),                 // Hindi&lt;br /&gt;
  &#039;hr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Hrvatski&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hr_HR&#039; ),            // Croatian&lt;br /&gt;
  &#039;hu&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;magyar&amp;quot;, &#039;code&#039; =&amp;gt; &#039;hu_HU&#039; ),              // Hungarian&lt;br /&gt;
  &#039;id&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Bahasa Indonesia&amp;quot;, &#039;code&#039; =&amp;gt; &#039;id_ID&#039; ),    // Indonesian&lt;br /&gt;
  &#039;ms&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Bahasa Malaysia&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ms_MY&#039; ),     // Malaysian&lt;br /&gt;
  &#039;it&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;italiano&amp;quot;, &#039;code&#039; =&amp;gt; &#039;it_IT&#039; ),            // Italian&lt;br /&gt;
  &#039;ja&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;日本語&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ja_JP&#039; ),               // Japanese&lt;br /&gt;
  &#039;jv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Basa Jawa&amp;quot;, &#039;code&#039; =&amp;gt; &#039;jv_JV&#039; ),           // Javanese                       &lt;br /&gt;
  &#039;ko&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;한국어&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ko_KR&#039; ),               // Korean&lt;br /&gt;
  &#039;lt&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;lietuvių&amp;quot;, &#039;code&#039; =&amp;gt; &#039;lt_LT&#039; ),            // Lithuanian&lt;br /&gt;
  &#039;lv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;latviešu&amp;quot;, &#039;code&#039; =&amp;gt; &#039;lv_LV&#039; ),            // Latvian&lt;br /&gt;
  &#039;nl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;nederlands&amp;quot;, &#039;code&#039; =&amp;gt; &#039;nl_NL&#039; ),          // Dutch&lt;br /&gt;
  &#039;no&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;norsk&amp;quot;, &#039;code&#039; =&amp;gt; &#039;nb_NO&#039; ),               // Norwegian&lt;br /&gt;
  &#039;oc&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;occitan&amp;quot;, &#039;code&#039; =&amp;gt; &#039;oc_FR&#039; ),             // Occitan&lt;br /&gt;
  &#039;pl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;polski&amp;quot;, &#039;code&#039; =&amp;gt; &#039;pl_PL&#039; ),              // Polish&lt;br /&gt;
  &#039;pt&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;português&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;pt_PT&#039; ),          // Portuguese&lt;br /&gt;
  &#039;ro&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;română&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;ro_RO&#039;  ),            // Romanian&lt;br /&gt;
  &#039;ru&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Русский язык&amp;quot;, &#039;code&#039; =&amp;gt; &#039;ru_RU&#039; ),        // Russian&lt;br /&gt;
  &#039;sk&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;slovenčina&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sk_SK&#039; ),          // Slovak&lt;br /&gt;
  &#039;sl&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;slovenščina&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sl_SI&#039; ),         // Slovenian       &lt;br /&gt;
  &#039;sr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Српски&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sr_RS&#039; ),              // Serbian       &lt;br /&gt;
  &#039;sv&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;svenska&amp;quot;, &#039;code&#039; =&amp;gt; &#039;sv_SE&#039; ),             // Swedish&lt;br /&gt;
  &#039;tr&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Türkçe&amp;quot;, &#039;code&#039; =&amp;gt; &#039;tr_TR&#039; ),              // Turkish       &lt;br /&gt;
  &#039;uk&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;Українська мова&amp;quot;, &#039;code&#039; =&amp;gt; &#039;uk_UA&#039; ),     // Ukrainian&lt;br /&gt;
  &#039;zh&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;中文 (漢)&amp;quot;,  &#039;code&#039; =&amp;gt; &#039;zh_TW&#039; ),           // Traditional Chinese (Hong Kong, Macau, Taiwan)&lt;br /&gt;
  &#039;zh-cn&#039; =&amp;gt; array( &#039;name&#039; =&amp;gt; &amp;quot;中文 (汉)&amp;quot;, &#039;code&#039; =&amp;gt; &#039;zh_CN&#039; ),         // Simplified Chinese (Mainland China, Singapore)&lt;br /&gt;
&lt;br /&gt;
== Debugging and Tracing ==&lt;br /&gt;
&lt;br /&gt;
To debug php code you can use some tracing functions available from the parent class such as debug, trace, error, warn, dump.&lt;br /&gt;
  &lt;br /&gt;
  $this-&amp;gt;debug(&amp;quot;Ahh!&amp;quot;);&lt;br /&gt;
  $this-&amp;gt;dump(&#039;my_var&#039;,$my_var);&lt;br /&gt;
&lt;br /&gt;
See [[Practical_debugging]] section for complete information about debugging interfaces and where to find logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getBgaEnvironment(): string&#039;&#039;&#039;&lt;br /&gt;
:Returns &amp;quot;studio&amp;quot; for studio and &amp;quot;prod&amp;quot; for production environment (i.e. where games current runs). Only useful for debbugging hooks.&lt;br /&gt;
Note: alpha server is also &amp;quot;prod&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Creating other classes ==&lt;br /&gt;
&lt;br /&gt;
You can create other classes in the &amp;lt;code&amp;gt;modules/php&amp;lt;/code&amp;gt; dir, next to your &amp;lt;code&amp;gt;Game.php&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
If they are names following the PSR-4, they will be autoloaded by BGA (no require_once needed). This doesn&#039;t work for the &amp;quot;legacy way&amp;quot; (=&amp;lt;code&amp;gt;YourGameName.game.php&amp;lt;/code&amp;gt; at the game root dir).&lt;br /&gt;
&lt;br /&gt;
For example, writing &amp;lt;code&amp;gt;new ScoreManager()&amp;lt;/code&amp;gt; in your Game file will try to load the class &amp;lt;code&amp;gt;ScoreManager&amp;lt;/code&amp;gt; of namespace &amp;lt;code&amp;gt;Bga\Games\YourGameName&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;modules/php/ScoreManager.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to add namespace &amp;lt;code&amp;gt;Bga\Games\YourGameName;&amp;lt;/code&amp;gt; at the beginning of your module.&lt;br /&gt;
&lt;br /&gt;
You can even put these classes in sublevels : the class &amp;lt;code&amp;gt;Bga\Games\YourGameName\Cards\StandardCard&amp;lt;/code&amp;gt; will be automatically loaded if it is stored in &amp;lt;code&amp;gt;modules/php/Cards/StandardCard.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28949</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28949"/>
		<updated>2026-03-16T01:08:53Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Nuclear Destruction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Launch Track ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Warheads ===&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
=== Anti Missiles ===&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
=== Secrets and Top Secrets ===&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
=== Hybrid Cards ===&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
==== Winning the Ultimate Victory ====&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
&lt;br /&gt;
=== Deterrent Force ===&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== Use Escalation Die ===&lt;br /&gt;
&lt;br /&gt;
The Escalation Die may be optionally rolled for all attacks.&lt;br /&gt;
&lt;br /&gt;
=== Track Revealed Population ===&lt;br /&gt;
&lt;br /&gt;
The game automatically tracks which population cards for each player have been revealed (such as by being taken from other players or received from the population bank as change), giving their opponents an idea of what their population might be.&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== All Propaganda cards allow discarding in War ===&lt;br /&gt;
&lt;br /&gt;
No matter which card sets you use, all Propaganda cards may be played during war to draw and then discard 2 cards.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;br /&gt;
&lt;br /&gt;
=== Everyone loses if everyone dies! ===&lt;br /&gt;
&lt;br /&gt;
This is the normal way to play Nuclear War and is recommended, but if you&#039;re playing tournaments then you can turn this off so that players are ranked by how long they last.&lt;br /&gt;
&lt;br /&gt;
== Card Sets ==&lt;br /&gt;
&lt;br /&gt;
You may choose which Nuclear War card sets to use from the many expansions that have been released over the years. When playing with multiple sets you can choose to just combine all the cards into a single large deck or the system can create a &#039;&#039;&#039;Constructed&#039;&#039;&#039; deck which balances a deck for the number of players, drawing cards from the options you choose. Here&#039;s a quick overview.&lt;br /&gt;
&lt;br /&gt;
=== Nuclear War ===&lt;br /&gt;
&lt;br /&gt;
Just the basics. Propaganda, Missiles, Bombers, Warheads, a few Secrets and Spies. Nothing fancy.&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Escalation ===&lt;br /&gt;
&lt;br /&gt;
More basics plus the likes of Space Platforms (deploy missiles to space and drop them on your opponents from there), Killer Satellites (the natural enemy of the Space Platform), MX Missiles (splits large warheads into smaller ones), Cruise Missiles (a missile with a built-in warhead that flies around the board until it drops) and Saboteurs (who can sabotage any launch).&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Proliferation ===&lt;br /&gt;
&lt;br /&gt;
More basics plus Stealth Bombers (play straight from your hand after revealing a warhead as your Face Up Card), Stealth Fighters (the natural enemy of the Stealth Bomber), Atomic Cannons (deploy once for a permanent 10 megaton delivery system against a neighbor), Submarines (allows you to load warheads straight from your hand), Space Shuttles (a bomber that can be used to restock a Space Platform), and Saboteurs (who can sabotage any launch).&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Destruction ===&lt;br /&gt;
&lt;br /&gt;
More basics with a greater variety of megatonnage. Plenty of Hybrid cards and Propaganda cards that will let you draw and discard during Wartime.&lt;br /&gt;
&lt;br /&gt;
=== Booster Pack ===&lt;br /&gt;
&lt;br /&gt;
An add-on pack with some new numbers for Propaganda cards and warheads (including the 200 megaton warhead). Dirty warheads (spin twice), Shipboard missiles (play straight from your hand after revealing a warhead as your Face Up Card), DCX-Delta Clippers (a bomber that you can keep after using). When the Booster Pack is used, only some of the cards are randomly added to your deck.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28948</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28948"/>
		<updated>2026-03-16T00:59:01Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Card Sets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Launch Track ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Warheads ===&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
=== Anti Missiles ===&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
=== Secrets and Top Secrets ===&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
=== Hybrid Cards ===&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
==== Winning the Ultimate Victory ====&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
&lt;br /&gt;
=== Deterrent Force ===&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== Use Escalation Die ===&lt;br /&gt;
&lt;br /&gt;
The Escalation Die may be optionally rolled for all attacks.&lt;br /&gt;
&lt;br /&gt;
=== Track Revealed Population ===&lt;br /&gt;
&lt;br /&gt;
The game automatically tracks which population cards for each player have been revealed (such as by being taken from other players or received from the population bank as change), giving their opponents an idea of what their population might be.&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== All Propaganda cards allow discarding in War ===&lt;br /&gt;
&lt;br /&gt;
No matter which card sets you use, all Propaganda cards may be played during war to draw and then discard 2 cards.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;br /&gt;
&lt;br /&gt;
=== Everyone loses if everyone dies! ===&lt;br /&gt;
&lt;br /&gt;
This is the normal way to play Nuclear War and is recommended, but if you&#039;re playing tournaments then you can turn this off so that players are ranked by how long they last.&lt;br /&gt;
&lt;br /&gt;
== Card Sets ==&lt;br /&gt;
&lt;br /&gt;
You may choose which Nuclear War card sets to use from the many expansions that have been released over the years. When playing with multiple sets you can choose to just combine all the cards into a single large deck or the system can create a &#039;&#039;&#039;Constructed&#039;&#039;&#039; deck which balances a deck for the number of players, drawing cards from the options you choose. Here&#039;s a quick overview.&lt;br /&gt;
&lt;br /&gt;
=== Nuclear War ===&lt;br /&gt;
&lt;br /&gt;
Just the basics. Propaganda, Missiles, Bombers, Warheads, a few Secrets and Spies. Nothing fancy.&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Escalation ===&lt;br /&gt;
&lt;br /&gt;
More basics plus the likes of Space Platforms (deploy missiles to space and drop them on your opponents from there), Killer Satellites (the natural enemy of the Space Platform), MX Missiles (splits large warheads into smaller ones), Cruise Missiles (a missile with a built-in warhead that flies around the board until it drops) and Saboteurs (who can sabotage any launch).&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Proliferation ===&lt;br /&gt;
&lt;br /&gt;
More basics plus Stealth Bombers (play straight from your hand after revealing a warhead as your Face Up Card), Stealth Fighters (the natural enemy of the Stealth Bomber), Atomic Cannons (deploy once for a permanent 10 megaton delivery system against a neighbor), Submarines (allows you to load warheads straight from your hand), Space Shuttles (a bomber that can be used to restock a Space Platform), and Saboteurs (who can sabotage any launch).&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Destruction ===&lt;br /&gt;
&lt;br /&gt;
More basics with great variety of megatonnage. Plenty of Hybrid cards and Propaganda cards that will let you draw and discard during Wartime.&lt;br /&gt;
&lt;br /&gt;
=== Booster Pack ===&lt;br /&gt;
&lt;br /&gt;
An add-on pack with some new numbers for Propaganda cards and warheads (including the 200 megaton warhead). Dirty warheads (spin twice), Shipboard missiles (play straight from your hand after revealing a warhead as your Face Up Card), DCX-Delta Clippers (a bomber that you can keep after using). When the Booster Pack is used, only some of the cards are randomly added to your deck.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28947</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28947"/>
		<updated>2026-03-16T00:55:37Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Nuclear War Cards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Launch Track ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Warheads ===&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
=== Anti Missiles ===&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
=== Secrets and Top Secrets ===&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
=== Hybrid Cards ===&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
==== Winning the Ultimate Victory ====&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
&lt;br /&gt;
=== Deterrent Force ===&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== Use Escalation Die ===&lt;br /&gt;
&lt;br /&gt;
The Escalation Die may be optionally rolled for all attacks.&lt;br /&gt;
&lt;br /&gt;
=== Track Revealed Population ===&lt;br /&gt;
&lt;br /&gt;
The game automatically tracks which population cards for each player have been revealed (such as by being taken from other players or received from the population bank as change), giving their opponents an idea of what their population might be.&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== All Propaganda cards allow discarding in War ===&lt;br /&gt;
&lt;br /&gt;
No matter which card sets you use, all Propaganda cards may be played during war to draw and then discard 2 cards.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;br /&gt;
&lt;br /&gt;
=== Everyone loses if everyone dies! ===&lt;br /&gt;
&lt;br /&gt;
This is the normal way to play Nuclear War and is recommended, but if you&#039;re playing tournaments then you can turn this off so that players are ranked by how long they last.&lt;br /&gt;
&lt;br /&gt;
== Card Sets ==&lt;br /&gt;
&lt;br /&gt;
You may choose which Nuclear War card sets to use from the many expansions that have been released over the years. Here&#039;s a quick overview.&lt;br /&gt;
&lt;br /&gt;
=== Nuclear War ===&lt;br /&gt;
&lt;br /&gt;
Just the basics. Propaganda, Missiles, Bombers, Warheads, a few Secrets and Spies. Nothing fancy.&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Escalation ===&lt;br /&gt;
&lt;br /&gt;
More basics plus the likes of Space Platforms (deploy missiles to space and drop them on your opponents from there), Killer Satellites (the natural enemy of the Space Platform), MX Missiles (splits large warheads into smaller ones), Cruise Missiles (a missile with a built-in warhead that flies around the board until it drops) and Saboteurs (who can sabotage any launch).&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Proliferation ===&lt;br /&gt;
&lt;br /&gt;
More basics plus Stealth Bombers (play straight from your hand after revealing a warhead as your Face Up Card), Stealth Fighters (the natural enemy of the Stealth Bomber), Atomic Cannons (deploy once for a permanent 10 megaton delivery system against a neighbor), Submarines (allows you to load warheads straight from your hand), Space Shuttles (a bomber that can be used to restock a Space Platform), and Saboteurs (who can sabotage any launch).&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Destruction ===&lt;br /&gt;
&lt;br /&gt;
More basics with great variety of megatonnage. Plenty of Hybrid cards and Propaganda cards that will let you draw and discard during Wartime.&lt;br /&gt;
&lt;br /&gt;
=== Booster Pack ===&lt;br /&gt;
&lt;br /&gt;
An add-on pack with some new numbers for Propaganda cards and warheads (including the 200 megaton warhead). Dirty warheads (spin twice), Shipboard missiles (play straight from your hand after revealing a warhead as your Face Up Card), DCX-Delta Clippers (a bomber that you can keep after using). When the Booster Pack is used, only some of the cards are randomly added to your deck.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28946</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28946"/>
		<updated>2026-03-16T00:55:06Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Optional Rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Launch Track ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Warheads ===&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
=== Anti Missiles ===&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
=== Secrets and Top Secrets ===&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
=== Hybrid Cards ===&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
==== Winning the Ultimate Victory ====&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
&lt;br /&gt;
=== Deterrent Force ===&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== Use Escalation Die ===&lt;br /&gt;
&lt;br /&gt;
The Escalation Die may be optionally rolled for all attacks.&lt;br /&gt;
&lt;br /&gt;
=== Track Revealed Population ===&lt;br /&gt;
&lt;br /&gt;
The game automatically tracks which population cards for each player have been revealed (such as by being taken from other players or received from the population bank as change), giving their opponents an idea of what their population might be.&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== All Propaganda cards allow discarding in War ===&lt;br /&gt;
&lt;br /&gt;
No matter which card sets you use, all Propaganda cards may be played during war to draw and then discard 2 cards.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;br /&gt;
&lt;br /&gt;
=== Everyone loses if everyone dies! ===&lt;br /&gt;
&lt;br /&gt;
This is the normal way to play Nuclear War and is recommended, but if you&#039;re playing tournaments then you can turn this off so that players are ranked by how long they last.&lt;br /&gt;
&lt;br /&gt;
== Card Sets ==&lt;br /&gt;
&lt;br /&gt;
You may choose which Nuclear War card sets to use from the many expansions that have been released over the years. Here&#039;s a quick overview.&lt;br /&gt;
&lt;br /&gt;
=== Nuclear War Cards ===&lt;br /&gt;
&lt;br /&gt;
Just the basics. Propaganda, Missiles, Bombers, Warheads, a few Secrets and Spies. Nothing fancy.&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Escalation ===&lt;br /&gt;
&lt;br /&gt;
More basics plus the likes of Space Platforms (deploy missiles to space and drop them on your opponents from there), Killer Satellites (the natural enemy of the Space Platform), MX Missiles (splits large warheads into smaller ones), Cruise Missiles (a missile with a built-in warhead that flies around the board until it drops) and Saboteurs (who can sabotage any launch).&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Proliferation ===&lt;br /&gt;
&lt;br /&gt;
More basics plus Stealth Bombers (play straight from your hand after revealing a warhead as your Face Up Card), Stealth Fighters (the natural enemy of the Stealth Bomber), Atomic Cannons (deploy once for a permanent 10 megaton delivery system against a neighbor), Submarines (allows you to load warheads straight from your hand), Space Shuttles (a bomber that can be used to restock a Space Platform), and Saboteurs (who can sabotage any launch).&lt;br /&gt;
&lt;br /&gt;
=== Nuclear Destruction ===&lt;br /&gt;
&lt;br /&gt;
More basics with great variety of megatonnage. Plenty of Hybrid cards and Propaganda cards that will let you draw and discard during Wartime.&lt;br /&gt;
&lt;br /&gt;
=== Booster Pack ===&lt;br /&gt;
&lt;br /&gt;
An add-on pack with some new numbers for Propaganda cards and warheads (including the 200 megaton warhead). Dirty warheads (spin twice), Shipboard missiles (play straight from your hand after revealing a warhead as your Face Up Card), DCX-Delta Clippers (a bomber that you can keep after using). When the Booster Pack is used, only some of the cards are randomly added to your deck.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28945</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28945"/>
		<updated>2026-03-16T00:40:34Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Optional Rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Launch Track ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Warheads ===&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
=== Anti Missiles ===&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
=== Secrets and Top Secrets ===&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
=== Hybrid Cards ===&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
==== Winning the Ultimate Victory ====&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
&lt;br /&gt;
=== Deterrent Force ===&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== Use Escalation Die ===&lt;br /&gt;
&lt;br /&gt;
The Escalation Die may be optionally rolled for all attacks.&lt;br /&gt;
&lt;br /&gt;
=== Track Revealed Population ===&lt;br /&gt;
&lt;br /&gt;
The game automatically tracks which population cards for each player have been revealed (such as by being taken from other players or received from the population bank as change), giving their opponents an idea of what their population might be.&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== All Propaganda cards allow discarding in War ===&lt;br /&gt;
&lt;br /&gt;
No matter which card sets you use, all Propaganda cards may be played during war to draw and then discard 2 cards.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;br /&gt;
&lt;br /&gt;
=== Everyone loses if everyone dies! ===&lt;br /&gt;
&lt;br /&gt;
This is the normal way to play Nuclear War and is recommended, but if you&#039;re playing tournaments then you can turn this off so that players are ranked by how long they last.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28944</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28944"/>
		<updated>2026-03-16T00:28:48Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Components Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Launch Track ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Warheads ===&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
=== Anti Missiles ===&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
=== Secrets and Top Secrets ===&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
=== Hybrid Cards ===&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
==== Winning the Ultimate Victory ====&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
&lt;br /&gt;
=== Deterrent Force ===&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28943</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28943"/>
		<updated>2026-03-16T00:27:53Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Winning the Ultimate Victory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Components Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Launch Track ===&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Warheads ===&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
=== Anti Missiles ===&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
=== Secrets and Top Secrets ===&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
=== Hybrid Cards ===&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
==== Winning the Ultimate Victory ====&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
&lt;br /&gt;
=== Deterrent Force ===&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28942</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28942"/>
		<updated>2026-03-16T00:27:01Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Delivery Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Components Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Launch Track ===&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Warheads ===&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
=== Anti Missiles ===&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
=== Secrets and Top Secrets ===&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
=== Specials ===&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
=== Hybrid Cards ===&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
=== Winning the Ultimate Victory ===&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
  &lt;br /&gt;
=== Deterrent Force ===&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28941</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28941"/>
		<updated>2026-03-16T00:26:25Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Winning the Ultimate Victory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Components Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Launch Track ===&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Warheads ====&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
==== Anti Missiles ====&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
==== Secrets and Top Secrets ====&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
==== Specials ====&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
==== Hybrid Cards ====&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
=== Winning the Ultimate Victory ===&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
  &lt;br /&gt;
=== Deterrent Force ===&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28940</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28940"/>
		<updated>2026-03-16T00:25:41Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Player Elimination and Final Strike */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Components Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Launch Track ===&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Warheads ====&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
==== Anti Missiles ====&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
==== Secrets and Top Secrets ====&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
==== Specials ====&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
==== Hybrid Cards ====&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
=== Winning the Ultimate Victory ===&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
  &lt;br /&gt;
==== Deterrent Force ====&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28939</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28939"/>
		<updated>2026-03-16T00:25:17Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Nuclear Escalation Die Roll Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Components Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Launch Track ===&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Warheads ====&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
==== Anti Missiles ====&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
==== Secrets and Top Secrets ====&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
==== Specials ====&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
==== Hybrid Cards ====&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next player&#039;s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
=== Winning the Ultimate Victory ===&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
  &lt;br /&gt;
==== Deterrent Force ====&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28938</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28938"/>
		<updated>2026-03-16T00:24:48Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Spinner Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Components Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Launch Track ===&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Warheads ====&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
==== Anti Missiles ====&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
==== Secrets and Top Secrets ====&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
==== Specials ====&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
==== Hybrid Cards ====&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Beta Rays Kill another 5 million.&#039;&#039;&#039; Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An additional 1 million are engulfed in the fireball.&#039;&#039;&#039; Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dirty Bomb! Double the Yield.&#039;&#039;&#039; Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;No Appreciable Radiation Fallout.&#039;&#039;&#039; No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explodes a Nuclear Stockpile Triple the Yield.&#039;&#039;&#039; Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bomb Shelters Save 2 Million.&#039;&#039;&#039; Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million.&#039;&#039;&#039; Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dud Warhead! (No Effect).&#039;&#039;&#039; Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Radioactive Fallout Kills Another 2 Million.&#039;&#039;&#039; Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel)&#039;&#039;&#039; Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next playerâ€™s turn.&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next playerâ€™s turn.&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
=== Winning the Ultimate Victory ===&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
  &lt;br /&gt;
==== Deterrent Force ====&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28937</id>
		<title>Gamehelpnuclearwar</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpnuclearwar&amp;diff=28937"/>
		<updated>2026-03-16T00:23:25Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Nuclear War */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The atomic bomb has been invented. Nations are building up their stockpiles of atomic bombs while vying for the hearts and minds of their rivals’ populace. Welcome to the world of Nuclear War!&lt;br /&gt;
&lt;br /&gt;
The game begins with an uneasy cold war between all the players, each representing a nuclear power. Once the first player launches a nuclear warhead, the war turns hot as populations decrease in huge balls of nuclear fire. Will there be any nation left when the last bomb has fallen?&lt;br /&gt;
&lt;br /&gt;
== Object ==&lt;br /&gt;
&lt;br /&gt;
In Nuclear War players seek world domination by eliminating the other major powers. This can be accomplished in two ways:&lt;br /&gt;
&lt;br /&gt;
* The peaceful way is to persuade the populations of opposing countries to join your superior form of government through the use of propaganda cards.&lt;br /&gt;
* The warlike way is to destroy the enemy’s population by using nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
Population is the measure of success or failure in the game. A player who loses their entire population is eliminated. The last player with population wins the game, but sometimes everyone is engulfed in flames and there are only losers.&lt;br /&gt;
&lt;br /&gt;
== Set Up ==&lt;br /&gt;
&lt;br /&gt;
# Shuffle the population cards. Based on the player count, deal each player the following number of cards: 2 players: 15 cards; 3 players: 10 cards; 4 players: 8 cards; 5 players: 7 cards; 6+ players: 6 cards. Deal these cards face down. Only you may look at your population cards.&lt;br /&gt;
# Place the remaining population cards in a face up stack in the middle of the table forming a bank. Players may use the bank to make ‘change’ only when they are forced to lose population.&lt;br /&gt;
# Shuffle the Nuclear War cards and deal 9 face-down to each player. You may examine your cards but not other player’s.&lt;br /&gt;
# Place the remaining Nuclear War cards in a face-down stack in the middle of the table. This is a draw deck.&lt;br /&gt;
# The first player is randomly chosen. Play will proceed clockwise around the table from the first player.&lt;br /&gt;
# The first player examines their cards for any secrets and top secrets. If they have any, they play them. Once the first player has a hand with no secrets, the next player in turn declares and plays secrets. Continue this around the table until no one has any secrets left!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;&#039;&#039;Spies!&#039;&#039;&#039; To play a &#039;&#039;&#039;secret&#039;&#039;&#039; you announce that you have a secret, then give each other player a moment to decide if they want to play a spy. If no one plays a &#039;&#039;&#039;spy&#039;&#039;&#039;, reveal and resolve the secret. Repeat this process every time you play a secret.&lt;br /&gt;
&lt;br /&gt;
7: All players, at the same time, choose and place 1 card facedown in each of the two face-down slots on their playmat. These are the cards that will be played on your first and second turn respectively!&lt;br /&gt;
8: Now you are ready to play! The first player takes the first turn.&lt;br /&gt;
&lt;br /&gt;
== Overview of Gameplay ==&lt;br /&gt;
&lt;br /&gt;
On your turn you will:&lt;br /&gt;
&lt;br /&gt;
* Draw cards until you have 8 in your hand.&lt;br /&gt;
* Play secrets and draw replacement cards until no secrets are in hand.&lt;br /&gt;
* Move the cards on your launch track forward to the next box&lt;br /&gt;
* Place a card into the 2nd face-down slot&lt;br /&gt;
* Reveal the card in the face-up slot and play it.&lt;br /&gt;
&lt;br /&gt;
== War and Peace ==&lt;br /&gt;
&lt;br /&gt;
Nuclear War has two game states - &#039;&#039;&#039;Peacetime&#039;&#039;&#039; and &#039;&#039;&#039;War&#039;&#039;&#039;. The game state affects how some cards work. &lt;br /&gt;
&lt;br /&gt;
The game starts in Peacetime. Once there is a successful launch of a delivery system with a warhead, whether or not the launch results in population loss, the game state changes to War.&lt;br /&gt;
 &lt;br /&gt;
The game state remains in War until one player is eliminated and has performed their final strike (see page 7). At that point, Peacetime begins again… until the next warhead is launched.&lt;br /&gt;
 &lt;br /&gt;
Whenever Peacetime begins all players pick up the face-down cards on their launch track (see below). They then replace those cards with any cards from their hand, including the cards they just picked up. Active delivery systems remain active.&lt;br /&gt;
&lt;br /&gt;
== Components Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Launch Track ===&lt;br /&gt;
&lt;br /&gt;
In Nuclear War, you must plan your moves two turns in advance using the Launch Track.&lt;br /&gt;
&lt;br /&gt;
Your Launch track is three spaces. The face-up space is for the card you are using this turn. The first face-down card is the card you will use next turn, and the second face-down space is the card you will play two turns from now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2nd Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;1st Face Down Card&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;FACE UP CARD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
You may look at facedown cards on your Launch Track whenever you want. You cannot change the order, or discard cards. Once you play a card to your Launch Track it is locked in!&lt;br /&gt;
 &lt;br /&gt;
Your Launch Track may only have delivery systems, warheads, and propaganda cards on it. If you ever reveal a card that is not a delivery system, warhead, or propaganda card, it is discarded without effect. This counts as your turn!&lt;br /&gt;
&lt;br /&gt;
If your launch track is ever empty you must fill it immediately, if you don’t have enough eligible cards in your hand you must fill it on your next turn during the Play a Card step&lt;br /&gt;
&lt;br /&gt;
== Card Types ==&lt;br /&gt;
&lt;br /&gt;
=== Propagandas ===&lt;br /&gt;
&lt;br /&gt;
During Peacetime, propaganda cards are used to steal population from other players (ie, the population defects to your nation). During Wartime, some propaganda cards allow you to draw new cards from the deck.&lt;br /&gt;
&lt;br /&gt;
Whenever you steal population with a propaganda card, if the player doesn’t have enough population to give you, they give all their remaining population, and then they are eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
=== Delivery Systems ===&lt;br /&gt;
&lt;br /&gt;
In order to launch a warhead in Nuclear Destruction, you need to have an appropriate delivery system.&lt;br /&gt;
&lt;br /&gt;
Delivery systems are played in your launch track before a warhead. To launch a warhead, first, you must reveal a delivery system, and in the subsequent turn, reveal a warhead to go with that delivery system. If any card follows a delivery system that isn’t compatible with that delivery system, the delivery system will be discarded.&lt;br /&gt;
 &lt;br /&gt;
There are two main types of delivery systems: bombers and missiles. The two types of delivery systems work slightly differently when they are launched. For resolving a launch, see the Attacking the Enemy section.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;evasion rating&#039;&#039;&#039; on delivery systems determines how vulnerable they are to Anti-Missile cards. The Evasion rating has a letter, either M(Missile) or B(Bomber), and a number. See Anti-Missile cards (below) for details on evading a launch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you shoot down a delivery system with an anti-missile, you play next, skipping all the players between.&lt;br /&gt;
&lt;br /&gt;
==== Missiles ====&lt;br /&gt;
&lt;br /&gt;
Missile delivery systems can carry one warhead up to a maximum megatonnage listed on the card. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; An East Wind-DS31 Missile may carry a single warhead of up to 25 Megatons.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Launching a missile requires playing the missile, and on the next turn, following it with a warhead of an appropriate size. After launching a missile it, and the warhead it carried, are discarded.&lt;br /&gt;
&lt;br /&gt;
==== Bombers ====&lt;br /&gt;
&lt;br /&gt;
Bombers are launched just like missiles: you reveal one and on the next turn reveal a warhead with low enough tonnage to be carried by it. Unlike missiles, a bomber is not discarded after delivering a payload. Instead, a bomber may deliver multiple warheads, each on its own turn, until the total megatonnage of war-heads delivered equals the bomber rating.&lt;br /&gt;
&lt;br /&gt;
Bombers may bomb different enemy powers on different turns, flying over to the offending country. You do not discard a warhead delivered by a bomber. Instead, place the warhead under the bomber with its megatonnage showing so you can keep track of the megatonnage that the bomber has used. You only discard the warheads delivered by a bomber when the bomber is discarded.  If you reveal a warhead that doesn’t fit the bomber, the warhead, the bomber, and all warheads under the bomber, are immediately discarded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; On The first turn, Ed launches the B-58 Bomber, which carries up to 60 mega-tons of warheads. On the next turn, Ed reveals a 20-megaton warhead. After resolving the strike, the 20-megaton warhead is kept with the B-58 Bomber. On the following turn, Ed reveals a 10-megaton warhead, this again is stacked with the bomber after resolving. In the next turn Ed reveals a 40-megaton warhead, this exceeds the bombers max-imum tonnage, and so the bomber along with all three warheads are discarded. The 40-megaton warhead would have no effect.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Warheads ====&lt;br /&gt;
&lt;br /&gt;
Warhead cards are played after a delivery system on the launch track. Warhead cards are rated by megatonnage, and how much population they destroy. The megatonnage is a limit to certain delivery systems, A larger megaton warhead that follows a delivery system not capable of carrying it is discarded along with the delivery system without effect. If the warhead fits on the delivery system played before it, the warhead has successfully launched and can target any other player. See Attacking a Player.&lt;br /&gt;
&lt;br /&gt;
==== Anti Missiles ====&lt;br /&gt;
&lt;br /&gt;
Anti-Missiles are reactive cards. They are played directly out of your hand when another player targets you with a warhead. When a delivery system targets you, you may discard an anti-missile to shoot down the delivery system. All anti-missiles are rated for what they will shoot down. Anti-Missiles have two ratings, one for Bombers (B) and one for Missiles (M). If the rating of the anti-missile is equal to or higher than the evasion rating of the incoming delivery system, the anti-missile can shoot it down.&lt;br /&gt;
&lt;br /&gt;
If you cannot shoot down the incoming delivery system, you may not play an anti-missile. You may not use an anti-missile to help another player. You may only shoot down delivery systems targeting you.&lt;br /&gt;
&lt;br /&gt;
When you successfully use an anti-missile, it becomes your turn, skipping all other players. Play continues clockwise after you have finished your turn.&lt;br /&gt;
&lt;br /&gt;
==== Secrets and Top Secrets ====&lt;br /&gt;
&lt;br /&gt;
Secrets are resolved, one at a time, when drawn, and do not go through the launch track. When drawn, announce you have a secret, as it may be stolen by a Spy. If it isn&#039;t stolen, play it. Each secret is a random event that has an effect on the game. Resolve the text, and then draw a replacement card. If the replacement is also a secret, resolve that one, and draw another replacement, continue to resolve secrets until a non-secret is drawn. If you have more than one secret in your hand, you choose which secret or top secret to resolve first. Top Secrets are resolved the same way as secrets, with the exception you have to announce it is a Top Secret. Top Secrets tend to be more powerful.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECRETS!&#039;&#039;&#039;  Secrets can be good or bad. When you draw a secret it is played before you begin your turn. Remember to give your opponents a chance to steal it before revealing the secret and resolving it!&lt;br /&gt;
&lt;br /&gt;
==== Specials ====&lt;br /&gt;
&lt;br /&gt;
Special cards are cards that are played out of your hand. Each Special explains when it may be played and what it does when you play it.&lt;br /&gt;
&lt;br /&gt;
==== Hybrid Cards ====&lt;br /&gt;
&lt;br /&gt;
Hybrid cards show both a warhead and a delivery system. When a hybrid card is revealed the revealing player decides which option to use.  After choosing which option, the card is considered to be that type until discarded.&lt;br /&gt;
&lt;br /&gt;
== Game Turn in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Draw Cards ===&lt;br /&gt;
&lt;br /&gt;
At the start of your turn, draw cards until you have 8 cards in hand.&lt;br /&gt;
 &lt;br /&gt;
If you have a secret in your hand you must announce you have a secret, and if no Spy steals it, then read it aloud and resolve the effects of the secret. If you draw more than one secret, you must play all of them, but you choose the order you play them. Whenever you play a secret or have it stolen from you, you draw a replacement card.&lt;br /&gt;
 &lt;br /&gt;
=== Play a Card ===&lt;br /&gt;
&lt;br /&gt;
After drawing, slide your cards along the launch track pushing the first face-down card to the face-up card space, and the second face-down card to the first face-down card space. After sliding your cards over, place another card from your hand, face-down, onto the second face-down space.&lt;br /&gt;
&lt;br /&gt;
=== Reveal a Card ===&lt;br /&gt;
&lt;br /&gt;
Reveal and resolve the card in the face-up space. If the card is a propaganda card use the appropriate effect depending on whether it is Peacetime or War.&lt;br /&gt;
 &lt;br /&gt;
If it is a delivery system, place it in your active delivery system space, discarding any delivery system already there.&lt;br /&gt;
&lt;br /&gt;
If it is a warhead,  and there is a delivery system in your active delivery system space that can hold the warhead, congratulations, you’ve launched a nuke!  Place the warhead on the active delivery system and Attack an Enemy! If the game state is Peacetime, it is now War!&lt;br /&gt;
&lt;br /&gt;
If you did not launch a nuke, the next player in turn order takes their turn starting from step 1. If you did, once the attack is resolved – as long as no anti-missiles change whose turn it is – the next player in turn order takes their turn starting from step 1.&lt;br /&gt;
&lt;br /&gt;
=== Attacking the Enemy ===&lt;br /&gt;
&lt;br /&gt;
If you have launched a warhead, choose a target player. Then follow the steps below to resolve the strike:&lt;br /&gt;
&lt;br /&gt;
# The target may use an anti-missile or a Saboteur to shoot down the delivery system or foil the launch. If they do, discard your delivery system and any of your warhead(s) that are face-up. &lt;br /&gt;
# If a launch is stopped by an anti-missile (not a Saboteur) the player that used the anti-missile immediately takes their turn, skipping all the players between the launching player and the target.&lt;br /&gt;
# If the target does not stop the attack, spin the spinner to find out the extra effects of the nuclear strike.&lt;br /&gt;
# You may roll the Nuclear Escalation die. If you do, add the amount rolled to the total population loss. If a Nuclear Cloud is rolled, roll on the malfunction chart.&lt;br /&gt;
&lt;br /&gt;
The target then discards the amount of population equal to the damage dealt by the warhead. The target player may make change from unused population cards if needed. If the target does not have enough population, they are eliminated and they may make a final strike!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent takes 22 Million damage from a warhead, and discards a 25 Million population card, taking a 2 million and a 1 million population card from the unused population cards.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# If the delivery system is a missile, discard the missile and warhead. If it is a bomber, only discard the bomber and warhead(s) if the total megatonnage of warheads on the bomber equals or exceeds its maximum tonnage. &lt;br /&gt;
&lt;br /&gt;
==== Spinner Results ====&lt;br /&gt;
&lt;br /&gt;
===== Radioactive Beta Rays Kill another 5 million. =====&lt;br /&gt;
Add 5 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
===== An additional 1 million are engulfed in the fireball. =====&lt;br /&gt;
Add 1 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
===== Dirty Bomb! Double the Yield. =====&lt;br /&gt;
Double the population loss listed on the warhead. If the warhead is a 200 megaton warhead or larger, the world blows up, spreading nuclear fallout throughout the solar system and everyone loses. Smooth move!&lt;br /&gt;
&lt;br /&gt;
===== No Appreciable Radiation Fallout. =====&lt;br /&gt;
No extra effect, use the amount of population loss listed on the warhead.&lt;br /&gt;
&lt;br /&gt;
===== Explodes a Nuclear Stockpile Triple the Yield. =====&lt;br /&gt;
Triple the population loss listed on the warhead. If the warhead is 100 Megatons or more the world blows up in a massive chain reaction, spreading radioactive fallout throughout the solar system and everyone loses! Welcome to the new asteroid belt.&lt;br /&gt;
&lt;br /&gt;
===== Bomb Shelters Save 2 Million. =====&lt;br /&gt;
Reduce the amount of population loss by 2 million on the warhead. If this results in less than zero loss, treat it as a zero loss.&lt;br /&gt;
&lt;br /&gt;
===== Lethal Doses of Radioactive Gamma Rays Kill Another 10 Million. =====&lt;br /&gt;
Add 10 million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
===== Dud Warhead! (No Effect). =====&lt;br /&gt;
Place the warhead on the delivery system without effect. Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
===== Radioactive Fallout Kills Another 2 Million. =====&lt;br /&gt;
Add 2 Million to the population loss on the warhead.&lt;br /&gt;
&lt;br /&gt;
===== Missile Booster Explodes on Launch (or  Bomber Runs Out of Fuel) =====&lt;br /&gt;
Discard the delivery system and the warhead(s). Your attack ends, it is now the next player’s turn.&lt;br /&gt;
&lt;br /&gt;
==== Nuclear Escalation Die Roll Results ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cloud: Disaster!&#039;&#039;&#039; You have somehow directed this warhead at one of your own cities. You lose the population rather than your target.&lt;br /&gt;
&#039;&#039;&#039;2: Orbital Burst!&#039;&#039;&#039; The warhead goes off in the atmosphere over your country! Discard your delivery system and all face-up warheads on your player mat. You skip your next turn!&lt;br /&gt;
&#039;&#039;&#039;3: Missile Booster Explodes on Launch&#039;&#039;&#039; (or a Bomber Runs out of fuel) Discard the Delivery system and the warhead(s). Your attack ends and it is now the next playerâ€™s turn.&lt;br /&gt;
&#039;&#039;&#039;4: This Warhead is a dud.&#039;&#039;&#039; Place the warhead on its delivery system without effect. Your attack ends and it is the next playerâ€™s turn.&lt;br /&gt;
&#039;&#039;&#039;5: Neutron Bomb! Double the yield.&#039;&#039;&#039; Double the population loss listed on the warhead.&lt;br /&gt;
&#039;&#039;&#039;6: You hit a nuclear power plant.&#039;&#039;&#039; You do double damage, and your opponent misses one turn! Double the population loss listed on the warhead. Remind your opponent to skip their next turn.&lt;br /&gt;
&lt;br /&gt;
=== Player Elimination and Final Strike ===&lt;br /&gt;
&lt;br /&gt;
If you lose all of your population, you have been eliminated from the game. &lt;br /&gt;
&lt;br /&gt;
If you’ve been eliminated through propaganda, you are out of the game, and the other players continue playing the game until there is a winner, or everyone loses.&lt;br /&gt;
&lt;br /&gt;
If you are eliminated through any other means (i.e. secrets, or nuclear attack) you have the option to launch a final strike.  You may play all the cards in your hand and on your launch mat. Combining any eligible warhead with your delivery systems in any way you wish.  Once you have combined all of your eligible delivery systems and warheads, you may launch them at any targets you wish. Resolve them one at a time, just as above.&lt;br /&gt;
&lt;br /&gt;
Anti-missiles will shoot down a final strike target, but it will not stop the rest of your final strike. The same is true for any dud or failed launch from the spinner.&lt;br /&gt;
 &lt;br /&gt;
The player to last play an anti-missile during the final strike will become the next player, otherwise, play continues clockwise. The exception is if another player is eliminated during a final strike, in which case they perform their final strike immediately after the first final strike is finished.&lt;br /&gt;
&lt;br /&gt;
It is possible that a chain reaction of final strikes will &#039;&#039;&#039;eliminate all&#039;&#039;&#039; remaining players. If this happens, everyone loses the game, just like a real nuclear war! Once a player is eliminated and has played their final strike, it becomes Peacetime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039; Trent has been eliminated and is planning out his final strike. He has 3 missiles and a bomber loaded with megatonnage. He looses his bomber on Brittany, who had eliminated him, but Brittany shoots it down with an anti-missile. Trent sighs and decides to send the rest of his missiles against Ed. Ed is eliminated and immediately begins his final strike, ignoring Brittanyâ€™s use of the anti-missile. If everyone left survives Ed&#039;s final strike, then Brittany will begin her turn, unless another player had played an anti-missile.&lt;br /&gt;
&lt;br /&gt;
==== When Peace is Declared... ====&lt;br /&gt;
&lt;br /&gt;
When it becomes Peacetime, you may pick up all your cards on the launch track and replace them with cards from your hand.&lt;br /&gt;
&lt;br /&gt;
=== Winning the Ultimate Victory ===&lt;br /&gt;
&lt;br /&gt;
If, after all final strikes, you are the only remaining player with population, You have “won” the game! Your remaining population will enjoy the nuclear winter that follows and begin to slowly rebuild civilization.&lt;br /&gt;
  &lt;br /&gt;
==== Deterrent Force ====&lt;br /&gt;
&lt;br /&gt;
If you have a powerful weapon in your hand you may wish to display it in order to discourage an enemy attack.  You may, as part of your turn, place one or two cards face up in the deterrent force area as shown on the launch mat. A Saturn missile and a 100-megaton warhead, for example, may cause an enemy to think twice before beginning a nuclear exchange.&lt;br /&gt;
 &lt;br /&gt;
Cards in your deterrent force area remain part of your hand and must be put into play in the same way as any other cards. Any specials or secrets that affect your hand also affect any cards in the deterrent force. You should pick up your deterrents before resolving a secret that affects your hand.&lt;br /&gt;
&lt;br /&gt;
== Optional Rules ==&lt;br /&gt;
&lt;br /&gt;
=== More people! ===&lt;br /&gt;
&lt;br /&gt;
Before dealing starting populations, give each player one 25 million population card. Then deal one less population card to all the players.&lt;br /&gt;
&lt;br /&gt;
=== Not so secretive! ===&lt;br /&gt;
&lt;br /&gt;
If a player has more than two secrets dealt to them at the beginning, randomly choose two of them, return the rest to the bottom of the deck and draw replacements. If more secrets are drawn they are also put at the bottom of the deck and replaced.&lt;br /&gt;
&lt;br /&gt;
=== Bombers aren’t quite as fast as Missiles! ===&lt;br /&gt;
&lt;br /&gt;
When launching a Bomber you must target a player sitting next to you. After targeting that player you may fly to the player sitting next to the current target or stay on the current target with the next warhead the bomber carries.  During a Final Strike, a bomber must target only one player.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28728</id>
		<title>Gamehelpformulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28728"/>
		<updated>2026-03-02T21:29:12Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* BGA Rule Variations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 10-Second Explainer of Formula D =&lt;br /&gt;
New to Formula D?&lt;br /&gt;
&lt;br /&gt;
This 10-second explainer will get you started:&lt;br /&gt;
&lt;br /&gt;
# Your car will start in 1st gear.&lt;br /&gt;
# At the start of your turn, your first decision is whether to stay on your current gear, or go up 1 gear or go down 1 gear. &lt;br /&gt;
# You can go down 1 gear without penalty, or &amp;quot;skip&amp;quot; up to 3 gears at the cost of wear points. You may only go up by 1 gear per turn.&lt;br /&gt;
# After choosing a gear, you will roll the appropriate &amp;quot;gear die&amp;quot;. The higher the gear, the bigger the die, as well as the farther you go.&lt;br /&gt;
# Once you have rolled, you must move the number of spaces rolled, although you may choose which lane you take.&lt;br /&gt;
# Corners are areas marked in red. To drive around corners without penalty, you must finish at least 1 turn in them.&lt;br /&gt;
# Some corners are particularly slow and may require that you finish at least 2 or even 3 turns in them.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! There&#039;s a lot more to it than that, but this covers the absolute basics of driving safely around the track.&lt;br /&gt;
&lt;br /&gt;
= Important: BGA Rule Variations =&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
[[#BGA Rule Variations|At the end of these rules]], you will find a list of all differences from the published game rules.&lt;br /&gt;
&lt;br /&gt;
=Adaptation Notes/Common Mistakes=&lt;br /&gt;
&lt;br /&gt;
# The body of your car is the colour of the pit box you are using (or your team&#039;s color if playing a team game)&lt;br /&gt;
# Your sidepods are your personal color&lt;br /&gt;
# To enter the pitbox, you must move out of the pit lane and onto the coloured pit box. Stopping in the pit lane in front of your box is not a pit stop.&lt;br /&gt;
# To zoom the circuit in and out with a mouse, use Ctrl+Wheel mouse.&lt;br /&gt;
&lt;br /&gt;
=Basic Rules=&lt;br /&gt;
&lt;br /&gt;
== (Basic Rules) Aim of the game ==&lt;br /&gt;
&lt;br /&gt;
FORMULA D is a car race. The aim is to win a race (of one, two, or three laps) and be the first to cross the finishing line. There are all sorts of risks involved and you have to anticipate what will happen during the course of the race. You must decide on your strategy, trust to luck, keep to the rules and always keep an eye on the technical condition of your car.&lt;br /&gt;
&lt;br /&gt;
== (Basic Rules) The gears ==&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears. Each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and farther the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2 or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this. You cannot go from 6th gear to 1st.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Color||Die||Movement (Number of spaces)&lt;br /&gt;
!Face distribution&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|2,3,3,4,4,4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|4,5,6,6,7,7,8,8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|2 of each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== (Basic Rules) Driving ==&lt;br /&gt;
&lt;br /&gt;
As in real life the car starts in 1st gear. Then you shift up to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is especially important in the corners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Order of play&#039;&#039;&#039;: In each round the drivers play according to their car position on the track, with the current gear deciding tie-breakers, and the first one there is the final decider.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Driving Code ==&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Driving code in the corners ===&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated in the corner information box) within the limits of the corner. The number of filled red circles indicates the number of stops for that corner. After the requisite number of stops, the car may safely exit the corner, without penalty, on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refers to the longest path, the number in the red box refers to the shortest path. Refer to these when deciding the gear you enter the corner in.&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Driving code on the straights ===&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible. (ex. You can&#039;t fishtail back and forth between the inside and outside edges)&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Wear points (WP) ==&lt;br /&gt;
&lt;br /&gt;
They reflect the capability of the car to stay on the track and survive events during the race. In the Basic Game, each car has 18 WP at the beginning of the race. The players use these points to survive various incidents and risky maneuvers. In the advanced game, they are divided up into different categories that are used in different situations.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Preparation for play ==&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Start formation ===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. In the case of a tie, all &#039;&#039;&#039;involved&#039;&#039;&#039; players re-roll the die.&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Start ===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: 1 – poor start&#039;&#039;&#039;. The player has stalled the motor of their car. They cannot engage 1st gear and so they have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 2 and 16&#039;&#039;&#039; – normal start. The player can start normally. They roll the die for 1st gear and move their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 17 and 20&#039;&#039;&#039; – great start! The player makes a fantastic start. They move their car forward 4 spaces immediately, although they are still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
==(Basic Rules) Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, it cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their WP at any time to avoid having to advance the full number of spaces shown on the die. In this way they can control their progress better, for example when the lanes are blocked by other cars.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Changing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox. The number of gears skipped equates to the number of WP their car loses as a result. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a number between 1 and 4 their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Two-lap race==&lt;br /&gt;
&lt;br /&gt;
For players who have already played several single-lap games.&lt;br /&gt;
&lt;br /&gt;
Whoever crosses the finishing line first after two laps wins the game. Players may make a pit stop between the first and second laps to regain the WP points they lost during the first round.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap a player may decide to make a pit stop to regain all the WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one’s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the colour of your car&#039;s central strip.&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Entering pits===&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is sufficient to roll the minimum number required or higher using the die corresponding to the selected gear. The car receives all 18 WP back and awaits their next turn to start from the pits in 4th gear (maximum).&lt;br /&gt;
&lt;br /&gt;
The rules for changing down gear, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
There are minimum gears required in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
=Advanced Rules=&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) The gears===&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears, each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2, or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Die Color||Die Size||Movement (Number of spaces)&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Driving===&lt;br /&gt;
&lt;br /&gt;
As in real life, the car starts in 1st gear. Then you upshift to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is especially important in the corners.&lt;br /&gt;
&lt;br /&gt;
====(Advanced Rules) Order of play====&lt;br /&gt;
&lt;br /&gt;
In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====(Advanced Rules)  Same position====&lt;br /&gt;
&lt;br /&gt;
If two cars on the track are level with each other, the driver with the highest gear plays first.&lt;br /&gt;
&lt;br /&gt;
If both cars are in the same gear, the car that arrived first at their current space plays first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Driving Code===&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
====(Advanced Rules) Driving code in the corners====&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated by the number of red stop lights in the corner information box) within the limits of the corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refers to the longest path, the number in the red box refers to the shortest path. Refer to these numbers when considering what gear to enter the corner in.&lt;br /&gt;
&lt;br /&gt;
====(Advanced Rules) Driving code on the straights====&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Wear points (WP)===&lt;br /&gt;
&lt;br /&gt;
Wear Points reflect the ability of the car to stay on the track and survive events during the race. Each car has a certain number of WP at the beginning of the race, which are divided up between six different categories. These points are distributed as follows in the game for advanced players:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|WP tires:||6&lt;br /&gt;
|-&lt;br /&gt;
|WP brakes:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP gearbox:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP car body:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP engine:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP road handling:||2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Preparation for play==&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Start formation===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. (In the case of a tie, all concerned players re-roll the die.)&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Start===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
====Number rolled, 1 - poor start====&lt;br /&gt;
&lt;br /&gt;
The player has stalled the motor of their car. They cannot engage 1st gear and so have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: between 2 and 19 - normal start====&lt;br /&gt;
&lt;br /&gt;
The player can start normally. They roll the die for 1st gear and move their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: 20 - great start!====&lt;br /&gt;
&lt;br /&gt;
The player makes a fantastic start. They move their car forward 4 spaces immediately, although they are still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s tire WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, it cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
When a car loses their last tire WP by overshooting a corner, they spin round in a circle. The car is placed on the space where their move ended, pointing backwards. The player must turn their car round again and drive off in 1st gear when it is their next turn. In this adaptation, their Tire WPs are reset to 1.&lt;br /&gt;
&lt;br /&gt;
If a car loses more tire WP than it possesses, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their brake WP at any time to avoid having to advance the full number of spaces shown on the die. This can help to prevent losing tire WP if they would otherwise overshoot a corner.&lt;br /&gt;
&lt;br /&gt;
A driver can find themselves blocked by one or more cars which they are unable to overtake. After the driver has moved their car forward as many spaces as possible, they count how many spaces they would have moved if they had not been blocked.&lt;br /&gt;
&lt;br /&gt;
If the number of spaces short of the full number is 4 or greater, they may use Emergency Braking. In this case, their first 3 spaces must be paid for with Brake WP. Each additional space after that may be paid by either Brake or Tire WP.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
If a car doesn&#039;t have enough brake WP and tire WP to stop before a blockage, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Gearing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox.&lt;br /&gt;
&lt;br /&gt;
As a result, the car then loses a certain number of brake WP, engine WP and gearbox WP. The table below lists the corresponding wear. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gears skipped!!Gearbox WP!!Brake WP!!Engine WP&lt;br /&gt;
|-&lt;br /&gt;
|1 gear||1||0||0&lt;br /&gt;
|-&lt;br /&gt;
|2 gears||1||1||0&lt;br /&gt;
|-&lt;br /&gt;
|3 gears||1||1||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a car has no gearbox WP left, the driver can only change down one gear at a time until the game is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a 1, their car loses 1 Car Body WP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In this adaptation&#039;&#039;&#039; the car that did not just move rolls first. If it fails the roll and is eliminated from the race as a result, the car that moved will automatically fail its roll.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last car body WP, it is eliminated&#039;&#039;&#039; from the race.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 engine WP.&lt;br /&gt;
&lt;br /&gt;
If a car loses its last engine WP, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Damage and road handling==&lt;br /&gt;
&lt;br /&gt;
Each time a car loses a car body WP or an engine WP, a damage marker is placed on the space where the move ended.&lt;br /&gt;
&lt;br /&gt;
The same applies whenever a car is eliminated from the race for whatever reason. These spaces are judged to be &amp;quot;dangerous&amp;quot; from then on.&lt;br /&gt;
&lt;br /&gt;
If a car passes over one of these spaces or lands on it, the driver must roll the black die. If the result is between 1 and 4, the car loses one road handling WP. The dangerous spaces can be avoided by changing lanes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last road handling WP, it is eliminated from the race.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If a car drives in the wake of another car, this is called slipstreaming.&lt;br /&gt;
&lt;br /&gt;
For the two concerned drivers, slipstreaming is possible from the 4th gear on.&lt;br /&gt;
&lt;br /&gt;
The car must be driving as fast or faster than the car in front.&lt;br /&gt;
&lt;br /&gt;
If a car wants to profit from slipstreaming after moving, it has to stop directly behind another car. From this position they can then add 3 spaces onto their last move. They can move forward 3 spaces in the following way:&lt;br /&gt;
&lt;br /&gt;
*change a lane, overtake the car in front and return to the original lane.&lt;br /&gt;
*change a lane and move two spaces in a straight line.&lt;br /&gt;
*change two lanes and move one space in a straight line.&lt;br /&gt;
&lt;br /&gt;
The player must move a total of three spaces in any case. (However, the driver may use brake WP in order to reduce this number of spaces.) If slipstreaming brings a car up immediately behind another car, they can carry on slipstreaming (and so on).&lt;br /&gt;
&lt;br /&gt;
If a car is carried into a corner by slipstreaming, they lose a brake WP (without the number of spaces being reduced).&lt;br /&gt;
&lt;br /&gt;
In a corner, a slipstreaming car must follow normal driving code (eg. following the arrows).&lt;br /&gt;
&lt;br /&gt;
Braking in order to take advantage of slipstreaming in the wake of another player&#039;s car is not allowed.&lt;br /&gt;
&lt;br /&gt;
Drivers do not have to slipstream!&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap, a player may decide to make a pit stop to regain all the tire WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one&#039;s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the central colour of your car.&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is necessary to roll the minimum number required or higher using the die corresponding to the selected gear. As soon as the car enters the pits, it receives all its tire WP back. The player now rolls the black die, in order to see how fast their mechanics work.&lt;br /&gt;
&lt;br /&gt;
===Result between 1 and 10: quick pit stop===&lt;br /&gt;
&lt;br /&gt;
The player divides the number shown on the black die by two (rounding it up if necessary). The result is the number of spaces the car is allowed to move when the car leaves the pit in 4th gear.&lt;br /&gt;
&lt;br /&gt;
===Result between 11 and 20: slow pit stop===&lt;br /&gt;
&lt;br /&gt;
The car remains in the pit until the next round. Then the car moves on in 4th gear (or a lower gear).&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=(Advanced Rules) Optional Rules=&lt;br /&gt;
&lt;br /&gt;
All the following rules can be used independently of one another.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Construction of one&#039;s own car==&lt;br /&gt;
&lt;br /&gt;
Every player can distribute their 20 WP between the zones of their car at their own discretion. At least 1 WP must be assigned to each zone.&lt;br /&gt;
&lt;br /&gt;
If using the Technical Pit Stops option, 2 additional WPs are available to assign, and players may assign 0-2 points to Repair points.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Qualifying lap with a stopwatch==&lt;br /&gt;
&lt;br /&gt;
All players drive a qualifying lap with stopwatch consecutively, in order to determine their start positions. The rules for moves and driving code remain unchanged during the qualifier, however the WP are not taken into account. The only exception is if a car overshoots a corner - this is penalized.&lt;br /&gt;
&lt;br /&gt;
* The player whose turn it is to drive a qualifying lap places their car in the middle lane in front of the starting line.&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
* The player receives a total number of points over their lap: &lt;br /&gt;
**1 point for each round the player takes to complete the lap&lt;br /&gt;
**1 point for each space the player overshoots a corner by (soft tires will have their points doubled)&lt;br /&gt;
**1 point for every full real-time minute it takes the player to complete the lap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The qualifying lap is over if the driver does not stop at all in corners where two or three stops are required. They then have to start the race at the back of the field from the last start position.&lt;br /&gt;
&lt;br /&gt;
After that the order of starting is determined: the car which has completed the qualifying lap with the fewest points takes first position. The other cars follow on in decreasing order of points. If two drivers have the same number of points, the real time taken to complete the lap decides: the fastest player gets the better start position.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Weather Conditions ==&lt;br /&gt;
&lt;br /&gt;
There is a weather chart for each &amp;quot;Formula D&amp;quot; racing circuit, which is available to all players before the game so that they can inform themselves about weather conditions during the race and qualifying laps.&lt;br /&gt;
&lt;br /&gt;
If the weather rules are used, it is strongly recommended that the tire selection rules be used as well.&lt;br /&gt;
&lt;br /&gt;
Before the qualifying laps begin, the black die is rolled and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039; no problems for the drivers.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: no problems for drivers, treat as good weather for the qualifying lap.&lt;br /&gt;
&#039;&#039;&#039;Rain&#039;&#039;&#039;: The qualifying laps for all players take place in rain (see below).&lt;br /&gt;
&lt;br /&gt;
Before the actual race begins, the black die is rolled again and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039;: no problem.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: The sky is overcast at the beginning of the race, but it does not rain &#039;&#039;&#039;unless&#039;&#039;&#039; it rained during qualifying. Either way, this can change during the course of the race. Whenever a player in 5th gear throws a 20 or a 30 in 6th gear, at the end of the round they have to roll the black die and consult the weather chart:&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;good weather&amp;quot; comes up, the weather conditions are shifted one line upwards.&lt;br /&gt;
If &amp;quot;rain&amp;quot; is the result, the weather conditions are shifted one line downwards.&lt;br /&gt;
If the result is &amp;quot;changeable&amp;quot;, the weather stays the same.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Weather&#039;&#039;&#039;||&#039;&#039;&#039;Effect on race&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Good||None. The weather will no longer change.&lt;br /&gt;
|-&lt;br /&gt;
|Good (Temporary)||None.&lt;br /&gt;
|-&lt;br /&gt;
|Changeable||This is the starting step and once the weather conditions shift up or down off Changeable, it will be skipped for the rest of the game.&lt;br /&gt;
|-&lt;br /&gt;
|Rain (Temporary)||Rain.&lt;br /&gt;
|-&lt;br /&gt;
|Rain||Rain. The weather will no longer change.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effect of rain ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Collision&#039;&#039;&#039;: A result of 1 or 2 (instead of just a 1, as in good weather) means a collision occurs.&lt;br /&gt;
* &#039;&#039;&#039;Engine damage&#039;&#039;&#039;: Occurs when result is between 1 and 3 (instead of between 1 and 4, as in good weather).&lt;br /&gt;
* &#039;&#039;&#039;Road handling&#039;&#039;&#039;: The car loses one road handling WP for a result between 1 and 5 (instead of between 1 and 4, as in good weather)&lt;br /&gt;
* &#039;&#039;&#039;Skidding on corners&#039;&#039;&#039;: Cars will skid on corners depending on their tire selection. See &amp;quot;Selection of tires&amp;quot;, below.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules)  Selection of tires ==&lt;br /&gt;
&lt;br /&gt;
The choice of tires is crucial not just for qualifying lap, but for the race itself. When weather conditions have been determined, each player can fit their car with special tires (see below). It is also possible to change tires between qualifying lap and the race.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hard Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient on a wet track.&lt;br /&gt;
&lt;br /&gt;
* The game rules apply unchanged if the weather is good or changeable.&lt;br /&gt;
* If it is raining, the car moves three additional spaces on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
=== Soft Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient - if not handicapping - on a wet track.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the car can move one additional space during each move in the qualifying or race laps. This additional move is not compulsory. But if a car overshoots a corner, the penalty is doubled (loss of tire WP). If a driver does not change their tires during a pit stop after the first lap, they lose the bonus. If a driver does not change their tires during a pit stop after the second lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
* If it is raining, the car travels three spaces further on any turn which contributes to advancing a corner. If a driver does not change their tires during a pit stop before beginning the third lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
=== Rain Tires ===&lt;br /&gt;
&lt;br /&gt;
They are highly recommended if it is raining, but are otherwise very sensitive.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the penalties for overshooting a corner are doubled (loss of tire WP) for qualifying and the first two laps of the race. If a driver does not change their tires before the third race lap, the&lt;br /&gt;
penalties are trebled.&lt;br /&gt;
* If it is raining, the car travels one space further on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules)  Technical Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
Your pit has 2 WP which can be used during the race to regain lost WP (with the exception of tire WP). Every time a driver makes a pit stop they can choose between two options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tire pit stop&#039;&#039;&#039;: As in the rules for advanced players, except that the driver may change the type of tire whenever they change tires.&lt;br /&gt;
* &#039;&#039;&#039;Technical pit stop&#039;&#039;&#039;: The driver can change their tires (see above) and in addition regain up to two WP in one or two zones (except the tires). This &amp;quot;reservoir&amp;quot; of 2 WP applies for the entire duration of the race, even if it lasts for more than two laps. In the next round, the car may not start higher than 4th gear. A car with soft tires does not profit from the bonus of an additional space when leaving the pits.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules)  Team Race ==&lt;br /&gt;
&lt;br /&gt;
A game using these rules is appropriate for a large group with an even number of players. The players form teams each with two players; each colour corresponds to a racing team. Apart from the following two exceptions, the rules apply unchanged:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Pit stop&#039;&#039;&#039;: Each team has 4 WP to repair the cars. Both players must decide together how they want to use these points.&lt;br /&gt;
* &#039;&#039;&#039;Winner by points&#039;&#039;&#039;: A team race is not necessarily won by the first car to cross the finishing line. Each car receives a certain number of winning points. The team with the highest number of total points wins the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000&lt;br /&gt;
|-&lt;br /&gt;
|2||720&lt;br /&gt;
|-&lt;br /&gt;
|3||600&lt;br /&gt;
|-&lt;br /&gt;
|4||480&lt;br /&gt;
|-&lt;br /&gt;
|5||400&lt;br /&gt;
|-&lt;br /&gt;
|6||320&lt;br /&gt;
|-&lt;br /&gt;
|7||240&lt;br /&gt;
|-&lt;br /&gt;
|8||160&lt;br /&gt;
|-&lt;br /&gt;
|9||80&lt;br /&gt;
|-&lt;br /&gt;
|10||40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that these points differ from the published rules. If qualifying is enabled, qualifying points are also awarded equally to both members of the team.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules)  Nitro Fuel ==&lt;br /&gt;
&lt;br /&gt;
When this option is chosen, all cars have a Nitro Fuel injection, which allows instant acceleration. Players can use their nitro once a lap after rolling the corresponding gear die. They receive a movement bonus according to the gear they are using at that moment (1 space in 1st gear, 2 spaces in 2nd gear, etc.). This bonus must be used completely.&lt;br /&gt;
&lt;br /&gt;
When a car pits, or crosses the finish line at the end of a lap, it replenishes its nitro fuel and may use it again.&lt;br /&gt;
&lt;br /&gt;
Nitro may only be used if it is available when rolling the gear die. It does not become available during the same move where you complete a lap.&lt;br /&gt;
&lt;br /&gt;
= BGA Rule Variations=&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
The differences from the rules you will find in your own copy of Formula D are:&lt;br /&gt;
&lt;br /&gt;
==Round Order ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, if two cars are level with each other, the driver with the highest gear plays first. If both cars are in the same gear, the car nearest the inside with reference to the next (or the current) corner plays first.&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the higher gear continues to be first but if both cars are in the same gear *then the player who first arrived at their space* goes first. Corners no longer affect who goes first.&lt;br /&gt;
&lt;br /&gt;
==Points ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, points are awarded for race completion &#039;&#039;&#039;and&#039;&#039;&#039; for Qualifying (if enabled). The Qualifying points are minor by comparison and serve as a tie-break if two players are both eliminated and score 0 in the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;&#039;||&#039;&#039;&#039;Race Points&#039;&#039;&#039;||&#039;&#039;&#039;Qualifying Points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000||10&lt;br /&gt;
|-&lt;br /&gt;
|2||720||9&lt;br /&gt;
|-&lt;br /&gt;
|3||600||8&lt;br /&gt;
|-&lt;br /&gt;
|4||480||7&lt;br /&gt;
|-&lt;br /&gt;
|5||400||6&lt;br /&gt;
|-&lt;br /&gt;
|6||320||5&lt;br /&gt;
|-&lt;br /&gt;
|7||240||4&lt;br /&gt;
|-&lt;br /&gt;
|8||160||3&lt;br /&gt;
|-&lt;br /&gt;
|9||80||2&lt;br /&gt;
|-&lt;br /&gt;
|10||40||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To cover multiple players being eliminated during a game where there is no Qualifying, their distance travelled before being eliminated is used as the final tie-break (only in non-team games). If a player overshoots a corner or crashes into the back of other cars, their position at the &#039;&#039;&#039;start&#039;&#039;&#039; of the turn is used.&lt;br /&gt;
&lt;br /&gt;
==Braking ==&lt;br /&gt;
&lt;br /&gt;
The original rules provide a table that describes the outcome of &amp;quot;Emergency Braking&amp;quot; (when a car is blocked by one or more cars which they are unable to overtake). The table does not take Constructed Cars into account, so to clarify, the implemented rules are:&lt;br /&gt;
&lt;br /&gt;
If a player performs Emergency Braking, they must move their car forward as many spaces as possible. If they need to brake more than 3 spaces, they are required to use Brake WPs for the first 3 spaces, and each subsequent space may be paid for using Brake WP *or* Tire WPs.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
==Qualifying ==&lt;br /&gt;
&lt;br /&gt;
Players do not roll the black starting die at the beginning of Qualifying: they just start in 1st gear.&lt;br /&gt;
&lt;br /&gt;
The original rules simply state that &amp;quot;WP are not taken into account&amp;quot; during qualifying. However, the effect of this is clarified in this adaptation:&lt;br /&gt;
&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
&lt;br /&gt;
In this version, Qualifying awards points as long as you complete your lap:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||10&lt;br /&gt;
|-&lt;br /&gt;
|2||9&lt;br /&gt;
|-&lt;br /&gt;
|3||8&lt;br /&gt;
|-&lt;br /&gt;
|4||7&lt;br /&gt;
|-&lt;br /&gt;
|5||6&lt;br /&gt;
|-&lt;br /&gt;
|6||5&lt;br /&gt;
|-&lt;br /&gt;
|7||4&lt;br /&gt;
|-&lt;br /&gt;
|8||3&lt;br /&gt;
|-&lt;br /&gt;
|9||2&lt;br /&gt;
|-&lt;br /&gt;
|10||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Collision Checks ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the active player checks for collisions only after all adjacent players have rolled. If an adjacent player fails their roll and is eliminated as a result, the active player will automatically fail their roll against that player.&lt;br /&gt;
&lt;br /&gt;
==Weather Options==&lt;br /&gt;
&lt;br /&gt;
When setting up a game with Advanced rules, you have 4 choices for the weather.&lt;br /&gt;
&lt;br /&gt;
===Roll for Weather===&lt;br /&gt;
&lt;br /&gt;
This is the normal approach when using the weather rules: at the start of the race (and, separately, at the start of Qualify if it&#039;s been enabled) the Weather die is rolled to determine whether the race&#039;s weather will be Good (for the entire race) or Rain (for the entire race) or Changeable.&lt;br /&gt;
&lt;br /&gt;
===Good Weather===&lt;br /&gt;
&lt;br /&gt;
This option skips the opening Weather roll and the race plays with permanent Good weather.&lt;br /&gt;
&lt;br /&gt;
===Rain===&lt;br /&gt;
&lt;br /&gt;
This option skips the opening Weather roll and the race players with permanent Rain.&lt;br /&gt;
&lt;br /&gt;
===Start Changeable===&lt;br /&gt;
&lt;br /&gt;
This option skips the opening Weather roll and treats it as if &amp;quot;Changeable&amp;quot; had been rolled. However the Weather die is rolled to see if the weather starts in Rain. On a Rain result it does, on &amp;quot;Good&amp;quot; or &amp;quot;Changeable&amp;quot; the weather starts good, but either way it is changeable.&lt;br /&gt;
&lt;br /&gt;
==Qualifying Weather Options==&lt;br /&gt;
&lt;br /&gt;
When Qualifying is enabled, you may choose the weather option for it.&lt;br /&gt;
&lt;br /&gt;
===Same as Race===&lt;br /&gt;
&lt;br /&gt;
This is the default. The same setting that is used for &amp;quot;Race Weather&amp;quot; is also used for Qualifying. Note that although the setting is the same, the outcome can be different when &amp;quot;Roll for Weather&amp;quot; is being used.&lt;br /&gt;
&lt;br /&gt;
===Random Weather===&lt;br /&gt;
&lt;br /&gt;
The weather will be randomly chosen before Qualifying. It will NOT be changeable and will be the same outcome (Rain or Good) for all players.&lt;br /&gt;
&lt;br /&gt;
===Good Weather===&lt;br /&gt;
&lt;br /&gt;
Qualifying will be in good weather for all players.&lt;br /&gt;
&lt;br /&gt;
===Rain===&lt;br /&gt;
&lt;br /&gt;
Qualifying will be in rain for all players.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Weather Rolls ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, the Weather die is thrown immediately when a player rolls the maximum number in 5th or 6th gear. In this adaptation, this roll still occurs but it is deferred until the end of the round. This way, weather can only change between rounds and not in the middle of a player&#039;s turn. If multiple players roll the maximum number, the weather die will be rolled multiple times.&lt;br /&gt;
&lt;br /&gt;
==Changeable Weather ==&lt;br /&gt;
&lt;br /&gt;
The original rules have 4 steps for Changeable Weather:&lt;br /&gt;
* Good&lt;br /&gt;
* Good - Changeable&lt;br /&gt;
* Rain - Changeable&lt;br /&gt;
* Rain&lt;br /&gt;
&lt;br /&gt;
In this adaptation, there are 5 steps:&lt;br /&gt;
* Good&lt;br /&gt;
* Good - Temporary&lt;br /&gt;
* Changeable&lt;br /&gt;
* Rain - Temporary&lt;br /&gt;
* Rain&lt;br /&gt;
&lt;br /&gt;
Changeable is only ever used at the start of a race, and by default is Good - with one exception: if it rained in qualifying then a changeable feature race will start Changeable but raining.&lt;br /&gt;
&lt;br /&gt;
Weather will never be changeable in qualifying: it will be Good unless Rain is rolled.&lt;br /&gt;
&lt;br /&gt;
==Spinning ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that if a car on 0 Tire WP overshoots a corner then it &amp;quot;will again spin round in a circle. If the car overshoots the corner by more than one space, it is out of the race&amp;quot;. In this adaptation, a car with 0 Tire WP is eliminated if it overshoots a corner by more than 1 WP. Hence, even a single space overshoot will eliminate a 0 Tire WP car on soft tires.&lt;br /&gt;
&lt;br /&gt;
Additionally, in this adaptation when you spin, your Tire WP are reset to 1 WP (instead of remaining at 0 WP).&lt;br /&gt;
&lt;br /&gt;
==Skidding on Corners in the Rain ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that cars will skid in the rain &amp;quot;provided at least one space of the move lies within the limits of a corner&amp;quot;. In this adaptation, skidding will only occur on any turn that counts towards a corner&#039;s completion. That means:&lt;br /&gt;
&lt;br /&gt;
* Driving through a corner that you have already completed will &#039;&#039;not&#039;&#039; cause you to skid&lt;br /&gt;
* If you are on the final space in a corner and still need to land in it 1 more turn, you will skid on your next move even though you are driving into a straight&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Motor Damage Checks==&lt;br /&gt;
&lt;br /&gt;
Motor damage checks are always performed in round order.&lt;br /&gt;
&lt;br /&gt;
==Braking in the Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that the rules for braking do not apply in the pit lane. In this adaptation, there is no braking cost for stopping immediately behind another car, or in your pit box. However, there is a brake cost for travelling any distance shorter than that.&lt;br /&gt;
&lt;br /&gt;
== Pit Boxes ==&lt;br /&gt;
&lt;br /&gt;
In Individual Driver games, a single pit box will be reserved for each driver instead of drivers being assigned a pit box color. The box will be indicated with the player&#039;s avatar.&lt;br /&gt;
&lt;br /&gt;
== Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down DO apply in the pit lane.&lt;br /&gt;
&lt;br /&gt;
There are also minimum gears that may be used in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
== Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
The soft tire bonus may not be used when moving after a Quick Pit Stop.&lt;br /&gt;
&lt;br /&gt;
If Technical Pit Stops are enabled, players may always choose to take one (and thus finish their turn) even if they have no repair points or repairs to perform.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, if players have selected the option to Construct their own car then there are no limits to how many points they may assign to any given area.&lt;br /&gt;
&lt;br /&gt;
In games that have also selected the Technical Pit Stop rules, then instead of having a fixed 2 WPs available for Pit repairs, a player will have 22 WPs to use in Construction and can choose how many repair points to make available, with a maximum of 2.&lt;br /&gt;
&lt;br /&gt;
==Road Races ==&lt;br /&gt;
&lt;br /&gt;
The Road Race rules, including Drivers with special abilities, are not used.&lt;br /&gt;
&lt;br /&gt;
Where Road Race circuits are used, all non-standard rules are ignored.&lt;br /&gt;
&lt;br /&gt;
Nitro Fuel Injection is available as an option for all races.&lt;br /&gt;
&lt;br /&gt;
==Nitro Fuel==&lt;br /&gt;
&lt;br /&gt;
The original rules are imprecise about when nitro fuel replenishes when pitting.&lt;br /&gt;
&lt;br /&gt;
To clarify, nitro fuel replenishes when:&lt;br /&gt;
&lt;br /&gt;
* You cross the finish line (if not pitting), or&lt;br /&gt;
* When you actually pit&lt;br /&gt;
&lt;br /&gt;
Note that when going through the pit lane, your lap number does not increase until further down the pit lane than your pit box, but your nitro fuel is replenished in your pit box, not when your lap number increases.&lt;br /&gt;
&lt;br /&gt;
==Elimination ==&lt;br /&gt;
&lt;br /&gt;
When a player is eliminated, the outcome is slightly different from the published rules. &lt;br /&gt;
&lt;br /&gt;
*If the elimination was caused by the player overshooting corners, or driving over a damage marker, or quitting, the car is immediately removed from the board and &#039;&#039;&#039;no damage marker is placed&#039;&#039;&#039;&lt;br /&gt;
*If the elimination was caused by the player failing a motor damage test, the car is immediately removed from the board and a damage marker is added.&lt;br /&gt;
*If the player is eliminated by any other reason, a damage marker is added and the car remains on the board until the end of the round, when it is removed.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28439</id>
		<title>Gamehelpformulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28439"/>
		<updated>2026-02-09T22:36:11Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 10-Second Explainer of Formula D =&lt;br /&gt;
New to Formula D?&lt;br /&gt;
&lt;br /&gt;
This 10-second explainer will get you started:&lt;br /&gt;
&lt;br /&gt;
# Your car will start in 1st gear.&lt;br /&gt;
# At the start of your turn, your first decision is whether to stay on your current gear, or go up 1 gear or go down 1 gear. &lt;br /&gt;
# You can go down 1 gear without penalty, or &amp;quot;skip&amp;quot; up to 3 gears at the cost of wear points. You may only go up by 1 gear per turn.&lt;br /&gt;
# After choosing a gear, you will roll the appropriate &amp;quot;gear die&amp;quot;. The higher the gear, the bigger the die, as well as the farther you go.&lt;br /&gt;
# Once you have rolled, you must move the number of spaces rolled, although you may choose which lane you take.&lt;br /&gt;
# Corners are areas marked in red. To drive around corners without penalty, you must finish at least 1 turn in them.&lt;br /&gt;
# Some corners are particularly slow and may require that you finish at least 2 or even 3 turns in them.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! There&#039;s a lot more to it than that, but this covers the absolute basics of driving safely around the track.&lt;br /&gt;
&lt;br /&gt;
= Important: BGA Rule Variations =&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
[[#BGA Rule Variations|At the end of these rules]], you will find a list of all differences from the published game rules.&lt;br /&gt;
&lt;br /&gt;
=Adaptation Notes/Common Mistakes=&lt;br /&gt;
&lt;br /&gt;
# The body of your car is the colour of the pit box you are using (or your team&#039;s color if playing a team game)&lt;br /&gt;
# Your sidepods are your personal color&lt;br /&gt;
# To enter the pitbox, you must move out of the pit lane and onto the coloured pit box. Stopping in the pit lane in front of your box is not a pit stop.&lt;br /&gt;
# To zoom the circuit in and out with a mouse, use Ctrl+Wheel mouse.&lt;br /&gt;
&lt;br /&gt;
=Basic Rules=&lt;br /&gt;
&lt;br /&gt;
== (Basic Rules) Aim of the game ==&lt;br /&gt;
&lt;br /&gt;
FORMULA D is a car race. The aim is to win a race (of one, two, or three laps) and be the first to cross the finishing line. There are all sorts of risks involved and you have to anticipate what will happen during the course of the race. You must decide on your strategy, trust to luck, keep to the rules and always keep an eye on the technical condition of your car.&lt;br /&gt;
&lt;br /&gt;
== (Basic Rules) The gears ==&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears. Each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and farther the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2 or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this. You cannot go from 6th gear to 1st.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Color||Die||Movement (Number of spaces)&lt;br /&gt;
!Face distribution&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|2,3,3,4,4,4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|4,5,6,6,7,7,8,8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|2 of each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== (Basic Rules) Driving ==&lt;br /&gt;
&lt;br /&gt;
As in real life the car starts in 1st gear. Then you shift up to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is especially important in the corners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Order of play&#039;&#039;&#039;: In each round the drivers play according to their car position on the track, with the current gear deciding tie-breakers, and the first one there is the final decider.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Driving Code ==&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Driving code in the corners ===&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated in the corner information box) within the limits of the corner. The number of filled red circles indicates the number of stops for that corner. After the requisite number of stops, the car may safely exit the corner, without penalty, on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refers to the longest path, the number in the red box refers to the shortest path. Refer to these when deciding the gear you enter the corner in.&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Driving code on the straights ===&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible. (ex. You can&#039;t fishtail back and forth between the inside and outside edges)&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Wear points (WP) ==&lt;br /&gt;
&lt;br /&gt;
They reflect the capability of the car to stay on the track and survive events during the race. In the Basic Game, each car has 18 WP at the beginning of the race. The players use these points to survive various incidents and risky maneuvers. In the advanced game, they are divided up into different categories that are used in different situations.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Preparation for play ==&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Start formation ===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. In the case of a tie, all &#039;&#039;&#039;involved&#039;&#039;&#039; players re-roll the die.&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Start ===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: 1 – poor start&#039;&#039;&#039;. The player has stalled the motor of their car. They cannot engage 1st gear and so they have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 2 and 16&#039;&#039;&#039; – normal start. The player can start normally. They roll the die for 1st gear and move their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 17 and 20&#039;&#039;&#039; – great start! The player makes a fantastic start. They move their car forward 4 spaces immediately, although they are still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
==(Basic Rules) Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, it cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their WP at any time to avoid having to advance the full number of spaces shown on the die. In this way they can control their progress better, for example when the lanes are blocked by other cars.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Changing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox. The number of gears skipped equates to the number of WP their car loses as a result. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a number between 1 and 4 their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Two-lap race==&lt;br /&gt;
&lt;br /&gt;
For players who have already played several single-lap games.&lt;br /&gt;
&lt;br /&gt;
Whoever crosses the finishing line first after two laps wins the game. Players may make a pit stop between the first and second laps to regain the WP points they lost during the first round.&lt;br /&gt;
&lt;br /&gt;
==(Basic Rules) Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap a player may decide to make a pit stop to regain all the WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one’s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the colour of your car&#039;s central strip.&lt;br /&gt;
&lt;br /&gt;
===(Basic Rules) Entering pits===&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is sufficient to roll the minimum number required or higher using the die corresponding to the selected gear. The car receives all 18 WP back and awaits their next turn to start from the pits in 4th gear (maximum).&lt;br /&gt;
&lt;br /&gt;
The rules for changing down gear, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
There are minimum gears required in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
=Advanced Rules=&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) The gears===&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears, each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2, or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Die Color||Die Size||Movement (Number of spaces)&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Driving===&lt;br /&gt;
&lt;br /&gt;
As in real life, the car starts in 1st gear. Then you upshift to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is especially important in the corners.&lt;br /&gt;
&lt;br /&gt;
====(Advanced Rules) Order of play====&lt;br /&gt;
&lt;br /&gt;
In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====(Advanced Rules)  Same position====&lt;br /&gt;
&lt;br /&gt;
If two cars on the track are level with each other, the driver with the highest gear plays first.&lt;br /&gt;
&lt;br /&gt;
If both cars are in the same gear, the car that arrived first at their current space plays first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Driving Code===&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
====(Advanced Rules) Driving code in the corners====&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated by the number of red stop lights in the corner information box) within the limits of the corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refers to the longest path, the number in the red box refers to the shortest path. Refer to these numbers when considering what gear to enter the corner in.&lt;br /&gt;
&lt;br /&gt;
====(Advanced Rules) Driving code on the straights====&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Wear points (WP)===&lt;br /&gt;
&lt;br /&gt;
Wear Points reflect the ability of the car to stay on the track and survive events during the race. Each car has a certain number of WP at the beginning of the race, which are divided up between six different categories. These points are distributed as follows in the game for advanced players:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|WP tires:||6&lt;br /&gt;
|-&lt;br /&gt;
|WP brakes:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP gearbox:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP car body:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP engine:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP road handling:||2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Preparation for play==&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Start formation===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. (In the case of a tie, all concerned players re-roll the die.)&lt;br /&gt;
&lt;br /&gt;
===(Advanced Rules) Start===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
====Number rolled, 1 - poor start====&lt;br /&gt;
&lt;br /&gt;
The player has stalled the motor of their car. They cannot engage 1st gear and so have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: between 2 and 19 - normal start====&lt;br /&gt;
&lt;br /&gt;
The player can start normally. They roll the die for 1st gear and move their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: 20 - great start!====&lt;br /&gt;
&lt;br /&gt;
The player makes a fantastic start. They move their car forward 4 spaces immediately, although they are still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s tire WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, it cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
When a car loses their last tire WP by overshooting a corner, they spin round in a circle. The car is placed on the space where their move ended, pointing backwards. The player must turn their car round again and drive off in 1st gear when it is their next turn. In this adaptation, their Tire WPs are reset to 1.&lt;br /&gt;
&lt;br /&gt;
If a car loses more tire WP than it possesses, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their brake WP at any time to avoid having to advance the full number of spaces shown on the die. This can help to prevent losing tire WP if they would otherwise overshoot a corner.&lt;br /&gt;
&lt;br /&gt;
A driver can find themselves blocked by one or more cars which they are unable to overtake. After the driver has moved their car forward as many spaces as possible, they count how many spaces they would have moved if they had not been blocked.&lt;br /&gt;
&lt;br /&gt;
If the number of spaces short of the full number is 4 or greater, they may use Emergency Braking. In this case, their first 3 spaces must be paid for with Brake WP. Each additional space after that may be paid by either Brake or Tire WP.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
If a car doesn&#039;t have enough brake WP and tire WP to stop before a blockage, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Gearing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox.&lt;br /&gt;
&lt;br /&gt;
As a result, the car then loses a certain number of brake WP, engine WP and gearbox WP. The table below lists the corresponding wear. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gears skipped!!Gearbox WP!!Brake WP!!Engine WP&lt;br /&gt;
|-&lt;br /&gt;
|1 gear||1||0||0&lt;br /&gt;
|-&lt;br /&gt;
|2 gears||1||1||0&lt;br /&gt;
|-&lt;br /&gt;
|3 gears||1||1||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a car has no gearbox WP left, the driver can only change down one gear at a time until the game is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a 1, their car loses 1 Car Body WP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In this adaptation&#039;&#039;&#039; the car that did not just move rolls first. If it fails the roll and is eliminated from the race as a result, the car that moved will automatically fail its roll.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last car body WP, it is eliminated&#039;&#039;&#039; from the race.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 engine WP.&lt;br /&gt;
&lt;br /&gt;
If a car loses its last engine WP, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Damage and road handling==&lt;br /&gt;
&lt;br /&gt;
Each time a car loses a car body WP or an engine WP, a damage marker is placed on the space where the move ended.&lt;br /&gt;
&lt;br /&gt;
The same applies whenever a car is eliminated from the race for whatever reason. These spaces are judged to be &amp;quot;dangerous&amp;quot; from then on.&lt;br /&gt;
&lt;br /&gt;
If a car passes over one of these spaces or lands on it, the driver must roll the black die. If the result is between 1 and 4, the car loses one road handling WP. The dangerous spaces can be avoided by changing lanes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last road handling WP, it is eliminated from the race.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If a car drives in the wake of another car, this is called slipstreaming.&lt;br /&gt;
&lt;br /&gt;
For the two concerned drivers, slipstreaming is possible from the 4th gear on.&lt;br /&gt;
&lt;br /&gt;
The car must be driving as fast or faster than the car in front.&lt;br /&gt;
&lt;br /&gt;
If a car wants to profit from slipstreaming after moving, it has to stop directly behind another car. From this position they can then add 3 spaces onto their last move. They can move forward 3 spaces in the following way:&lt;br /&gt;
&lt;br /&gt;
*change a lane, overtake the car in front and return to the original lane.&lt;br /&gt;
*change a lane and move two spaces in a straight line.&lt;br /&gt;
*change two lanes and move one space in a straight line.&lt;br /&gt;
&lt;br /&gt;
The player must move a total of three spaces in any case. (However, the driver may use brake WP in order to reduce this number of spaces.) If slipstreaming brings a car up immediately behind another car, they can carry on slipstreaming (and so on).&lt;br /&gt;
&lt;br /&gt;
If a car is carried into a corner by slipstreaming, they lose a brake WP (without the number of spaces being reduced).&lt;br /&gt;
&lt;br /&gt;
In a corner, a slipstreaming car must follow normal driving code (eg. following the arrows).&lt;br /&gt;
&lt;br /&gt;
Braking in order to take advantage of slipstreaming in the wake of another player&#039;s car is not allowed.&lt;br /&gt;
&lt;br /&gt;
Drivers do not have to slipstream!&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap, a player may decide to make a pit stop to regain all the tire WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one&#039;s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the central colour of your car.&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is necessary to roll the minimum number required or higher using the die corresponding to the selected gear. As soon as the car enters the pits, it receives all its tire WP back. The player now rolls the black die, in order to see how fast their mechanics work.&lt;br /&gt;
&lt;br /&gt;
===Result between 1 and 10: quick pit stop===&lt;br /&gt;
&lt;br /&gt;
The player divides the number shown on the black die by two (rounding it up if necessary). The result is the number of spaces the car is allowed to move when the car leaves the pit in 4th gear.&lt;br /&gt;
&lt;br /&gt;
===Result between 11 and 20: slow pit stop===&lt;br /&gt;
&lt;br /&gt;
The car remains in the pit until the next round. Then the car moves on in 4th gear (or a lower gear).&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=(Advanced Rules) Optional Rules=&lt;br /&gt;
&lt;br /&gt;
All the following rules can be used independently of one another.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Construction of one&#039;s own car==&lt;br /&gt;
&lt;br /&gt;
Every player can distribute their 20 WP between the zones of their car at their own discretion. At least 1 WP must be assigned to each zone.&lt;br /&gt;
&lt;br /&gt;
If using the Technical Pit Stops option, 2 additional WPs are available to assign, and players may assign 0-2 points to Repair points.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Qualifying lap with a stopwatch==&lt;br /&gt;
&lt;br /&gt;
All players drive a qualifying lap with stopwatch consecutively, in order to determine their start positions. The rules for moves and driving code remain unchanged during the qualifier, however the WP are not taken into account. The only exception is if a car overshoots a corner - this is penalized.&lt;br /&gt;
&lt;br /&gt;
* The player whose turn it is to drive a qualifying lap places their car in the middle lane in front of the starting line.&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
* The player receives a total number of points over their lap: &lt;br /&gt;
**1 point for each round the player takes to complete the lap&lt;br /&gt;
**1 point for each space the player overshoots a corner by (soft tires will have their points doubled)&lt;br /&gt;
**1 point for every full real-time minute it takes the player to complete the lap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The qualifying lap is over if the driver does not stop at all in corners where two or three stops are required. They then have to start the race at the back of the field from the last start position.&lt;br /&gt;
&lt;br /&gt;
After that the order of starting is determined: the car which has completed the qualifying lap with the fewest points takes first position. The other cars follow on in decreasing order of points. If two drivers have the same number of points, the real time taken to complete the lap decides: the fastest player gets the better start position.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules) Weather Conditions ==&lt;br /&gt;
&lt;br /&gt;
There is a weather chart for each &amp;quot;Formula D&amp;quot; racing circuit, which is available to all players before the game so that they can inform themselves about weather conditions during the race and qualifying laps.&lt;br /&gt;
&lt;br /&gt;
If the weather rules are used, it is strongly recommended that the tire selection rules be used as well.&lt;br /&gt;
&lt;br /&gt;
Before the qualifying laps begin, the black die is rolled and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039; no problems for the drivers.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: no problems for drivers, treat as good weather for the qualifying lap.&lt;br /&gt;
&#039;&#039;&#039;Rain&#039;&#039;&#039;: The qualifying laps for all players take place in rain (see below).&lt;br /&gt;
&lt;br /&gt;
Before the actual race begins, the black die is rolled again and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039;: no problem.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: The sky is overcast at the beginning of the race, but it does not rain &#039;&#039;&#039;unless&#039;&#039;&#039; it rained during qualifying. Either way, this can change during the course of the race. Whenever a player in 5th gear throws a 20 or a 30 in 6th gear, at the end of the round they have to roll the black die and consult the weather chart:&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;good weather&amp;quot; comes up, the weather conditions are shifted one line upwards.&lt;br /&gt;
If &amp;quot;rain&amp;quot; is the result, the weather conditions are shifted one line downwards.&lt;br /&gt;
If the result is &amp;quot;changeable&amp;quot;, the weather stays the same.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Weather&#039;&#039;&#039;||&#039;&#039;&#039;Effect on race&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Good||None. The weather will no longer change.&lt;br /&gt;
|-&lt;br /&gt;
|Good (Temporary)||None.&lt;br /&gt;
|-&lt;br /&gt;
|Changeable||This is the starting step and once the weather conditions shift up or down off Changeable, it will be skipped for the rest of the game.&lt;br /&gt;
|-&lt;br /&gt;
|Rain (Temporary)||Rain.&lt;br /&gt;
|-&lt;br /&gt;
|Rain||Rain. The weather will no longer change.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effect of rain ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Collision&#039;&#039;&#039;: A result of 1 or 2 (instead of just a 1, as in good weather) means a collision occurs.&lt;br /&gt;
* &#039;&#039;&#039;Engine damage&#039;&#039;&#039;: Occurs when result is between 1 and 3 (instead of between 1 and 4, as in good weather).&lt;br /&gt;
* &#039;&#039;&#039;Road handling&#039;&#039;&#039;: The car loses one road handling WP for a result between 1 and 5 (instead of between 1 and 4, as in good weather)&lt;br /&gt;
* &#039;&#039;&#039;Skidding on corners&#039;&#039;&#039;: Cars will skid on corners depending on their tire selection. See &amp;quot;Selection of tires&amp;quot;, below.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules)  Selection of tires ==&lt;br /&gt;
&lt;br /&gt;
The choice of tires is crucial not just for qualifying lap, but for the race itself. When weather conditions have been determined, each player can fit their car with special tires (see below). It is also possible to change tires between qualifying lap and the race.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hard Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient on a wet track.&lt;br /&gt;
&lt;br /&gt;
* The game rules apply unchanged if the weather is good or changeable.&lt;br /&gt;
* If it is raining, the car moves three additional spaces on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
=== Soft Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient - if not handicapping - on a wet track.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the car can move one additional space during each move in the qualifying or race laps. This additional move is not compulsory. But if a car overshoots a corner, the penalty is doubled (loss of tire WP). If a driver does not change their tires during a pit stop after the first lap, they lose the bonus. If a driver does not change their tires during a pit stop after the second lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
* If it is raining, the car travels three spaces further on any turn which contributes to advancing a corner. If a driver does not change their tires during a pit stop before beginning the third lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
=== Rain Tires ===&lt;br /&gt;
&lt;br /&gt;
They are highly recommended if it is raining, but are otherwise very sensitive.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the penalties for overshooting a corner are doubled (loss of tire WP) for qualifying and the first two laps of the race. If a driver does not change their tires before the third race lap, the&lt;br /&gt;
penalties are trebled.&lt;br /&gt;
* If it is raining, the car travels one space further on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules)  Technical Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
Your pit has 2 WP which can be used during the race to regain lost WP (with the exception of tire WP). Every time a driver makes a pit stop they can choose between two options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tire pit stop&#039;&#039;&#039;: As in the rules for advanced players, except that the driver may change the type of tire whenever they change tires.&lt;br /&gt;
* &#039;&#039;&#039;Technical pit stop&#039;&#039;&#039;: The driver can change their tires (see above) and in addition regain up to two WP in one or two zones (except the tires). This &amp;quot;reservoir&amp;quot; of 2 WP applies for the entire duration of the race, even if it lasts for more than two laps. In the next round, the car may not start higher than 4th gear. A car with soft tires does not profit from the bonus of an additional space when leaving the pits.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules)  Team Race ==&lt;br /&gt;
&lt;br /&gt;
A game using these rules is appropriate for a large group with an even number of players. The players form teams each with two players; each colour corresponds to a racing team. Apart from the following two exceptions, the rules apply unchanged:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Pit stop&#039;&#039;&#039;: Each team has 4 WP to repair the cars. Both players must decide together how they want to use these points.&lt;br /&gt;
* &#039;&#039;&#039;Winner by points&#039;&#039;&#039;: A team race is not necessarily won by the first car to cross the finishing line. Each car receives a certain number of winning points. The team with the highest number of total points wins the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000&lt;br /&gt;
|-&lt;br /&gt;
|2||720&lt;br /&gt;
|-&lt;br /&gt;
|3||600&lt;br /&gt;
|-&lt;br /&gt;
|4||480&lt;br /&gt;
|-&lt;br /&gt;
|5||400&lt;br /&gt;
|-&lt;br /&gt;
|6||320&lt;br /&gt;
|-&lt;br /&gt;
|7||240&lt;br /&gt;
|-&lt;br /&gt;
|8||160&lt;br /&gt;
|-&lt;br /&gt;
|9||80&lt;br /&gt;
|-&lt;br /&gt;
|10||40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that these points differ from the published rules. If qualifying is enabled, qualifying points are also awarded equally to both members of the team.&lt;br /&gt;
&lt;br /&gt;
==(Advanced Rules)  Nitro Fuel ==&lt;br /&gt;
&lt;br /&gt;
When this option is chosen, all cars have a Nitro Fuel injection, which allows instant acceleration. Players can use their nitro once a lap after rolling the corresponding gear die. They receive a movement bonus according to the gear they are using at that moment (1 space in 1st gear, 2 spaces in 2nd gear, etc.). This bonus must be used completely.&lt;br /&gt;
&lt;br /&gt;
When a car pits, or crosses the finish line at the end of a lap, it replenishes its nitro fuel and may use it again.&lt;br /&gt;
&lt;br /&gt;
Nitro may only be used if it is available when rolling the gear die. It does not become available during the same move where you complete a lap.&lt;br /&gt;
&lt;br /&gt;
= BGA Rule Variations=&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
The differences from the rules you will find in your own copy of Formula D are:&lt;br /&gt;
&lt;br /&gt;
==Round Order ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, if two cars are level with each other, the driver with the highest gear plays first. If both cars are in the same gear, the car nearest the inside with reference to the next (or the current) corner plays first.&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the higher gear continues to be first but if both cars are in the same gear *then the player who first arrived at their space* goes first. Corners no longer affect who goes first.&lt;br /&gt;
&lt;br /&gt;
==Points ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, points are awarded for race completion &#039;&#039;&#039;and&#039;&#039;&#039; for Qualifying (if enabled). The Qualifying points are minor by comparison and serve as a tie-break if two players are both eliminated and score 0 in the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;&#039;||&#039;&#039;&#039;Race Points&#039;&#039;&#039;||&#039;&#039;&#039;Qualifying Points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000||10&lt;br /&gt;
|-&lt;br /&gt;
|2||720||9&lt;br /&gt;
|-&lt;br /&gt;
|3||600||8&lt;br /&gt;
|-&lt;br /&gt;
|4||480||7&lt;br /&gt;
|-&lt;br /&gt;
|5||400||6&lt;br /&gt;
|-&lt;br /&gt;
|6||320||5&lt;br /&gt;
|-&lt;br /&gt;
|7||240||4&lt;br /&gt;
|-&lt;br /&gt;
|8||160||3&lt;br /&gt;
|-&lt;br /&gt;
|9||80||2&lt;br /&gt;
|-&lt;br /&gt;
|10||40||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To cover multiple players being eliminated during a game where there is no Qualifying, their distance travelled before being eliminated is used as the final tie-break (only in non-team games). If a player overshoots a corner or crashes into the back of other cars, their position at the &#039;&#039;&#039;start&#039;&#039;&#039; of the turn is used.&lt;br /&gt;
&lt;br /&gt;
==Braking ==&lt;br /&gt;
&lt;br /&gt;
The original rules provide a table that describes the outcome of &amp;quot;Emergency Braking&amp;quot; (when a car is blocked by one or more cars which they are unable to overtake). The table does not take Constructed Cars into account, so to clarify, the implemented rules are:&lt;br /&gt;
&lt;br /&gt;
If a player performs Emergency Braking, they must move their car forward as many spaces as possible. If they need to brake more than 3 spaces, they are required to use Brake WPs for the first 3 spaces, and each subsequent space may be paid for using Brake WP *or* Tire WPs.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
==Qualifying ==&lt;br /&gt;
&lt;br /&gt;
Players do not roll the black starting die at the beginning of Qualifying: they just start in 1st gear.&lt;br /&gt;
&lt;br /&gt;
The original rules simply state that &amp;quot;WP are not taken into account&amp;quot; during qualifying. However, the effect of this is clarified in this adaptation:&lt;br /&gt;
&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
&lt;br /&gt;
In this version, Qualifying awards points as long as you complete your lap:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||10&lt;br /&gt;
|-&lt;br /&gt;
|2||9&lt;br /&gt;
|-&lt;br /&gt;
|3||8&lt;br /&gt;
|-&lt;br /&gt;
|4||7&lt;br /&gt;
|-&lt;br /&gt;
|5||6&lt;br /&gt;
|-&lt;br /&gt;
|6||5&lt;br /&gt;
|-&lt;br /&gt;
|7||4&lt;br /&gt;
|-&lt;br /&gt;
|8||3&lt;br /&gt;
|-&lt;br /&gt;
|9||2&lt;br /&gt;
|-&lt;br /&gt;
|10||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Collision Checks ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the active player checks for collisions only after all adjacent players have rolled. If an adjacent player fails their roll and is eliminated as a result, the active player will automatically fail their roll against that player.&lt;br /&gt;
&lt;br /&gt;
==Weather Options==&lt;br /&gt;
&lt;br /&gt;
When setting up a game with Advanced rules, you have 4 choices for the weather.&lt;br /&gt;
&lt;br /&gt;
===Roll for Weather===&lt;br /&gt;
&lt;br /&gt;
This is the normal approach when using the weather rules: at the start of the race (and, separately, at the start of Qualify if it&#039;s been enabled) the Weather die is rolled to determine whether the race&#039;s weather will be Good (for the entire race) or Rain (for the entire race) or Changeable.&lt;br /&gt;
&lt;br /&gt;
===Good Weather===&lt;br /&gt;
&lt;br /&gt;
This option skips the opening Weather roll and the race plays with permanent Good weather.&lt;br /&gt;
&lt;br /&gt;
===Rain===&lt;br /&gt;
&lt;br /&gt;
This option skips the opening Weather roll and the race players with permanent Rain.&lt;br /&gt;
&lt;br /&gt;
===Start Changeable===&lt;br /&gt;
&lt;br /&gt;
This option skips the opening Weather roll and treats it as if &amp;quot;Changeable&amp;quot; had been rolled. However the Weather die is rolled to see if the weather starts in Rain. On a Rain result it does, on &amp;quot;Good&amp;quot; or &amp;quot;Changeable&amp;quot; the weather starts good, but either way it is changeable.&lt;br /&gt;
&lt;br /&gt;
==Qualifying Weather Options==&lt;br /&gt;
&lt;br /&gt;
When Qualifying is enabled, you may choose the weather option for it.&lt;br /&gt;
&lt;br /&gt;
===Same as Race===&lt;br /&gt;
&lt;br /&gt;
This is the default. The same setting that is used for &amp;quot;Race Weather&amp;quot; is also used for Qualifying. Note that although the setting is the same, the outcome can be different when &amp;quot;Roll for Weather&amp;quot; is being used.&lt;br /&gt;
&lt;br /&gt;
===Random Weather===&lt;br /&gt;
&lt;br /&gt;
The weather will be randomly chosen before Qualifying. It will NOT be changeable and will be the same outcome (Rain or Good) for all players.&lt;br /&gt;
&lt;br /&gt;
===Good Weather===&lt;br /&gt;
&lt;br /&gt;
Qualifying will be in good weather for all players.&lt;br /&gt;
&lt;br /&gt;
===Rain===&lt;br /&gt;
&lt;br /&gt;
Qualifying will be in rain for all players.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Weather Rolls ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, the Weather die is thrown immediately when a player rolls the maximum number in 5th or 6th gear. In this adaptation, this roll still occurs but it is deferred until the end of the round. This way, weather can only change between rounds and not in the middle of a player&#039;s turn. If multiple players roll the maximum number, the weather die will be rolled multiple times.&lt;br /&gt;
&lt;br /&gt;
==Changeable Weather ==&lt;br /&gt;
&lt;br /&gt;
The original rules have 4 steps for Changeable Weather:&lt;br /&gt;
* Good&lt;br /&gt;
* Good - Changeable&lt;br /&gt;
* Rain - Changeable&lt;br /&gt;
* Rain&lt;br /&gt;
&lt;br /&gt;
In this adaptation, there are 5 steps:&lt;br /&gt;
* Good&lt;br /&gt;
* Good - Temporary&lt;br /&gt;
* Changeable&lt;br /&gt;
* Rain - Temporary&lt;br /&gt;
* Rain&lt;br /&gt;
&lt;br /&gt;
Changeable is only ever used at the start of a race, and by default is Good - with one exception: if it rained in qualifying then a changeable feature race will start Changeable but raining.&lt;br /&gt;
&lt;br /&gt;
Weather will never be changeable in qualifying: it will be Good unless Rain is rolled.&lt;br /&gt;
&lt;br /&gt;
==Spinning ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that if a car on 0 Tire WP overshoots a corner then it &amp;quot;will again spin round in a circle. If the car overshoots the corner by more than one space, it is out of the race&amp;quot;. In this adaptation, a car with 0 Tire WP is eliminated if it overshoots a corner by more than 1 WP. Hence, even a single space overshoot will eliminate a 0 Tire WP car on soft tires.&lt;br /&gt;
&lt;br /&gt;
Additionally, in this adaptation when you spin, your Tire WP are reset to 1 WP (instead of remaining at 0 WP).&lt;br /&gt;
&lt;br /&gt;
==Skidding on Corners in the Rain ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that cars will skid in the rain &amp;quot;provided at least one space of the move lies within the limits of a corner&amp;quot;. In this adaptation, skidding will only occur on any turn that counts towards a corner&#039;s completion. That means:&lt;br /&gt;
&lt;br /&gt;
* Driving through a corner that you have already completed will &#039;&#039;not&#039;&#039; cause you to skid&lt;br /&gt;
* If you are on the final space in a corner and still need to land in it 1 more turn, you will skid on your next move even though you are driving into a straight&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Motor Damage Checks==&lt;br /&gt;
&lt;br /&gt;
Motor damage checks are always performed in round order.&lt;br /&gt;
&lt;br /&gt;
==Braking in the Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that the rules for braking do not apply in the pit lane. In this adaptation, there is no braking cost for stopping immediately behind another car, or in your pit box. However, there is a brake cost for travelling any distance shorter than that.&lt;br /&gt;
&lt;br /&gt;
== Pit Boxes ==&lt;br /&gt;
&lt;br /&gt;
In Individual Driver games, a single pit box will be reserved for each driver instead of drivers being assigned a pit box color. The box will be indicated with the player&#039;s avatar.&lt;br /&gt;
&lt;br /&gt;
== Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down DO apply in the pit lane.&lt;br /&gt;
&lt;br /&gt;
There are also minimum gears that may be used in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
== Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
The soft tire bonus may not be used when moving after a Quick Pit Stop.&lt;br /&gt;
&lt;br /&gt;
If Technical Pit Stops are enabled, players may always choose to take one (and thus finish their turn) even if they have no repair points or repairs to perform.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, if players have selected the option to Construct their own car then there are no limits to how many points they may assign to any given area.&lt;br /&gt;
&lt;br /&gt;
In games that have also selected the Technical Pit Stop rules, then instead of having a fixed 2 WPs available for Pit repairs, a player will have 22 WPs to use in Construction and can choose how many repair points to make available, with a maximum of 2.&lt;br /&gt;
&lt;br /&gt;
==Road Races ==&lt;br /&gt;
&lt;br /&gt;
The Road Race rules, including Drivers with special abilities, are not used.&lt;br /&gt;
&lt;br /&gt;
Where Road Race circuits are used, all non-standard rules are ignored.&lt;br /&gt;
&lt;br /&gt;
Nitro Fuel Injection is available as an option for all races.&lt;br /&gt;
&lt;br /&gt;
==Elimination ==&lt;br /&gt;
&lt;br /&gt;
When a player is eliminated, the outcome is slightly different from the published rules. &lt;br /&gt;
&lt;br /&gt;
*If the elimination was caused by the player overshooting corners, or driving over a damage marker, or quitting, the car is immediately removed from the board and &#039;&#039;&#039;no damage marker is placed&#039;&#039;&#039;&lt;br /&gt;
*If the elimination was caused by the player failing a motor damage test, the car is immediately removed from the board and a damage marker is added.&lt;br /&gt;
*If the player is eliminated by any other reason, a damage marker is added and the car remains on the board until the end of the round, when it is removed.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28385</id>
		<title>Gamehelpformulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28385"/>
		<updated>2026-02-06T21:41:26Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* BGA Rule Variations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 10-Second Explainer of Formula D =&lt;br /&gt;
New to Formula D?&lt;br /&gt;
&lt;br /&gt;
This 10-second explainer will get you started:&lt;br /&gt;
&lt;br /&gt;
# Your car will start in 1st gear.&lt;br /&gt;
# At the start of your turn, your first decision is whether to stay on your current gear, or go up 1 gear or go down 1 gear. &lt;br /&gt;
# You can go down 1 gear without penalty, or &amp;quot;skip&amp;quot; up to 3 gears at the cost of wear points. You may only go up by 1 gear per turn.&lt;br /&gt;
# After choosing a gear, you will roll the appropriate &amp;quot;gear die&amp;quot;. The higher the gear, the bigger the die, as well as the farther you go.&lt;br /&gt;
# Once you have rolled, you must move the number of spaces rolled, although you may choose which lane you take.&lt;br /&gt;
# Corners are areas marked in red. To drive around corners without penalty, you must finish at least 1 turn in them.&lt;br /&gt;
# Some corners are particularly slow and may require that you finish at least 2 or even 3 turns in them.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! There&#039;s a lot more to it than that, but this covers the absolute basics of driving safely around the track.&lt;br /&gt;
&lt;br /&gt;
= Important: BGA Rule Variations =&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
[[#BGA Rule Variations|At the end of these rules]], you will find a list of all differences from the published game rules.&lt;br /&gt;
&lt;br /&gt;
=Adaptation Notes/Common Mistakes=&lt;br /&gt;
&lt;br /&gt;
# The body of your car is the colour of the pit box you are using (or your team&#039;s color if playing a team game)&lt;br /&gt;
# Your sidepods are your personal color&lt;br /&gt;
# To enter the pitbox, you must move out of the pit lane and onto the coloured pit box. Stopping in the pit lane in front of your box is not a pit stop.&lt;br /&gt;
# To zoom the circuit in and out with a mouse, use Ctrl+Wheel mouse.&lt;br /&gt;
&lt;br /&gt;
=Basic Rules=&lt;br /&gt;
&lt;br /&gt;
== Aim of the game ==&lt;br /&gt;
&lt;br /&gt;
FORMULA D is a car race. The aim is to win a race (of one, two, or three laps) and be the first to cross the finishing line. There are all sorts of risks involved and you have to anticipate what will happen during the course of the race. You must decide on your strategy, trust to luck, keep to the rules and always keep an eye on the technical condition of your car.&lt;br /&gt;
&lt;br /&gt;
== The gears ==&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears. Each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and farther the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2 or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this. You cannot go from 6th gear to 1st.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Color||Die||Movement (Number of spaces)&lt;br /&gt;
!Face distribution&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|1,1,2,2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|2,3,3,4,4,4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|4,5,6,6,7,7,8,8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|2 of each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Driving ==&lt;br /&gt;
&lt;br /&gt;
As in real life the car starts in 1st gear. Then you shift up to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is especially important in the corners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Order of play&#039;&#039;&#039;: In each round the drivers play according to their car position on the track, with the current gear deciding tie-breakers, and the first one there is the final decider.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Driving Code ==&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
===Driving code in the corners ===&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated in the corner information box) within the limits of the corner. The number of filled red circles indicates the number of stops for that corner. After the requisite number of stops, the car may safely exit the corner, without penalty, on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refers to the longest path, the number in the red box refers to the shortest path. Refer to these when deciding the gear you enter the corner in.&lt;br /&gt;
&lt;br /&gt;
===Driving code on the straights ===&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible. (ex. You can&#039;t fishtail back and forth between the inside and outside edges)&lt;br /&gt;
&lt;br /&gt;
==Wear points (WP) ==&lt;br /&gt;
&lt;br /&gt;
They reflect the capability of the car to stay on the track and survive events during the race. In the Basic Game, each car has 18 WP at the beginning of the race. The players use these points to survive various incidents and risky maneuvers. In the advanced game, they are divided up into different categories that are used in different situations.&lt;br /&gt;
&lt;br /&gt;
==Preparation for play ==&lt;br /&gt;
&lt;br /&gt;
===Start formation ===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. In the case of a tie, all &#039;&#039;&#039;involved&#039;&#039;&#039; players re-roll the die.&lt;br /&gt;
&lt;br /&gt;
===Start ===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: 1 – poor start&#039;&#039;&#039;. The player has stalled the motor of their car. They cannot engage 1st gear and so they have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 2 and 16&#039;&#039;&#039; – normal start. The player can start normally. They roll the die for 1st gear and move their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 17 and 20&#039;&#039;&#039; – great start! The player makes a fantastic start. They move their car forward 4 spaces immediately, although they are still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, it cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their WP at any time to avoid having to advance the full number of spaces shown on the die. In this way they can control their progress better, for example when the lanes are blocked by other cars.&lt;br /&gt;
&lt;br /&gt;
==Changing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox. The number of gears skipped equates to the number of WP their car loses as a result. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a number between 1 and 4 their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Two-lap race==&lt;br /&gt;
&lt;br /&gt;
For players who have already played several single-lap games.&lt;br /&gt;
&lt;br /&gt;
Whoever crosses the finishing line first after two laps wins the game. Players may make a pit stop between the first and second laps to regain the WP points they lost during the first round.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap a player may decide to make a pit stop to regain all the WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one’s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the colour of your car&#039;s central strip.&lt;br /&gt;
&lt;br /&gt;
===Entering pits===&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is sufficient to roll the minimum number required or higher using the die corresponding to the selected gear. The car receives all 18 WP back and awaits their next turn to start from the pits in 4th gear (maximum).&lt;br /&gt;
&lt;br /&gt;
The rules for changing down gear, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
There are minimum gears required in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
=Advanced Rules=&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
===The gears===&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears, each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2, or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Die Color||Die Size||Movement (Number of spaces)&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Driving===&lt;br /&gt;
&lt;br /&gt;
As in real life, the car starts in 1st gear. Then you upshift to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is especially important in the corners.&lt;br /&gt;
&lt;br /&gt;
====Order of play====&lt;br /&gt;
&lt;br /&gt;
In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Same position====&lt;br /&gt;
&lt;br /&gt;
If two cars on the track are level with each other, the driver with the highest gear plays first.&lt;br /&gt;
&lt;br /&gt;
If both cars are in the same gear, the car that arrived first at their current space plays first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Driving Code===&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
====Driving code in the corners====&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated by the number of red stop lights in the corner information box) within the limits of the corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refers to the longest path, the number in the red box refers to the shortest path. Refer to these numbers when considering what gear to enter the corner in.&lt;br /&gt;
&lt;br /&gt;
====Driving code on the straights====&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wear points (WP)===&lt;br /&gt;
&lt;br /&gt;
Wear Points reflect the ability of the car to stay on the track and survive events during the race. Each car has a certain number of WP at the beginning of the race, which are divided up between six different categories. These points are distributed as follows in the game for advanced players:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|WP tires:||6&lt;br /&gt;
|-&lt;br /&gt;
|WP brakes:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP gearbox:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP car body:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP engine:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP road handling:||2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Preparation for play==&lt;br /&gt;
&lt;br /&gt;
===Start formation===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. (In the case of a tie, all concerned players re-roll the die.)&lt;br /&gt;
&lt;br /&gt;
===Start===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
====Number rolled, 1 - poor start====&lt;br /&gt;
&lt;br /&gt;
The player has stalled the motor of their car. They cannot engage 1st gear and so have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: between 2 and 19 - normal start====&lt;br /&gt;
&lt;br /&gt;
The player can start normally. They roll the die for 1st gear and move their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: 20 - great start!====&lt;br /&gt;
&lt;br /&gt;
The player makes a fantastic start. They move their car forward 4 spaces immediately, although they are still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s tire WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, it cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
When a car loses their last tire WP by overshooting a corner, they spin round in a circle. The car is placed on the space where their move ended, pointing backwards. The player must turn their car round again and drive off in 1st gear when it is their next turn. In this adaptation, their Tire WPs are reset to 1.&lt;br /&gt;
&lt;br /&gt;
If a car loses more tire WP than it possesses, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their brake WP at any time to avoid having to advance the full number of spaces shown on the die. This can help to prevent losing tire WP if they would otherwise overshoot a corner.&lt;br /&gt;
&lt;br /&gt;
A driver can find themselves blocked by one or more cars which they are unable to overtake. After the driver has moved their car forward as many spaces as possible, they count how many spaces they would have moved if they had not been blocked.&lt;br /&gt;
&lt;br /&gt;
If the number of spaces short of the full number is 4 or greater, they may use Emergency Braking. In this case, their first 3 spaces must be paid for with Brake WP. Each additional space after that may be paid by either Brake or Tire WP.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
If a car doesn&#039;t have enough brake WP and tire WP to stop before a blockage, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Gearing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox.&lt;br /&gt;
&lt;br /&gt;
As a result, the car then loses a certain number of brake WP, engine WP and gearbox WP. The table below lists the corresponding wear. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gears skipped!!Gearbox WP!!Brake WP!!Engine WP&lt;br /&gt;
|-&lt;br /&gt;
|1 gear||1||0||0&lt;br /&gt;
|-&lt;br /&gt;
|2 gears||1||1||0&lt;br /&gt;
|-&lt;br /&gt;
|3 gears||1||1||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a car has no gearbox WP left, the driver can only change down one gear at a time until the game is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a 1, their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In this adaptation&#039;&#039;&#039; the car that did not just move rolls first. If it fails the roll and is eliminated from the race as a result, the car that moved will automatically fail its roll.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last car body WP, it is eliminated&#039;&#039;&#039; from the race.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 engine WP.&lt;br /&gt;
&lt;br /&gt;
If a car loses its last engine WP, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Damage and road handling==&lt;br /&gt;
&lt;br /&gt;
Each time a car loses a car body WP or an engine WP, a damage marker is placed on the space where the move ended.&lt;br /&gt;
&lt;br /&gt;
The same applies whenever a car is eliminated from the race for whatever reason. These spaces are judged to be &amp;quot;dangerous&amp;quot; from then on.&lt;br /&gt;
&lt;br /&gt;
If a car passes over one of these spaces or lands on it, the driver must roll the black die. If the result is between 1 and 4, the car loses one road handling WP. The dangerous spaces can be avoided by changing lanes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last road handling WP, it is eliminated from the race.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If a car drives in the wake of another car, this is called slipstreaming.&lt;br /&gt;
&lt;br /&gt;
For the two concerned drivers, slipstreaming is possible from the 4th gear on.&lt;br /&gt;
&lt;br /&gt;
The car must be driving as fast or faster than the car in front.&lt;br /&gt;
&lt;br /&gt;
If a car wants to profit from slipstreaming after moving, it has to stop directly behind another car. From this position they can then add 3 spaces onto their last move. They can move forward 3 spaces in the following way:&lt;br /&gt;
&lt;br /&gt;
*change a lane, overtake the car in front and return to the original lane.&lt;br /&gt;
*change a lane and move two spaces in a straight line.&lt;br /&gt;
*change two lanes and move one space in a straight line.&lt;br /&gt;
&lt;br /&gt;
The player must move a total of three spaces in any case. (However, the driver may use brake WP in order to reduce this number of spaces.) If slipstreaming brings a car up immediately behind another car, they can carry on slipstreaming (and so on).&lt;br /&gt;
&lt;br /&gt;
If a car is carried into a corner by slipstreaming, they lose a brake WP (without the number of spaces being reduced).&lt;br /&gt;
&lt;br /&gt;
In a corner, a slipstreaming car must follow normal driving code (eg. following the arrows).&lt;br /&gt;
&lt;br /&gt;
Braking in order to take advantage of slipstreaming in the wake of another player&#039;s car is not allowed.&lt;br /&gt;
&lt;br /&gt;
Drivers do not have to slipstream!&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap, a player may decide to make a pit stop to regain all the tire WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one&#039;s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the central colour of your car.&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is necessary to roll the minimum number required or higher using the die corresponding to the selected gear. As soon as the car enters the pits, it receives all its tire WP back. The player now rolls the black die, in order to see how fast their mechanics work.&lt;br /&gt;
&lt;br /&gt;
===Result between 1 and 10: quick pit stop===&lt;br /&gt;
&lt;br /&gt;
The player divides the number shown on the black die by two (rounding it up if necessary). The result is the number of spaces the car is allowed to move when the car leaves the pit in 4th gear.&lt;br /&gt;
&lt;br /&gt;
===Result between 11 and 20: slow pit stop===&lt;br /&gt;
&lt;br /&gt;
The car remains in the pit until the next round. Then the car moves on in 4th gear (or a lower gear).&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Optional Rules=&lt;br /&gt;
&lt;br /&gt;
All the following rules can be used independently of one another.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car==&lt;br /&gt;
&lt;br /&gt;
Every player can distribute their 20 WP between the zones of their car at their own discretion. At least 1 WP must be assigned to each zone.&lt;br /&gt;
&lt;br /&gt;
If using the Technical Pit Stops option, 2 additional WPs are available to assign, and players may assign 0-2 points to Repair points.&lt;br /&gt;
&lt;br /&gt;
==Qualifying lap with a stopwatch==&lt;br /&gt;
&lt;br /&gt;
All players drive a qualifying lap with stopwatch consecutively, in order to determine their start positions. The rules for moves and driving code remain unchanged during the qualifier, however the WP are not taken into account. The only exception is if a car overshoots a corner - this is penalized.&lt;br /&gt;
&lt;br /&gt;
* The player whose turn it is to drive a qualifying lap places their car in the middle lane in front of the starting line.&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
* The player receives a total number of points over their lap: &lt;br /&gt;
**1 point for each round the player takes to complete the lap&lt;br /&gt;
**1 point for each space the player overshoots a corner by (soft tires will have their points doubled)&lt;br /&gt;
**1 point for every full real-time minute it takes the player to complete the lap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The qualifying lap is over if the driver does not stop at all in corners where two or three stops are required. They then have to start the race at the back of the field from the last start position.&lt;br /&gt;
&lt;br /&gt;
After that the order of starting is determined: the car which has completed the qualifying lap with the fewest points takes first position. The other cars follow on in decreasing order of points. If two drivers have the same number of points, the real time taken to complete the lap decides: the fastest player gets the better start position.&lt;br /&gt;
&lt;br /&gt;
== Weather Conditions ==&lt;br /&gt;
&lt;br /&gt;
There is a weather chart for each &amp;quot;Formula D&amp;quot; racing circuit, which is available to all players before the game so that they can inform themselves about weather conditions during the race and qualifying laps.&lt;br /&gt;
&lt;br /&gt;
If the weather rules are used, it is strongly recommended that the tire selection rules be used as well.&lt;br /&gt;
&lt;br /&gt;
Before the qualifying laps begin, the black die is rolled and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039; no problems for the drivers.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: no problems for drivers, treat as good weather for the qualifying lap.&lt;br /&gt;
&#039;&#039;&#039;Rain&#039;&#039;&#039;: The qualifying laps for all players take place in rain (see below).&lt;br /&gt;
&lt;br /&gt;
Before the actual race begins, the black die is rolled again and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039;: no problem.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: The sky is overcast at the beginning of the race, but it does not rain &#039;&#039;&#039;unless&#039;&#039;&#039; it rained during qualifying. Either way, this can change during the course of the race. Whenever a player in 5th gear throws a 20 or a 30 in 6th gear, at the end of the round they have to roll the black die and consult the weather chart:&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;good weather&amp;quot; comes up, the weather conditions are shifted one line upwards.&lt;br /&gt;
If &amp;quot;rain&amp;quot; is the result, the weather conditions are shifted one line downwards.&lt;br /&gt;
If the result is &amp;quot;changeable&amp;quot;, the weather stays the same.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Weather&#039;&#039;&#039;||&#039;&#039;&#039;Effect on race&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Good||None. The weather will no longer change.&lt;br /&gt;
|-&lt;br /&gt;
|Good (Temporary)||None.&lt;br /&gt;
|-&lt;br /&gt;
|Changeable||This is the starting step and once the weather conditions shift up or down off Changeable, it will be skipped for the rest of the game.&lt;br /&gt;
|-&lt;br /&gt;
|Rain (Temporary)||Rain.&lt;br /&gt;
|-&lt;br /&gt;
|Rain||Rain. The weather will no longer change.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effect of rain ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Collision&#039;&#039;&#039;: A result of 1 or 2 (instead of just a 1, as in good weather) means a collision occurs.&lt;br /&gt;
* &#039;&#039;&#039;Engine damage&#039;&#039;&#039;: Occurs when result is between 1 and 3 (instead of between 1 and 4, as in good weather).&lt;br /&gt;
* &#039;&#039;&#039;Road handling&#039;&#039;&#039;: The car loses one road handling WP for a result between 1 and 5 (instead of between 1 and 4, as in good weather)&lt;br /&gt;
* &#039;&#039;&#039;Skidding on corners&#039;&#039;&#039;: Cars will skid on corners depending on their tire selection. See &amp;quot;Selection of tires&amp;quot;, below.&lt;br /&gt;
&lt;br /&gt;
== Selection of tires ==&lt;br /&gt;
&lt;br /&gt;
The choice of tires is crucial not just for qualifying lap, but for the race itself. When weather conditions have been determined, each player can fit their car with special tires (see below). It is also possible to change tires between qualifying lap and the race.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hard Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient on a wet track.&lt;br /&gt;
&lt;br /&gt;
* The game rules apply unchanged if the weather is good or changeable.&lt;br /&gt;
* If it is raining, the car moves three additional spaces on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
=== Soft Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient - if not handicapping - on a wet track.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the car can move one additional space during each move in the qualifying or race laps. This additional move is not compulsory. But if a car overshoots a corner, the penalty is doubled (loss of tire WP). If a driver does not change their tires during a pit stop after the first lap, they lose the bonus. If a driver does not change their tires during a pit stop after the second lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
* If it is raining, the car travels three spaces further on any turn which contributes to advancing a corner. If a driver does not change their tires during a pit stop before beginning the third lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
=== Rain Tires ===&lt;br /&gt;
&lt;br /&gt;
They are highly recommended if it is raining, but are otherwise very sensitive.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the penalties for overshooting a corner are doubled (loss of tire WP) for qualifying and the first two laps of the race. If a driver does not change their tires before the third race lap, the&lt;br /&gt;
penalties are trebled.&lt;br /&gt;
* If it is raining, the car travels one space further on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
== Technical Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
Your pit has 2 WP which can be used during the race to regain lost WP (with the exception of tire WP). Every time a driver makes a pit stop they can choose between two options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tire pit stop&#039;&#039;&#039;: As in the rules for advanced players, except that the driver may change the type of tire whenever they change tires.&lt;br /&gt;
* &#039;&#039;&#039;Technical pit stop&#039;&#039;&#039;: The driver can change their tires (see above) and in addition regain up to two WP in one or two zones (except the tires). This &amp;quot;reservoir&amp;quot; of 2 WP applies for the entire duration of the race, even if it lasts for more than two laps. In the next round, the car may not start higher than 4th gear. A car with soft tires does not profit from the bonus of an additional space when leaving the pits.&lt;br /&gt;
&lt;br /&gt;
== Team Race ==&lt;br /&gt;
&lt;br /&gt;
A game using these rules is appropriate for a large group with an even number of players. The players form teams each with two players; each colour corresponds to a racing team. Apart from the following two exceptions, the rules apply unchanged:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Pit stop&#039;&#039;&#039;: Each team has 4 WP to repair the cars. Both players must decide together how they want to use these points.&lt;br /&gt;
* &#039;&#039;&#039;Winner by points&#039;&#039;&#039;: A team race is not necessarily won by the first car to cross the finishing line. Each car receives a certain number of winning points. The team with the highest number of total points wins the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000&lt;br /&gt;
|-&lt;br /&gt;
|2||720&lt;br /&gt;
|-&lt;br /&gt;
|3||600&lt;br /&gt;
|-&lt;br /&gt;
|4||480&lt;br /&gt;
|-&lt;br /&gt;
|5||400&lt;br /&gt;
|-&lt;br /&gt;
|6||320&lt;br /&gt;
|-&lt;br /&gt;
|7||240&lt;br /&gt;
|-&lt;br /&gt;
|8||160&lt;br /&gt;
|-&lt;br /&gt;
|9||80&lt;br /&gt;
|-&lt;br /&gt;
|10||40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that these points differ from the published rules. If qualifying is enabled, qualifying points are also awarded equally to both members of the team.&lt;br /&gt;
&lt;br /&gt;
== Nitro Fuel ==&lt;br /&gt;
&lt;br /&gt;
When this option is chosen, all cars have a Nitro Fuel injection, which allows instant acceleration. Players can use their nitro once a lap after rolling the corresponding gear die. They receive a movement bonus according to the gear they are using at that moment (1 space in 1st gear, 2 spaces in 2nd gear, etc.). This bonus must be used completely.&lt;br /&gt;
&lt;br /&gt;
When a car pits, or crosses the finish line at the end of a lap, it replenishes its nitro fuel and may use it again.&lt;br /&gt;
&lt;br /&gt;
Nitro may only be used if it is available when rolling the gear die. It does not become available during the same move where you complete a lap.&lt;br /&gt;
&lt;br /&gt;
= BGA Rule Variations=&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
The differences from the rules you will find in your own copy of Formula D are:&lt;br /&gt;
&lt;br /&gt;
==Round Order ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, if two cars are level with each other, the driver with the highest gear plays first. If both cars are in the same gear, the car nearest the inside with reference to the next (or the current) corner plays first.&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the higher gear continues to be first but if both cars are in the same gear *then the player who first arrived at their space* goes first. Corners no longer affect who goes first.&lt;br /&gt;
&lt;br /&gt;
==Points ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, points are awarded for race completion &#039;&#039;&#039;and&#039;&#039;&#039; for Qualifying (if enabled). The Qualifying points are minor by comparison and serve as a tie-break if two players are both eliminated and score 0 in the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;&#039;||&#039;&#039;&#039;Race Points&#039;&#039;&#039;||&#039;&#039;&#039;Qualifying Points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000||10&lt;br /&gt;
|-&lt;br /&gt;
|2||720||9&lt;br /&gt;
|-&lt;br /&gt;
|3||600||8&lt;br /&gt;
|-&lt;br /&gt;
|4||480||7&lt;br /&gt;
|-&lt;br /&gt;
|5||400||6&lt;br /&gt;
|-&lt;br /&gt;
|6||320||5&lt;br /&gt;
|-&lt;br /&gt;
|7||240||4&lt;br /&gt;
|-&lt;br /&gt;
|8||160||3&lt;br /&gt;
|-&lt;br /&gt;
|9||80||2&lt;br /&gt;
|-&lt;br /&gt;
|10||40||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To cover multiple players being eliminated during a game where there is no Qualifying, their distance travelled before being eliminated is used as the final tie-break (only in non-team games). If a player overshoots a corner or crashes into the back of other cars, their position at the &#039;&#039;&#039;start&#039;&#039;&#039; of the turn is used.&lt;br /&gt;
&lt;br /&gt;
==Braking ==&lt;br /&gt;
&lt;br /&gt;
The original rules provide a table that describes the outcome of &amp;quot;Emergency Braking&amp;quot; (when a car is blocked by one or more cars which they are unable to overtake). The table does not take Constructed Cars into account, so to clarify, the implemented rules are:&lt;br /&gt;
&lt;br /&gt;
If a player performs Emergency Braking, they must move their car forward as many spaces as possible. If they need to brake more than 3 spaces, they are required to use Brake WPs for the first 3 spaces, and each subsequent space may be paid for using Brake WP *or* Tire WPs.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
==Qualifying ==&lt;br /&gt;
&lt;br /&gt;
Players do not roll the black starting die at the beginning of Qualifying: they just start in 1st gear.&lt;br /&gt;
&lt;br /&gt;
The original rules simply state that &amp;quot;WP are not taken into account&amp;quot; during qualifying. However, the effect of this is clarified in this adaptation:&lt;br /&gt;
&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
&lt;br /&gt;
In this version, Qualifying awards points as long as you complete your lap:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||10&lt;br /&gt;
|-&lt;br /&gt;
|2||9&lt;br /&gt;
|-&lt;br /&gt;
|3||8&lt;br /&gt;
|-&lt;br /&gt;
|4||7&lt;br /&gt;
|-&lt;br /&gt;
|5||6&lt;br /&gt;
|-&lt;br /&gt;
|6||5&lt;br /&gt;
|-&lt;br /&gt;
|7||4&lt;br /&gt;
|-&lt;br /&gt;
|8||3&lt;br /&gt;
|-&lt;br /&gt;
|9||2&lt;br /&gt;
|-&lt;br /&gt;
|10||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Collision Checks ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the active player checks for collisions only after all adjacent players have rolled. If an adjacent player fails their roll and is eliminated as a result, the active player will automatically fail their roll against that player.&lt;br /&gt;
&lt;br /&gt;
==Weather Options==&lt;br /&gt;
&lt;br /&gt;
When setting up a game with Advanced rules, you have 4 choices for the weather.&lt;br /&gt;
&lt;br /&gt;
===Roll for Weather===&lt;br /&gt;
&lt;br /&gt;
This is the normal approach when using the weather rules: at the start of the race (and, separately, at the start of Qualify if it&#039;s been enabled) the Weather die is rolled to determine whether the race&#039;s weather will be Good (for the entire race) or Rain (for the entire race) or Changeable.&lt;br /&gt;
&lt;br /&gt;
===Good Weather===&lt;br /&gt;
&lt;br /&gt;
This option skips the opening Weather roll and the race plays with permanent Good weather.&lt;br /&gt;
&lt;br /&gt;
===Rain===&lt;br /&gt;
&lt;br /&gt;
This option skips the opening Weather roll and the race players with permanent Rain.&lt;br /&gt;
&lt;br /&gt;
===Start Changeable===&lt;br /&gt;
&lt;br /&gt;
This option skips the opening Weather roll and treats it as if &amp;quot;Changeable&amp;quot; had been rolled. However the Weather die is rolled to see if the weather starts in Rain. On a Rain result it does, on &amp;quot;Good&amp;quot; or &amp;quot;Changeable&amp;quot; the weather starts good, but either way it is changeable.&lt;br /&gt;
&lt;br /&gt;
==Qualifying Weather Options==&lt;br /&gt;
&lt;br /&gt;
When Qualifying is enabled, you may choose the weather option for it.&lt;br /&gt;
&lt;br /&gt;
===Same as Race===&lt;br /&gt;
&lt;br /&gt;
This is the default. The same setting that is used for &amp;quot;Race Weather&amp;quot; is also used for Qualifying. Note that although the setting is the same, the outcome can be different when &amp;quot;Roll for Weather&amp;quot; is being used.&lt;br /&gt;
&lt;br /&gt;
===Random Weather===&lt;br /&gt;
&lt;br /&gt;
The weather will be randomly chosen before Qualifying. It will NOT be changeable and will be the same outcome (Rain or Good) for all players.&lt;br /&gt;
&lt;br /&gt;
===Good Weather===&lt;br /&gt;
&lt;br /&gt;
Qualifying will be in good weather for all players.&lt;br /&gt;
&lt;br /&gt;
===Rain===&lt;br /&gt;
&lt;br /&gt;
Qualifying will be in rain for all players.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Weather Rolls ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, the Weather die is thrown immediately when a player rolls the maximum number in 5th or 6th gear. In this adaptation, this roll still occurs but it is deferred until the end of the round. This way, weather can only change between rounds and not in the middle of a player&#039;s turn. If multiple players roll the maximum number, the weather die will be rolled multiple times.&lt;br /&gt;
&lt;br /&gt;
==Changeable Weather ==&lt;br /&gt;
&lt;br /&gt;
The original rules have 4 steps for Changeable Weather:&lt;br /&gt;
* Good&lt;br /&gt;
* Good - Changeable&lt;br /&gt;
* Rain - Changeable&lt;br /&gt;
* Rain&lt;br /&gt;
&lt;br /&gt;
In this adaptation, there are 5 steps:&lt;br /&gt;
* Good&lt;br /&gt;
* Good - Temporary&lt;br /&gt;
* Changeable&lt;br /&gt;
* Rain - Temporary&lt;br /&gt;
* Rain&lt;br /&gt;
&lt;br /&gt;
Changeable is only ever used at the start of a race, and by default is Good - with one exception: if it rained in qualifying then a changeable feature race will start Changeable but raining.&lt;br /&gt;
&lt;br /&gt;
Weather will never be changeable in qualifying: it will be Good unless Rain is rolled.&lt;br /&gt;
&lt;br /&gt;
==Spinning ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that if a car on 0 Tire WP overshoots a corner then it &amp;quot;will again spin round in a circle. If the car overshoots the corner by more than one space, it is out of the race&amp;quot;. In this adaptation, a car with 0 Tire WP is eliminated if it overshoots a corner by more than 1 WP. Hence, even a single space overshoot will eliminate a 0 Tire WP car on soft tires.&lt;br /&gt;
&lt;br /&gt;
Additionally, in this adaptation when you spin, your Tire WP are reset to 1 WP (instead of remaining at 0 WP).&lt;br /&gt;
&lt;br /&gt;
==Skidding on Corners in the Rain ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that cars will skid in the rain &amp;quot;provided at least one space of the move lies within the limits of a corner&amp;quot;. In this adaptation, skidding will only occur on any turn that counts towards a corner&#039;s completion. That means:&lt;br /&gt;
&lt;br /&gt;
* Driving through a corner that you have already completed will &#039;&#039;not&#039;&#039; cause you to skid&lt;br /&gt;
* If you are on the final space in a corner and still need to land in it 1 more turn, you will skid on your next move even though you are driving into a straight&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Motor Damage Checks==&lt;br /&gt;
&lt;br /&gt;
Motor damage checks are always performed in round order.&lt;br /&gt;
&lt;br /&gt;
==Braking in the Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that the rules for braking do not apply in the pit lane. In this adaptation, there is no braking cost for stopping immediately behind another car, or in your pit box. However, there is a brake cost for travelling any distance shorter than that.&lt;br /&gt;
&lt;br /&gt;
== Pit Boxes ==&lt;br /&gt;
&lt;br /&gt;
In Individual Driver games, a single pit box will be reserved for each driver instead of drivers being assigned a pit box color. The box will be indicated with the player&#039;s avatar.&lt;br /&gt;
&lt;br /&gt;
== Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down DO apply in the pit lane.&lt;br /&gt;
&lt;br /&gt;
There are also minimum gears that may be used in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
== Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
The soft tire bonus may not be used when moving after a Quick Pit Stop.&lt;br /&gt;
&lt;br /&gt;
If Technical Pit Stops are enabled, players may always choose to take one (and thus finish their turn) even if they have no repair points or repairs to perform.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, if players have selected the option to Construct their own car then there are no limits to how many points they may assign to any given area.&lt;br /&gt;
&lt;br /&gt;
In games that have also selected the Technical Pit Stop rules, then instead of having a fixed 2 WPs available for Pit repairs, a player will have 22 WPs to use in Construction and can choose how many repair points to make available, with a maximum of 2.&lt;br /&gt;
&lt;br /&gt;
==Road Races ==&lt;br /&gt;
&lt;br /&gt;
The Road Race rules, including Drivers with special abilities, are not used.&lt;br /&gt;
&lt;br /&gt;
Where Road Race circuits are used, all non-standard rules are ignored.&lt;br /&gt;
&lt;br /&gt;
Nitro Fuel Injection is available as an option for all races.&lt;br /&gt;
&lt;br /&gt;
==Elimination ==&lt;br /&gt;
&lt;br /&gt;
When a player is eliminated, the outcome is slightly different from the published rules. &lt;br /&gt;
&lt;br /&gt;
*If the elimination was caused by the player overshooting corners, or driving over a damage marker, or quitting, the car is immediately removed from the board and &#039;&#039;&#039;no damage marker is placed&#039;&#039;&#039;&lt;br /&gt;
*If the elimination was caused by the player failing a motor damage test, the car is immediately removed from the board and a damage marker is added.&lt;br /&gt;
*If the player is eliminated by any other reason, a damage marker is added and the car remains on the board until the end of the round, when it is removed.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28186</id>
		<title>Bugsclarification formulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28186"/>
		<updated>2026-01-21T03:38:10Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Display ==&lt;br /&gt;
&lt;br /&gt;
=== The Circuit is Black on My Display===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Firefox, it&#039;s been noted that the cache can sometimes fail. Refreshing the BGA cache seems to fix it:&lt;br /&gt;
&lt;br /&gt;
# Goto the BGA website.&lt;br /&gt;
# Click padlock to the left of the site URL&lt;br /&gt;
# Click &amp;quot;Clear cookies and site data...&amp;quot;&lt;br /&gt;
# Close Firefox Browser&lt;br /&gt;
[[File:Clear Firefox Cookies and Site Data.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Corners==&lt;br /&gt;
&lt;br /&gt;
===I Stopped In A Corner But It Did Not Count===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? All corner stops are required. If you miss a stop in one corner and end your turn in a second corner, that stop counts ONLY AGAINST THE FIRST CORNER. You still need to stop in the second corner and if you move out of it without stopping again, you will be overshooting.&lt;br /&gt;
&lt;br /&gt;
===I Exited A Corner And Crashed - Why?===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? If you skip Corner 1 and end your turn in Corner 2, that move only counts against Corner 1 and you STILL have to finish a turn in Corner 2. If you move out of Corner 2 at speed without stopping again in it, you will probably destroy your tires.&lt;br /&gt;
&lt;br /&gt;
===I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
===I Was Allowed To Change Lanes After Leaving A Corner ===&lt;br /&gt;
&lt;br /&gt;
Some players have been confused by the line in the rules &amp;quot;When coming out a corner the car may not change lanes&amp;quot;. Note that this line appears in the &#039;&#039;&#039;Overshooting&#039;&#039;&#039; section and is &#039;&#039;only&#039;&#039; intended to apply to cars that are overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
==Collisions==&lt;br /&gt;
&lt;br /&gt;
===A Car Ended It&#039;s Move Next To Another Car But No Collision Was Rolled===&lt;br /&gt;
&lt;br /&gt;
Collisions are not rolled when a car ends its move IN FRONT of another car.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pit Stops==&lt;br /&gt;
&lt;br /&gt;
===I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Suggestions==&lt;br /&gt;
&lt;br /&gt;
===Can You Change It So That Players Can Qualify Simultaneously?===&lt;br /&gt;
&lt;br /&gt;
This is a great idea in principle, but unfortunately the adaptation was not developed with this functionality in mind and to implement it retrospectively would be a massive undertaking, requiring reworking all internal code to support multiple simultaneous boards, developing multi-player versions of the key user interaction steps, and adding a user interface to the client to allow players to switch between different boards.&lt;br /&gt;
&lt;br /&gt;
As it stands, it&#039;s not worth the effort to make such a massive conversion, even though there&#039;s no denying that it would make realtime games with qualifying a lot faster.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s any consolation, imagine you&#039;re playing the actual board game where you also have to do it one at a time...&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28119</id>
		<title>Bugsclarification formulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28119"/>
		<updated>2026-01-17T23:24:30Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Display ==&lt;br /&gt;
&lt;br /&gt;
=== The Circuit is Black on My Display===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Firefox, it&#039;s been noted that the cache can sometimes fail. Refreshing the BGA cache seems to fix it:&lt;br /&gt;
&lt;br /&gt;
# Goto the BGA website.&lt;br /&gt;
# Click padlock to the left of the site URL&lt;br /&gt;
# Click &amp;quot;Clear cookies and site data...&amp;quot;&lt;br /&gt;
# Close Firefox Browser&lt;br /&gt;
[[File:Clear Firefox Cookies and Site Data.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Corners==&lt;br /&gt;
&lt;br /&gt;
===I Stopped In A Corner But It Did Not Count===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? All corner stops are required. If you miss a stop in one corner and end your turn in a second corner, that stop counts ONLY AGAINST THE FIRST CORNER. You still need to stop in the second corner and if you move out of it without stopping again, you will be overshooting.&lt;br /&gt;
&lt;br /&gt;
===I Exited A Corner And Crashed - Why?===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? If you skip Corner 1 and end your turn in Corner 2, that move only counts against Corner 1 and you STILL have to finish a turn in Corner 2. If you move out of Corner 2 at speed without stopping again in it, you will probably destroy your tires.&lt;br /&gt;
&lt;br /&gt;
===I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
===I Was Allowed To Change Lanes After Leaving A Corner ===&lt;br /&gt;
&lt;br /&gt;
Some players have been confused by the line in the rules &amp;quot;When coming out a corner the car may not change lanes&amp;quot;. Note that this line appears in the &#039;&#039;&#039;Overshooting&#039;&#039;&#039; section and is &#039;&#039;only&#039;&#039; intended to apply to cars that are overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
==Collisions==&lt;br /&gt;
&lt;br /&gt;
===A Car Ended It&#039;s Move Next To Another Car But No Collision Was Rolled===&lt;br /&gt;
&lt;br /&gt;
Collisions are not rolled when a car ends its move IN FRONT of another car.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pit Stops==&lt;br /&gt;
&lt;br /&gt;
===I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=File:Clear_Firefox_Cookies_and_Site_Data.jpg&amp;diff=28118</id>
		<title>File:Clear Firefox Cookies and Site Data.jpg</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=File:Clear_Firefox_Cookies_and_Site_Data.jpg&amp;diff=28118"/>
		<updated>2026-01-17T23:24:06Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A screenshot of clearing Cookies and Site Data in Firefox&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28117</id>
		<title>Bugsclarification formulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28117"/>
		<updated>2026-01-17T23:21:25Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Display ==&lt;br /&gt;
&lt;br /&gt;
=== The Circuit is Black on My Display===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Firefox, it&#039;s been noted that the cache can sometimes fail. Refreshing the BGA cache seems to fix it:&lt;br /&gt;
&lt;br /&gt;
# Goto the BGA website.&lt;br /&gt;
# Click padlock to the left of the site URL&lt;br /&gt;
# Click &amp;quot;Clear cookies and site data...&amp;quot;&lt;br /&gt;
# Close Firefox Browser&lt;br /&gt;
[[File:Skärmbild_2026-01-17_095452.png]]&lt;br /&gt;
&lt;br /&gt;
==Corners==&lt;br /&gt;
&lt;br /&gt;
===I Stopped In A Corner But It Did Not Count===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? All corner stops are required. If you miss a stop in one corner and end your turn in a second corner, that stop counts ONLY AGAINST THE FIRST CORNER. You still need to stop in the second corner and if you move out of it without stopping again, you will be overshooting.&lt;br /&gt;
&lt;br /&gt;
===I Exited A Corner And Crashed - Why?===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? If you skip Corner 1 and end your turn in Corner 2, that move only counts against Corner 1 and you STILL have to finish a turn in Corner 2. If you move out of Corner 2 at speed without stopping again in it, you will probably destroy your tires.&lt;br /&gt;
&lt;br /&gt;
===I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
===I Was Allowed To Change Lanes After Leaving A Corner ===&lt;br /&gt;
&lt;br /&gt;
Some players have been confused by the line in the rules &amp;quot;When coming out a corner the car may not change lanes&amp;quot;. Note that this line appears in the &#039;&#039;&#039;Overshooting&#039;&#039;&#039; section and is &#039;&#039;only&#039;&#039; intended to apply to cars that are overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
==Collisions==&lt;br /&gt;
&lt;br /&gt;
===A Car Ended It&#039;s Move Next To Another Car But No Collision Was Rolled===&lt;br /&gt;
&lt;br /&gt;
Collisions are not rolled when a car ends its move IN FRONT of another car.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pit Stops==&lt;br /&gt;
&lt;br /&gt;
===I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=File:Sk%C3%A4rmbild_2026-01-17_095452.png&amp;diff=28116</id>
		<title>File:Skärmbild 2026-01-17 095452.png</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=File:Sk%C3%A4rmbild_2026-01-17_095452.png&amp;diff=28116"/>
		<updated>2026-01-17T23:20:19Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot of clearing site cookies in Firefox&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28115</id>
		<title>Bugsclarification formulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28115"/>
		<updated>2026-01-17T23:18:53Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: Added The Circuit is Black on My Display entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Display ==&lt;br /&gt;
&lt;br /&gt;
=== The Circuit is Black on My Display===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Firefox, it&#039;s been noted that the cache can sometimes fail. Refreshing the BGA cache seems to fix it:&lt;br /&gt;
&lt;br /&gt;
# Goto the BGA website.&lt;br /&gt;
# Click padlock to the left of the site URL&lt;br /&gt;
# Click &amp;quot;Clear cookies and site data...&amp;quot;&lt;br /&gt;
# Close Firefox Browser&lt;br /&gt;
&lt;br /&gt;
[https://1drv.ms/i/c/e6131ec33915ec1b/IQDHDfzM93vTSrq4O4KDSqvrAUlDhPZQvs8sCZp4elsssBI?e=VeTl85 Illustrating screen shot here]&lt;br /&gt;
&lt;br /&gt;
==Corners ==&lt;br /&gt;
&lt;br /&gt;
===I Stopped In A Corner But It Did Not Count===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? All corner stops are required. If you miss a stop in one corner and end your turn in a second corner, that stop counts ONLY AGAINST THE FIRST CORNER. You still need to stop in the second corner and if you move out of it without stopping again, you will be overshooting.&lt;br /&gt;
&lt;br /&gt;
===I Exited A Corner And Crashed - Why?===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? If you skip Corner 1 and end your turn in Corner 2, that move only counts against Corner 1 and you STILL have to finish a turn in Corner 2. If you move out of Corner 2 at speed without stopping again in it, you will probably destroy your tires.&lt;br /&gt;
&lt;br /&gt;
===I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
===I Was Allowed To Change Lanes After Leaving A Corner===&lt;br /&gt;
&lt;br /&gt;
Some players have been confused by the line in the rules &amp;quot;When coming out a corner the car may not change lanes&amp;quot;. Note that this line appears in the &#039;&#039;&#039;Overshooting&#039;&#039;&#039; section and is &#039;&#039;only&#039;&#039; intended to apply to cars that are overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
== Collisions==&lt;br /&gt;
&lt;br /&gt;
===A Car Ended It&#039;s Move Next To Another Car But No Collision Was Rolled===&lt;br /&gt;
&lt;br /&gt;
Collisions are not rolled when a car ends its move IN FRONT of another car.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pit Stops==&lt;br /&gt;
&lt;br /&gt;
===I Wasn&#039;t Able To Enter the Pits After Exiting A Corner===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28091</id>
		<title>Gamehelpformulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28091"/>
		<updated>2026-01-15T06:06:43Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 10-Second Explainer of Formula D =&lt;br /&gt;
New to Formula D?&lt;br /&gt;
&lt;br /&gt;
This 20-second explainer will get you started:&lt;br /&gt;
&lt;br /&gt;
# Your car will start in 1st gear.&lt;br /&gt;
# At the start of your turn, your first decision is whether to stay on your current gear, or go up 1 gear or go down. &lt;br /&gt;
# You can go down 1 gear without penalty, or &amp;quot;skip&amp;quot; up to 3 gears at the cost of wear points. You may only go up by 1 gear per turn.&lt;br /&gt;
# After choosing a gear, you will roll the appropriate &amp;quot;gear die&amp;quot;. The higher the gear, the bigger the die, as well as the farther you go.&lt;br /&gt;
# Once you have rolled, you must move the number of spaces rolled, although you may choose which lane you take.&lt;br /&gt;
# Corners are areas marked in red. To drive around corners without penalty, you must finish at least 1 turn in them.&lt;br /&gt;
# Some corners are particularly slow and may require that you finish at least 2 or even 3 turns in them.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! There&#039;s a lot more to it than that, but this covers the absolute basics of driving safely around the track.&lt;br /&gt;
&lt;br /&gt;
= Important: BGA Rule Variations =&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
[[#BGA Rule Variations|At the end of these rules]], you will find a list of all differences from the published game rules.&lt;br /&gt;
&lt;br /&gt;
=Adaptation Notes/Common Mistakes=&lt;br /&gt;
&lt;br /&gt;
# The body of your car is the colour of the pit box you are using (or your team&#039;s color if playing a team game)&lt;br /&gt;
# Your sidepods are your personal color&lt;br /&gt;
# To enter the pitbox, you must move out of the pit lane and onto the coloured pit box. Stopping in the pit lane in front of your box is not a pit stop.&lt;br /&gt;
# To zoom the circuit in and out with a mouse, use Ctrl+Wheelmouse.&lt;br /&gt;
&lt;br /&gt;
=Basic Rules=&lt;br /&gt;
&lt;br /&gt;
== Aim of the game ==&lt;br /&gt;
&lt;br /&gt;
FORMULA D is a car race. The aim is to win a race (of one, two, or three laps) and be the first to cross the finishing line. There are all sorts of risks involved and you have to anticipate what will happen during the course of the race. You must decide on your strategy, trust to luck, keep to the rules and always keep an eye on the technical condition of your car.&lt;br /&gt;
&lt;br /&gt;
== The gears ==&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears. Each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and farther the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2 or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this. You cannot go from 6th gear to 1st.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Color||Die||Movement (Number of spaces)&lt;br /&gt;
!Face distribution&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|1,1,2,2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|2,3,3,4,4,4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|4,5,6,6,7,7,8,8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|2 of each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Driving ==&lt;br /&gt;
&lt;br /&gt;
As in real life the car starts in 1st gear. Then you shift up to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is especially important in the corners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Order of play&#039;&#039;&#039;: In each round the drivers play according to their car position on the track, with the current gear deciding tie-breakers, and the first one there is the final decider.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Driving Code ==&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
===Driving code in the corners ===&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated in the corner information box) within the limits of the corner.  The number of filled red circles indicates the number of stops for that corner. After the requisite number of stops, the car may safely exit the corner, without penalty, on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refer to the longest path, the numbers in the red box refer to the shortest path. Refer to these when deciding the gear you enter the corner in.&lt;br /&gt;
&lt;br /&gt;
===Driving code on the straights ===&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible. (ex. You can&#039;t fishtail back and forth between the inside and outside edges)&lt;br /&gt;
&lt;br /&gt;
==Wear points (WP) ==&lt;br /&gt;
&lt;br /&gt;
They reflect the capability of the car to stay on the track and survive events during the race. In the Basic Game, each car has 18 WP at the beginning of the race. The players use these points to survive various incidents and risky maneuvers. In the advanced game, they are divided up into different categories that are used in different situations.&lt;br /&gt;
&lt;br /&gt;
==Preparation for play ==&lt;br /&gt;
&lt;br /&gt;
===Start formation ===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. In the case of a tie, all &#039;&#039;&#039;involved&#039;&#039;&#039; players re-roll the die.&lt;br /&gt;
&lt;br /&gt;
===Start ===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: 1 – poor start&#039;&#039;&#039;. The player has stalled the motor of their car. They cannot engage 1st gear and so they have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 2 and 16&#039;&#039;&#039; – normal start. The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 17 and 20&#039;&#039;&#039; – great start! The player makes a fantastic start. They moves their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their WP at any time to avoid having to advance the full number of spaces shown on the die. In this way they can control their progress better, for example when the lanes are blocked by other cars.&lt;br /&gt;
&lt;br /&gt;
==Changing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox. The number of gears skipped equates to the number of WP their car loses as a result. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a number between 1 and 4 their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Two-lap race==&lt;br /&gt;
&lt;br /&gt;
For players who have already played several single-lap games.&lt;br /&gt;
&lt;br /&gt;
Whoever crosses the finishing line first after two laps wins the game. Players may make a pit stop between the first and second laps to regain the WP points they lost during the first round.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap a player may decide to make a pit stop to regain all the WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one’s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the colour of your car&#039;s central strip.&lt;br /&gt;
&lt;br /&gt;
===Entering pits===&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is sufficient to roll the minimum number required or higher using the die corresponding to the selected gear. The car receives all 18 WP back and awaits their next turn to start from the pits in 4th gear (maximum).&lt;br /&gt;
&lt;br /&gt;
The rules for changing down gear, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
There are minimum gears required in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
=Advanced Rules=&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
===The gears===&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears, each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2, or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Die Color||Die Size||Movement (Number of spaces)&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Driving===&lt;br /&gt;
&lt;br /&gt;
As in real life, the car starts in 1st gear. Then you up shift to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then rolls the die which corresponds to the chosen speed. They then moves their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is important especially in the corners.&lt;br /&gt;
&lt;br /&gt;
====Order of play====&lt;br /&gt;
&lt;br /&gt;
In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Same position====&lt;br /&gt;
&lt;br /&gt;
If two cars on the track are level with each other, the driver with the highest gear plays first.&lt;br /&gt;
&lt;br /&gt;
If both cars are in the same gear, the car that arrived first at their current space plays first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Driving Code===&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
====Driving code in the corners====&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated by the number of red stop lights in the corner information box) within the limits of the corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refers to the longest path, the numbers in the red box refers to the shortest path. Refer to these numbers when considering what gear to enter the corner in.&lt;br /&gt;
&lt;br /&gt;
====Driving code on the straights====&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wear points (WP)===&lt;br /&gt;
&lt;br /&gt;
Wear Points reflect the ability of the car to stay on the track and survive events during the race. Each car has a certain number of WP at the beginning of the race, which are divided up between six different categories. These points are distributed as follows in the game for advanced players:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|WP tires:||6&lt;br /&gt;
|-&lt;br /&gt;
|WP brakes:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP gearbox:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP car body:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP engine:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP road handling:||2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Preparation for play==&lt;br /&gt;
&lt;br /&gt;
===Start formation===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. (ln the case of a tie, all concerned players re-roll the die.)&lt;br /&gt;
&lt;br /&gt;
===Start===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
====Number rolled, 1 - poor start====&lt;br /&gt;
&lt;br /&gt;
The player has stalled the motor of their car. They cannot engage 1st gear and so have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: between 2 and 19 - normal start====&lt;br /&gt;
&lt;br /&gt;
The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: 2O - great start!====&lt;br /&gt;
&lt;br /&gt;
The player makes a fantastic start. They move their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s tire WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
When a car loses their last tire WP by overshooting a corner, they spin round in a circle. The car is placed on the space where their move ended, pointing backwards. The player must turn their car round again and drive off in 1st gear when it is their next turn. In this adaptation, their Tire WPs are reset to 1.&lt;br /&gt;
&lt;br /&gt;
If a car loses more tire WP than it possesses, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their brake WP at any time to avoid having to advance the full number of spaces shown on the die. This can help to prevent losing tire WP if they would otherwise overshoot a corner.&lt;br /&gt;
&lt;br /&gt;
A driver can find themselves blocked by one or more cars which they are unable to overtake. After the driver has moved their car forward as many spaces as possible, they counts how many spaces they would have moved if they had not been blocked.&lt;br /&gt;
&lt;br /&gt;
If the number of spaces short of the full number 4 or greater, they may use Emergency Braking. In this case, their first 3 spaces must be paid for with Brake WP. Each additional space after that may be paid by either Brake or Tire WP.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
If a car doesn&#039;t have enough brake WP and tire WP to stop before a blockage, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Gearing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox.&lt;br /&gt;
&lt;br /&gt;
As a result, the car then loses a certain number of brake WP, engine WP and gearbox WP. The table below lists the corresponding wear. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gears skipped!!Gearbox WP!!Brake WP!!Engine WP&lt;br /&gt;
|-&lt;br /&gt;
|1 gear||1||0||0&lt;br /&gt;
|-&lt;br /&gt;
|2 gears||1||1||0&lt;br /&gt;
|-&lt;br /&gt;
|3 gears||1||1||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a car has no gearbox WP left, the driver can only change clown one gear at a time until the game is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they rolls a 1, their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In this adaptation&#039;&#039;&#039; the car that did not just move rolls first. If it fails the roll and is eliminated from the race as a result, the car that moved will automatically fail its roll.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last car body WP, it is eliminated&#039;&#039;&#039; from the race.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 engine WP.&lt;br /&gt;
&lt;br /&gt;
If a car loses its last engine WP, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Damage and road handling==&lt;br /&gt;
&lt;br /&gt;
Each time a car loses a car body WP or an engine WP, a damage marker is placed on the space where the move ended.&lt;br /&gt;
&lt;br /&gt;
The same applies whenever a car is eliminated from the race for whatever reason. These spaces are judged to be &amp;quot;dangerous&amp;quot; from then on.&lt;br /&gt;
&lt;br /&gt;
If a car passes over one of these spaces or lands on it, the driver must roll the black die. If the result is between 1 and 4, the car loses one road handling WP. The dangerous spaces can be avoided by changing lanes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last road handling WP, it is eliminated from the race.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If a car drives in the wake of another car, this is called slipstreaming.&lt;br /&gt;
&lt;br /&gt;
For the two concerned drivers, slipstreaming is possible from the 4th gear on.&lt;br /&gt;
&lt;br /&gt;
The car must be driving as fast or faster than the car in front.&lt;br /&gt;
&lt;br /&gt;
If a car wants to profit from slipstreaming after moving, it has to stop directly behind another car. From this position they can then add 3 spaces onto their last move. They can move forward 3 spaces in the following way:&lt;br /&gt;
&lt;br /&gt;
*change a lane, overtake the car in front and return to the original lane.&lt;br /&gt;
*change a lane and move two spaces in a straight line.&lt;br /&gt;
*change two lanes and move one space in a straight line.&lt;br /&gt;
&lt;br /&gt;
The player must move a total of three spaces in any case. (However, the driver may use brake WP in order to reduce this number of spaces.) If slipstreaming brings a car up immediately behind another car, they can carry on slipstreaming (and so on).&lt;br /&gt;
&lt;br /&gt;
If a car is carried into a corner by slipstreaming, they lose a brake WP (without the number of spaces being reduced).&lt;br /&gt;
&lt;br /&gt;
In a corner, a slipstreaming car must follow normal driving code (eg. following the arrows).&lt;br /&gt;
&lt;br /&gt;
Braking in order to take advantage of slipstreaming in the wake of another player&#039;s car is not allowed.&lt;br /&gt;
&lt;br /&gt;
Drivers do not have to slipstream!&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap, a player may decide to make a pit stop to regain all the tire WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one&#039;s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the central colour of your car.&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is necessary to roll the minimum number required or higher using the die corresponding to the selected gear. As soon as the car enters the pits, it receives all its tire WP back. The player now rolls the black die, in order to see how fast their mechanics work.&lt;br /&gt;
&lt;br /&gt;
===Result between 1 and 10: quick pit stop===&lt;br /&gt;
&lt;br /&gt;
The player divides the number shown on the black die by two (rounding it up if necessary). The result is the number of spaces the car is allowed to move when the car leaves the pit in 4th gear.&lt;br /&gt;
&lt;br /&gt;
===Result between 11 and 20: slow pit stop===&lt;br /&gt;
&lt;br /&gt;
The car remains in the pit until the next round. Then the car moves on in 4th gear (or a lower gear).&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Optional Rules=&lt;br /&gt;
&lt;br /&gt;
All the following rules can be used of one another.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car==&lt;br /&gt;
&lt;br /&gt;
Every player can distribute their 20 WP between the zones of their car at their own discretion. At least 1 WP must be assigned to each zone.&lt;br /&gt;
&lt;br /&gt;
If using the Technical Pit Stops option, 2 addition WPs are available to assign, and players may assign 0-2 points to Repair points.&lt;br /&gt;
&lt;br /&gt;
==Qualifying lap with a stopwatch==&lt;br /&gt;
&lt;br /&gt;
All players drive a qualifying lap with stopwatch consecutively, in order to determine their start positions. The rules for moves and driving code remain unchanged during the qualifier, however the WP are not taken into account. The only exception is if a car overshoots a corner - this is penalized.&lt;br /&gt;
&lt;br /&gt;
* The player whose turn it is to drive a qualifying lap places their car in the middle lane in front of the starting line.&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
* The player receives a total number of points over their lap: &lt;br /&gt;
**1 point for each round the player takes to complete the lap&lt;br /&gt;
**1 point for each space the player overshoots a corner by (soft tires will have their points doubled)&lt;br /&gt;
**1 point for every full real-time minute it takes the player to complete the lap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The qualifying lap is over if the driver does not stop at all in corners where two or three stops are required. They then have to start the race at the back of the field from the last start position.&lt;br /&gt;
&lt;br /&gt;
After that the order of starting is determined: the car which has completed the qualifying lap with the fewest points takes first position. The other cars follow on in decreasing order of points. If two drivers have the same number of points, the real time taken to complete the lap decides: the fastest player gets the better start position.&lt;br /&gt;
&lt;br /&gt;
== Weather Conditions ==&lt;br /&gt;
&lt;br /&gt;
There is a weather chart for each &amp;quot;Formula D&amp;quot; racing circuit, which is available to all players before the game so that they can inform themselves about weather conditions during the race and qualifying laps.&lt;br /&gt;
&lt;br /&gt;
lf the weather rules are used, it is strongly recommended that the tire selection rules be used as well.&lt;br /&gt;
&lt;br /&gt;
Before the qualifying laps begin, the black die is rolled and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039; or &#039;&#039;&#039;Changable&#039;&#039;&#039;: no problems for drivers&lt;br /&gt;
&#039;&#039;&#039;Rain&#039;&#039;&#039;: The qualifying laps for all players take place in rain (see below).&lt;br /&gt;
&lt;br /&gt;
Before the actual race begins, the black die is rolled again and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039;: no problem.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: The sky is overcast at the beginning of the race, but is does not rain &#039;&#039;&#039;unless&#039;&#039;&#039; it rained during qualifying. Either way, this can change during the course of the race. Whenever a player in 5th gear throws a 20 or a 3O in 6th gear, at the end of the round they have to roll the black die and consult the weather chart:&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;good weather&amp;quot; comes up. the weather conditions are shifted one line upwards.&lt;br /&gt;
If &amp;quot;rain&amp;quot; is the result, the weather conditions are shifted one line downwards.&lt;br /&gt;
If the result is &amp;quot;changeable&amp;quot;, the weather stays the same.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Weather&#039;&#039;&#039;||&#039;&#039;&#039;Effect on race&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Good||None. The weather will no longer change.&lt;br /&gt;
|-&lt;br /&gt;
|Good (Temporary)||None.&lt;br /&gt;
|-&lt;br /&gt;
|Changable||This is the starting step and once the weather conditions shift up or down off Changeable, it will be skipped for the rest of the game.&lt;br /&gt;
|-&lt;br /&gt;
|Rain (Temporary)||Rain.&lt;br /&gt;
|-&lt;br /&gt;
|Rain||Rain. The weather will no longer change.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effect of rain ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Collision&#039;&#039;&#039;: A result of 1 or 2 (instead of just a 1, as in good weather) means a collision occurs.&lt;br /&gt;
* &#039;&#039;&#039;Engine damage&#039;&#039;&#039;: Occurs when result is between 1 and 3 (instead of between 1 and 4, as in good weather).&lt;br /&gt;
* &#039;&#039;&#039;Road handling&#039;&#039;&#039;: The car loses one road handling WP for a result between 1 and 5 (instead of between 1 and 4, as in good weather)&lt;br /&gt;
* &#039;&#039;&#039;Skidding on corners&#039;&#039;&#039;: Cars will skid on corners depending on their tire selection. See &amp;quot;Selection of tires&amp;quot;, below.&lt;br /&gt;
&lt;br /&gt;
== Selection of tires ==&lt;br /&gt;
&lt;br /&gt;
The choice of tires is crucial not just for qualifying lap, but for the race itself. When weather conditions have been determined, each player can fit their car with special tires (see below). It is also possible to change tires between qualifying lap and the race.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hard Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommencled on a dry track and inefficient on a wet track.&lt;br /&gt;
&lt;br /&gt;
* The game rules apply unchanged if the weather is good or changeable.&lt;br /&gt;
* If it is raining, the car moves three additional spaces on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
=== Soft Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient - if not handicapping - on a wet track.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the car can move one additional space during each move in the qualifying or race laps. This additional move is not compulsory. But if a car overshoots a corner, the penalty is doubled (loss of tire WP). if a driver does not change their tires during a pit stop after the first lap, they lose the bonus. If a driver does not change their tires during a pit stop after the second lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
* If it is raining, the car travels three spaces further on any turn which contributes to advancing a corner. If a driver cloes not change their tires during a pit stop before beginning the third lap, the penalties For overshooting  a corner are trebled.&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
=== Rain Tires ===&lt;br /&gt;
&lt;br /&gt;
They are highly recommended if it is raining, but are otherwise very sensitive.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the penalties for overshooting a corner are doubled (loss of tire WP) for qualifying and the first two laps of the race. If a driver does not change their tires before the third race lap, the&lt;br /&gt;
penalties are trebled.&lt;br /&gt;
* If it is raining, the car travels one space further on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
== Technical Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
Your pit has 2 WP which can be used during the race to regain lost WP (with the exception of tire WP). Every time a driver makes a pit stop they can choose between two options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tire pit stop&#039;&#039;&#039;: As in the rules for advanced players, except that the driver may change the type of tire whenever they changes tires.&lt;br /&gt;
* &#039;&#039;&#039;Technlcal pit stop&#039;&#039;&#039;: The driver can change their tires (see above) and in addition regain up to two WP in one or two zones (except the tires). This &amp;quot;reservoir&amp;quot; of 2 WP applies for the entire duration of the race, even if it lasts for more than two laps. In the next round, the car may not start higher than 4th gear. A car with soft tires does not profit from the bonus of an additional space when leaving the pits.&lt;br /&gt;
&lt;br /&gt;
== Team Race ==&lt;br /&gt;
&lt;br /&gt;
A game using these rules is appropriate for a large group with an even number of players. The players form teams each with two players; each colour corresponds to a racing team. Apart from the following two exceptions, the rules apply unchanged:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Pit stop&#039;&#039;&#039;: Each team has 4 WP to repair the cars. Both players must decide together how they want to use these points.&lt;br /&gt;
* &#039;&#039;&#039;Winner by points&#039;&#039;&#039;: A team race is not necessarily won by the first car to cross the finishing line. Each car receives a certain number of winning points. The team with the highest number of total points wins the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000&lt;br /&gt;
|-&lt;br /&gt;
|2||720&lt;br /&gt;
|-&lt;br /&gt;
|3||600&lt;br /&gt;
|-&lt;br /&gt;
|4||480&lt;br /&gt;
|-&lt;br /&gt;
|5||400&lt;br /&gt;
|-&lt;br /&gt;
|6||320&lt;br /&gt;
|-&lt;br /&gt;
|7||240&lt;br /&gt;
|-&lt;br /&gt;
|8||160&lt;br /&gt;
|-&lt;br /&gt;
|9||80&lt;br /&gt;
|-&lt;br /&gt;
|10||40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that these points differ from the published rules. If qualifying is enabled, qualifying points are also awarded equally to both members of the team.&lt;br /&gt;
&lt;br /&gt;
== Nitro Fuel ==&lt;br /&gt;
&lt;br /&gt;
When this option is chosen, all cars have a nitro Fuel injection, which allows instant acceleration. Players can use their nitro once a lap after rolling the corresponding gear die. They receive a movement bonus according to the gear they are using at that moment (1 space in 1st gear, 2 spaces in 2nd gear, etc.). This bonus must be used completely.&lt;br /&gt;
&lt;br /&gt;
When a car pits, or crosses the finish line at the end of a lap, it replenishes its nitro fuel and may use it again.&lt;br /&gt;
&lt;br /&gt;
Nitro may only be used if it is available when rolling the gear die. It does not become available during the same move where you complete a lap.&lt;br /&gt;
&lt;br /&gt;
= BGA Rule Variations=&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
The differences from the rules you will find in your own copy of Formula D are:&lt;br /&gt;
&lt;br /&gt;
==Round Order ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, if two cars are level with each other, the driver with the highest gear plays first. If both cars are in the same gear, the car nearest the inside with reference to the next (or the current) corner plays first.&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the higher gear continues to be first but if both cars are in the same gear *then the player who first arrived at their space* goes first. Corners no longer affect who goes first.&lt;br /&gt;
&lt;br /&gt;
==Points ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, points are awarded for race completion &#039;&#039;&#039;and&#039;&#039;&#039; for Qualifying (if enabled). The Qualifying points are minor by comparison and serve as a tie-break if two players are both eliminated and score 0 in the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;&#039;||&#039;&#039;&#039;Race Points&#039;&#039;&#039;||&#039;&#039;&#039;Qualifying Points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000||10&lt;br /&gt;
|-&lt;br /&gt;
|2||720||9&lt;br /&gt;
|-&lt;br /&gt;
|3||600||8&lt;br /&gt;
|-&lt;br /&gt;
|4||480||7&lt;br /&gt;
|-&lt;br /&gt;
|5||400||6&lt;br /&gt;
|-&lt;br /&gt;
|6||320||5&lt;br /&gt;
|-&lt;br /&gt;
|7||240||4&lt;br /&gt;
|-&lt;br /&gt;
|8||160||3&lt;br /&gt;
|-&lt;br /&gt;
|9||80||2&lt;br /&gt;
|-&lt;br /&gt;
|10||40||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To cover multiple players being eliminated during a game where there is not Qualifying, their distance travelled before being eliminated is used as the final tie-break (only in non-team games). If a player overshoots a corner or crashes into the back of other cars, their position at the &#039;&#039;&#039;start&#039;&#039;&#039; of the turn is used.&lt;br /&gt;
&lt;br /&gt;
==Braking ==&lt;br /&gt;
&lt;br /&gt;
The original rules provide a table that describes the outcome of &amp;quot;Emergency Braking&amp;quot; (when a car is blocked by one or more cars which they are unable to overtake). The table does not take Constructed Cars into account, so to clarify, the implemented rules are:&lt;br /&gt;
&lt;br /&gt;
If a player performs Emergency Braking, they must move their car forward as many spaces as possible. If they need to brake more than 3 spaces, they are required to use Brake WPs for the first 3 spaces, and each subsequent space may be paid for using Brake WP *or* Tire WPs.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
==Qualifying ==&lt;br /&gt;
&lt;br /&gt;
Players do not roll the black starting die at the beginning of Qualifying: they just start in 1st gear.&lt;br /&gt;
&lt;br /&gt;
The original rules simply state that &amp;quot;WP are not taken into account&amp;quot; during qualifying. However, the effect of this is clarified in this adaptation:&lt;br /&gt;
&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
&lt;br /&gt;
In this version, Qualifying awards points as long as you complete your lap:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||10&lt;br /&gt;
|-&lt;br /&gt;
|2||9&lt;br /&gt;
|-&lt;br /&gt;
|3||8&lt;br /&gt;
|-&lt;br /&gt;
|4||7&lt;br /&gt;
|-&lt;br /&gt;
|5||6&lt;br /&gt;
|-&lt;br /&gt;
|6||5&lt;br /&gt;
|-&lt;br /&gt;
|7||4&lt;br /&gt;
|-&lt;br /&gt;
|8||3&lt;br /&gt;
|-&lt;br /&gt;
|9||2&lt;br /&gt;
|-&lt;br /&gt;
|10||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Collision Checks ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the active player checks for collisions only after all adjacent players have rolled. If an adjacent player fails their roll and is eliminated as a result, the active player will automatically fail their roll against that player.&lt;br /&gt;
&lt;br /&gt;
==Weather Rolls ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, the Weather die is thrown immediately when a player rolls the maximum number in 5th or 6th gear. In this adaptation, this roll still occurs but it is deferred until the end of the round. This way, weather can only change between rounds and not in the middle of a player&#039;s turn. If multiple players roll the maximum number, the weather die will be rolled multiple times.&lt;br /&gt;
&lt;br /&gt;
==Changeable Weather ==&lt;br /&gt;
&lt;br /&gt;
The original rules have 4 steps for Changeable Weather (Good, Good - Changeable, Rain - Changeable, Rain).&lt;br /&gt;
&lt;br /&gt;
In this adaptation, there are 5 steps: Good, Good - Temporary, Changeable, Rain - Temporary, Rain.&lt;br /&gt;
&lt;br /&gt;
Changeable is only ever used at the start of a race, and by default is Good - with one exception: if it rained in qualifying then a changeable feature race will start Changeable but raining.&lt;br /&gt;
&lt;br /&gt;
Weather will never be changeable in qualifying: it will be Good unless Rain is rolled.&lt;br /&gt;
&lt;br /&gt;
==Spinning ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that if a car on 0 Tire WP overshoots a corner then it &amp;quot;will again spin round in a circle. If the car overshoots the corner by more than one space, it is out of the race&amp;quot;. In this adaptation, a car with 0 Tire WP is eliminated if it overshoots a corner by more than 1 WP. Hence, even a single space overshoot will eliminate a 0 Tire WP car on soft tires.&lt;br /&gt;
&lt;br /&gt;
Additionally, in this adaptation when you spin, your Tire WP are reset to 1 WP (instead of remaining at 0 WP).&lt;br /&gt;
&lt;br /&gt;
==Skidding on Corners in the Rain ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that cars will skid in the rain &amp;quot;provided at least one space of the move lies within the limits of a corner&amp;quot;. In this adaptation, skidding will only occur on any turn that counts towards a corner&#039;s completion. That means:&lt;br /&gt;
&lt;br /&gt;
* Driving through a corner that you have already completed will &#039;&#039;not&#039;&#039; cause you to skid&lt;br /&gt;
* If you are on the final space in a corner and still need to land in it 1 more turn, you will skid on your next move even though you are driving into a straight&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Motor Damage Checks==&lt;br /&gt;
&lt;br /&gt;
Motor damage checks are always performed in round order.&lt;br /&gt;
&lt;br /&gt;
==Braking in the Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that the rules for braking do not apply in the pit lane. In this adaptation, there is no braking cost for stopping immediately behind another car, or in your pit box. However, there is a brake cost for travelling any distance shorter than that.&lt;br /&gt;
&lt;br /&gt;
== Pit Boxes ==&lt;br /&gt;
&lt;br /&gt;
In Individual Driver games, a single pit box will be reserved for each driver instead of drivers being assigned a pit box color. The box will be indicated with the player&#039;s avatar.&lt;br /&gt;
&lt;br /&gt;
== Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down DO apply in the pit lane.&lt;br /&gt;
&lt;br /&gt;
There are also minimum gears that may be used in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
== Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
The soft tire bonus may not be used when moving after a Quick Pit Stop.&lt;br /&gt;
&lt;br /&gt;
If Technical Pit Stops are enabled, players may always choose to take one (and thus finish their turn) even if they have no repair points or repairs to perform.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, if players have selected the option to Construct their own car then there are no limits to how many points they may assign to any given area.&lt;br /&gt;
&lt;br /&gt;
In games that have also selected the Technical Pit Stop rules, then instead of having a fixed 2 WPs available for Pit repairs, a player will have 22 WPs to use in Construction and can choose how many repair points to make available, with a maximum of 2.&lt;br /&gt;
&lt;br /&gt;
==Road Races ==&lt;br /&gt;
&lt;br /&gt;
The Road Race rules, including Drivers with special abilities, are not used.&lt;br /&gt;
&lt;br /&gt;
Where Road Race circuits are used, all non-standard rules are ignored.&lt;br /&gt;
&lt;br /&gt;
Nitro Fuel Injection is available as an option for all races.&lt;br /&gt;
&lt;br /&gt;
==Elimination ==&lt;br /&gt;
&lt;br /&gt;
When a player is eliminated, the outcome is slightly different from the published rules. &lt;br /&gt;
&lt;br /&gt;
*If the elimination was caused by the player overshooting corners, or driving over a damage marker, or quitting the car is immediately removed from the board and &#039;&#039;&#039;no damage marker is placed&#039;&#039;&#039;&lt;br /&gt;
*If the elimination was caused by the player failing a motor damage test, the car is immediately removed from the board and a damage marker is added.&lt;br /&gt;
*If the player is eliminated by any other reason, a damage marker is added and the car remains on the board until the end of the round, when it is removed.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28090</id>
		<title>Bugsclarification formulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28090"/>
		<updated>2026-01-15T04:39:20Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Corners ==&lt;br /&gt;
&lt;br /&gt;
=== I Stopped In A Corner But It Did Not Count ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? All corner stops are required. If you miss a stop in one corner and end your turn in a second corner, that stop counts ONLY AGAINST THE FIRST CORNER. You still need to stop in the second corner and if you move out of it without stopping again, you will be overshooting.&lt;br /&gt;
&lt;br /&gt;
=== I Exited A Corner And Crashed - Why? ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? If you skip Corner 1 and end your turn in Corner 2, that move only counts against Corner 1 and you STILL have to finish a turn in Corner 2. If you move out of Corner 2 at speed without stopping again in it, you will probably destroy your tires.&lt;br /&gt;
&lt;br /&gt;
=== I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
=== I Was Allowed To Change Lanes After Leaving A Corner ===&lt;br /&gt;
&lt;br /&gt;
Some players have been confused by the line in the rules &amp;quot;When coming out a corner the car may not change lanes&amp;quot;. Note that this line appears in the &#039;&#039;&#039;Overshooting&#039;&#039;&#039; section and is &#039;&#039;only&#039;&#039; intended to apply to cars that are overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
== Collisions ==&lt;br /&gt;
&lt;br /&gt;
=== A Car Ended It&#039;s Move Next To Another Car But No Collision Was Rolled ===&lt;br /&gt;
&lt;br /&gt;
Collisions are not rolled when a car ends its move IN FRONT of another car.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
=== I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28089</id>
		<title>Bugsclarification formulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28089"/>
		<updated>2026-01-15T04:38:48Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Corners ==&lt;br /&gt;
&lt;br /&gt;
=== I Stopped In A Corner But It Did Not Count ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? All corner stops are required. If you miss a stop in one corner and end your turn in a second corner, that stop counts ONLY AGAINST THE FIRST CORNER. You still need to stop in the second corner and if you move out of it without stopping again, you will be overshooting.&lt;br /&gt;
&lt;br /&gt;
=== I Exited A Corner And Crashed - Why? ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? If you skip Corner 1 and end your turn in Corner 2, that move only counts against Corner 1 and you STILL have to finish a turn in Corner 2. If you move out of Corner 2 at speed without stopping again in it, you will probably destroy your tires.&lt;br /&gt;
&lt;br /&gt;
=== I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
=== I Was Allowed To Change Lanes After Leaving A Corner ===&lt;br /&gt;
&lt;br /&gt;
Some players have been confused by the line in the rules &amp;quot;When coming out a corner the car may not change lanes&amp;quot;. Note that this line appears in the &#039;&#039;&#039;Overshooting&#039;&#039;&#039; section and is &#039;&#039;only&#039;&#039; intended to apply to cars that are overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
== Collisions ==&lt;br /&gt;
&lt;br /&gt;
=== A Car Ended It&#039;s Move Next To Another Car But No Collision Was Rolled ===&lt;br /&gt;
&lt;br /&gt;
Collisions are not rolled when a car ends its move IN FRONT of another car.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28088</id>
		<title>Bugsclarification formulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=28088"/>
		<updated>2026-01-15T04:38:07Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Corners ==&lt;br /&gt;
&lt;br /&gt;
=== I Stopped In A Corner But It Did Not Count ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? All corner stops are required. If you miss a stop in one corner and end your turn in a second corner, that stop counts ONLY AGAINST THE FIRST CORNER. You still need to stop in the second corner and if you move out of it without stopping again, you will be overshooting.&lt;br /&gt;
&lt;br /&gt;
=== I Exited A Corner And Crashed - Why? ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? If you skip Corner 1 and end your turn in Corner 2, that move only counts against Corner 1 and you STILL have to finish a turn in Corner 2. If you move out of Corner 2 at speed without stopping again in it, you will probably destroy your tires.&lt;br /&gt;
&lt;br /&gt;
=== I Wasn&#039;t Able To Enter the Pits After Exiting A Corner ===&lt;br /&gt;
&lt;br /&gt;
If you overshoot a corner, you are forced to travel in a straight line, so cars are unable to enter the pits on the same turn as overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
=== I Was Allowed To Change Lanes After Leaving A Corner ===&lt;br /&gt;
&lt;br /&gt;
Some players have been confused by the line in the rules &amp;quot;When coming out a corner the car may not change lanes&amp;quot;. Note that this line appears in the &#039;&#039;&#039;Overshooting&#039;&#039;&#039; section and is &#039;&#039;only&#039;&#039; intended to apply to cars that are overshooting a corner.&lt;br /&gt;
&lt;br /&gt;
=== A Car Ended It&#039;s Move Next To Another Car But No Collision Was Rolled ===&lt;br /&gt;
&lt;br /&gt;
Collisions are not rolled when a car ends its move IN FRONT of another car.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28027</id>
		<title>Gamehelpformulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28027"/>
		<updated>2026-01-10T23:22:41Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 10-Second Explainer of Formula D =&lt;br /&gt;
New to Formula D?&lt;br /&gt;
&lt;br /&gt;
This 10-second explainer will get you started:&lt;br /&gt;
&lt;br /&gt;
# Your car will start in 1st gear.&lt;br /&gt;
# At the start of your turn, your first decision is whether to stay on your current gear, or go up 1 gear or go down. You can go down 1 gear without penalty.&lt;br /&gt;
# After choosing a gear, you will roll the appropriate &amp;quot;gear die&amp;quot;. The higher the gear, the bigger the die.&lt;br /&gt;
# Once you have rolled, you must move the number of spaces rolled, although you may choose which path you take.&lt;br /&gt;
# Corners are areas marked in red. To drive around corners without penalty, you must finish at least 1 turn in them.&lt;br /&gt;
# Some corners are particularly slow and may require that you finish at least 2 or even 3 turns in them.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! There&#039;s a lot more to it than that, but this covers the absolute basics of driving safely around the track.&lt;br /&gt;
&lt;br /&gt;
= Important: BGA Rule Variations =&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
[[#BGA Rule Variations|At the end of these rules]], you will find a list of all differences from the published game rules.&lt;br /&gt;
&lt;br /&gt;
=Adaptation Notes/Common Mistakes=&lt;br /&gt;
&lt;br /&gt;
# The central area of your car is the colour of the pit box you must use (and your team if playing a team game)&lt;br /&gt;
# Your sidepods are your unique player color&lt;br /&gt;
# To enter the pitbox, you must move out of the pit lane and onto the coloured pit box. Stopping in the pit lane in front of your box is not a pit stop.&lt;br /&gt;
# To zoom the circuit in and out with a mouse, use Ctrl+Wheelmouse.&lt;br /&gt;
&lt;br /&gt;
=Basic Rules=&lt;br /&gt;
&lt;br /&gt;
== Aim of the game ==&lt;br /&gt;
&lt;br /&gt;
FORMULA D is a car race. The aim is to win a race (of one lap) and be the first to cross the finishing line. There are all sorts of risks involved and you have to anticipate what will happen during the course of the race. You must decide on your strategy, trust to luck, keep to the rules and always keep an eye on the technical condition of your car.&lt;br /&gt;
&lt;br /&gt;
== The gears ==&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears. Each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2 or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Color||Die||Movement (Number of spaces)&lt;br /&gt;
!Face distribution&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|1,1,2,2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|2,3,3,4,4,4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|4,5,6,6,7,7,8,8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|2 of each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Driving ==&lt;br /&gt;
&lt;br /&gt;
As in real life the car starts in 1st gear. Then you shift up to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is important especially in the corners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Order of play&#039;&#039;&#039;: In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Driving Code ==&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
===Driving code in the corners ===&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated in the yellow box) within the limits of the corner.  The number of filled red circles indicates the number of stops for that corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refer to the longest path, the numbers in the red box refer to the shortest path.&lt;br /&gt;
&lt;br /&gt;
===Driving code on the straights ===&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
==Wear points (WP) ==&lt;br /&gt;
&lt;br /&gt;
They reflect the capability of the car to stay on the track and survive events during the race. In the Basic Game, each car has 18 WP at the beginning of the race. The players use these points to survive various incidents and risky maneuvers.&lt;br /&gt;
&lt;br /&gt;
==Preparation for play ==&lt;br /&gt;
&lt;br /&gt;
===Start formation ===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. In the case of a tie, all involved players re-roll the die.&lt;br /&gt;
&lt;br /&gt;
===Start ===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: 1 – poor start&#039;&#039;&#039;. The player has stalled the motor of their car. They cannot engage 1st gear and so they have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 2 and 16&#039;&#039;&#039; – normal start. The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 17 and 20&#039;&#039;&#039; – great start! The player makes a fantastic start. They moves their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their WP at any time to avoid having to advance the full number of spaces shown on the die. In this way they can control their progress better, for example when the lanes are blocked by other cars.&lt;br /&gt;
&lt;br /&gt;
==Changing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox. The number of gears skipped equates to the number of WP their car loses as a result. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a number between 1 and 4 their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Two-lap race==&lt;br /&gt;
&lt;br /&gt;
For players who have already played several single-lap games.&lt;br /&gt;
&lt;br /&gt;
Whoever crosses the finishing line first after two laps wins the game. Players may make a pit stop between the first and second laps to regain the WP points they lost during the first round.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap a player may decide to make a pit stop to regain all the WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one’s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the colour of your car&#039;s central strip.&lt;br /&gt;
&lt;br /&gt;
===Entering pits===&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is sufficient to roll the minimum number required or higher using the die corresponding to the selected gear. The car receives all 18 WP back and awaits their next turn to start from the pits in 4th gear (maximum).&lt;br /&gt;
&lt;br /&gt;
The rules for changing down gear, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
There are minimum gears required in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
=Advanced Rules=&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
===The gears===&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears, each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2, or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Die Color||Die Size||Movement (Number of spaces)&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Driving===&lt;br /&gt;
&lt;br /&gt;
As in real life, the car starts in 1st gear. Then you up shift to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then rolls the die which corresponds to the chosen speed. They then moves their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is important especially in the corners.&lt;br /&gt;
&lt;br /&gt;
====Order of play====&lt;br /&gt;
&lt;br /&gt;
In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Same position====&lt;br /&gt;
&lt;br /&gt;
If two cars on the track are level with each other, the driver with the highest gear plays first.&lt;br /&gt;
&lt;br /&gt;
If both cars are in the same gear, the car that arrived first at their current space plays first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Driving Code===&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
====Driving code in the corners====&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated by the number of red stop lights in the corner information box) within the limits of the corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refer to the longest path, the numbers in the red box refer to the shortest path.&lt;br /&gt;
&lt;br /&gt;
====Driving code on the straights====&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wear points (WP)===&lt;br /&gt;
&lt;br /&gt;
Wear Points reflect the ability of the car to stay on the track and survive events during the race. Each car has a certain number of WP at the beginning of the race, which are divided up between six different categories. These points are distributed as follows in the game for advanced players:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|WP tires:||6&lt;br /&gt;
|-&lt;br /&gt;
|WP brakes:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP gearbox:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP car body:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP engine:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP road handling:||2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Preparation for play==&lt;br /&gt;
&lt;br /&gt;
===Start formation===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. (ln the case of a tie, all concerned players re-roll the die.)&lt;br /&gt;
&lt;br /&gt;
===Start===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
====Number rolled, 1 - poor start====&lt;br /&gt;
&lt;br /&gt;
The player has stalled the motor of their car. They cannot engage 1st gear and so have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: between 2 and 19 - normal start====&lt;br /&gt;
&lt;br /&gt;
The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: 2O - great start!====&lt;br /&gt;
&lt;br /&gt;
The player makes a fantastic start. They move their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s tire WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
When a car loses their last tire WP by overshooting a corner, they spin round in a circle. The car is placed on the space where their move ended, pointing backwards. The player must turn their car round again and drive off in 1st gear when it is their next turn. In this adaptation, their Tire WPs are reset to 1.&lt;br /&gt;
&lt;br /&gt;
If a car loses more tire WP than it possesses, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their brake WP at any time to avoid having to advance the full number of spaces shown on the die. This can help to prevent losing tire WP if they would otherwise overshoot a corner.&lt;br /&gt;
&lt;br /&gt;
A driver can find themselves blocked by one or more cars which they are unable to overtake. After the driver has moved their car forward as many spaces as possible, they counts how many spaces they would have moved if they had not been blocked.&lt;br /&gt;
&lt;br /&gt;
If the number of spaces short of the full number 4 or greater, they may use Emergency Braking. In this case, their first 3 spaces must be paid for with Brake WP. Each additional space after that may be paid by either Brake or Tire WP.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
If a car doesn&#039;t have enough brake WP and tire WP to stop before a blockage, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Gearing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox.&lt;br /&gt;
&lt;br /&gt;
As a result, the car then loses a certain number of brake WP, engine WP and gearbox WP. The table below lists the corresponding wear. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gears skipped!!Gearbox WP!!Brake WP!!Engine WP&lt;br /&gt;
|-&lt;br /&gt;
|1 gear||1||0||0&lt;br /&gt;
|-&lt;br /&gt;
|2 gears||1||1||0&lt;br /&gt;
|-&lt;br /&gt;
|3 gears||1||1||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a car has no gearbox WP left, the driver can only change clown one gear at a time until the game is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they rolls a 1, their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In this adaptation&#039;&#039;&#039; the car that did not just move rolls first. If it fails the roll and is eliminated from the race as a result, the car that moved will automatically fail its roll.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last car body WP, it is eliminated&#039;&#039;&#039; from the race.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 engine WP.&lt;br /&gt;
&lt;br /&gt;
If a car loses its last engine WP, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Damage and road handling==&lt;br /&gt;
&lt;br /&gt;
Each time a car loses a car body WP or an engine WP, a damage marker is placed on the space where the move ended.&lt;br /&gt;
&lt;br /&gt;
The same applies whenever a car is eliminated from the race for whatever reason. These spaces are judged to be &amp;quot;dangerous&amp;quot; from then on.&lt;br /&gt;
&lt;br /&gt;
If a car passes over one of these spaces or lands on it, the driver must roll the black die. If the result is between 1 and 4, the car loses one road handling WP. The dangerous spaces can be avoided by changing lanes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last road handling WP, it is eliminated from the race.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If a car drives in the wake of another car, this is called slipstreaming.&lt;br /&gt;
&lt;br /&gt;
For the two concerned drivers, slipstreaming is possible from the 4th gear on.&lt;br /&gt;
&lt;br /&gt;
The car must be driving as fast or faster than the car in front.&lt;br /&gt;
&lt;br /&gt;
If a car wants to profit from slipstreaming after moving, it has to stop directly behind another car. From this position they can then add 3 spaces onto their last move. They can move forward 3 spaces in the following way:&lt;br /&gt;
&lt;br /&gt;
*change a lane, overtake the car in front and return to the original lane.&lt;br /&gt;
*change a lane and move two spaces in a straight line.&lt;br /&gt;
*change two lanes and move one space in a straight line.&lt;br /&gt;
&lt;br /&gt;
The player must move a total of three spaces in any case. (However, the driver may use brake WP in order to reduce this number of spaces.) If slipstreaming brings a car up immediately behind another car, they can carry on slipstreaming (and so on).&lt;br /&gt;
&lt;br /&gt;
If a car is carried into a corner by slipstreaming, they lose a brake WP (without the number of spaces being reduced).&lt;br /&gt;
&lt;br /&gt;
In a corner, a slipstreaming car must follow normal driving code (eg. following the arrows).&lt;br /&gt;
&lt;br /&gt;
Braking in order to take advantage of slipstreaming in the wake of another player&#039;s car is not allowed.&lt;br /&gt;
&lt;br /&gt;
Drivers do not have to slipstream!&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap, a player may decide to make a pit stop to regain all the tire WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one&#039;s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the central colour of your car.&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is necessary to roll the minimum number required or higher using the die corresponding to the selected gear. As soon as the car enters the pits, it receives all its tire WP back. The player now rolls the black die, in order to see how fast their mechanics work.&lt;br /&gt;
&lt;br /&gt;
===Result between 1 and 10: quick pit stop===&lt;br /&gt;
&lt;br /&gt;
The player divides the number shown on the black die by two (rounding it up if necessary). The result is the number of spaces the car is allowed to move when the car leaves the pit in 4th gear.&lt;br /&gt;
&lt;br /&gt;
===Result between 11 and 20: slow pit stop===&lt;br /&gt;
&lt;br /&gt;
The car remains in the pit until the next round. Then the car moves on in 4th gear (or a lower gear).&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Optional Rules=&lt;br /&gt;
&lt;br /&gt;
All the following rules can be used of one another.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car==&lt;br /&gt;
&lt;br /&gt;
Every player can distribute their 20 WP between the zones of their car at their own discretion. At least 1 WP must be assigned to each zone.&lt;br /&gt;
&lt;br /&gt;
If using the Technical Pit Stops option, 2 addition WPs are available to assign, and players may assign 0-2 points to Repair points.&lt;br /&gt;
&lt;br /&gt;
==Qualifying lap with a stopwatch==&lt;br /&gt;
&lt;br /&gt;
All players drive a qualifying lap with stopwatch consecutively, in order to determine their start positions. The rules for moves and driving code remain unchanged during the qualifier, however the WP are not taken into account. The only exception is if a car overshoots a corner - this is penalized.&lt;br /&gt;
&lt;br /&gt;
* The player whose turn it is to drive a qualifying lap places their car in the middle lane in front of the starting line.&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
* The player receives a total number of points over their lap: &lt;br /&gt;
**1 point for each round the player takes to complete the lap&lt;br /&gt;
**1 point for each space the player overshoots a corner by (soft tires will have their points doubled)&lt;br /&gt;
**1 point for every full real-time minute it takes the player to complete the lap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The qualifying lap is over if the driver does not stop at all in corners where two or three stops are required. They then have to start the race at the back of the field from the last start position.&lt;br /&gt;
&lt;br /&gt;
After that the order of starting is determined: the car which has completed the qualifying lap with the fewest points takes first position. The other cars follow on in decreasing order of points. If two drivers have the same number of points, the real time taken to complete the lap decides: the fastest player gets the better start position.&lt;br /&gt;
&lt;br /&gt;
== Weather Conditions ==&lt;br /&gt;
&lt;br /&gt;
There is a weather chart for each &amp;quot;Formula D&amp;quot; racing circuit, which is available to all players before the game so that they can inform themselves about weather conditions during the race and qualifying laps.&lt;br /&gt;
&lt;br /&gt;
lf the weather rules are used, it is strongly recommended that the tire selection rules be used as well.&lt;br /&gt;
&lt;br /&gt;
Before the qualifying laps begin, the black die is rolled and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039; or &#039;&#039;&#039;Changable&#039;&#039;&#039;: no problems for drivers&lt;br /&gt;
&#039;&#039;&#039;Rain&#039;&#039;&#039;: The qualifying laps for all players take place in rain (see below).&lt;br /&gt;
&lt;br /&gt;
Before the actual race begins, the black die is rolled again and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039;: no problem.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: The sky is overcast at the beginning of the race, but is does not rain &#039;&#039;&#039;unless&#039;&#039;&#039; it rained during qualifying. Either way, this can change during the course of the race. Whenever a player in 5th gear throws a 20 or a 3O in 6th gear, at the end of the round they have to roll the black die and consult the weather chart:&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;good weather&amp;quot; comes up. the weather conditions are shifted one line upwards.&lt;br /&gt;
If &amp;quot;rain&amp;quot; is the result, the weather conditions are shifted one line downwards.&lt;br /&gt;
If the result is &amp;quot;changeable&amp;quot;, the weather stays the same.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Weather&#039;&#039;&#039;||&#039;&#039;&#039;Effect on race&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Good||None. The weather will no longer change.&lt;br /&gt;
|-&lt;br /&gt;
|Good (Temporary)||None.&lt;br /&gt;
|-&lt;br /&gt;
|Changable||This is the starting step and once the weather conditions shift up or down off Changeable, it will be skipped for the rest of the game.&lt;br /&gt;
|-&lt;br /&gt;
|Rain (Temporary)||Rain.&lt;br /&gt;
|-&lt;br /&gt;
|Rain||Rain. The weather will no longer change.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effect of rain ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Collision&#039;&#039;&#039;: A result of 1 or 2 (instead of just a 1, as in good weather) means a collision occurs.&lt;br /&gt;
* &#039;&#039;&#039;Engine damage&#039;&#039;&#039;: Occurs when result is between 1 and 3 (instead of between 1 and 4, as in good weather).&lt;br /&gt;
* &#039;&#039;&#039;Road handling&#039;&#039;&#039;: The car loses one road handling WP for a result between 1 and 5 (instead of between 1 and 4, as in good weather)&lt;br /&gt;
* &#039;&#039;&#039;Skidding on corners&#039;&#039;&#039;: Cars will skid on corners depending on their tire selection. See &amp;quot;Selection of tires&amp;quot;, below.&lt;br /&gt;
&lt;br /&gt;
== Selection of tires ==&lt;br /&gt;
&lt;br /&gt;
The choice of tires is crucial not just for qualifying lap, but for the race itself. When weather conditions have been determined, each player can fit their car with special tires (see below). It is also possible to change tires between qualifying lap and the race.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hard Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommencled on a dry track and inefficient on a wet track.&lt;br /&gt;
&lt;br /&gt;
* The game rules apply unchanged if the weather is good or changeable.&lt;br /&gt;
* If it is raining, the car moves three additional spaces on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
=== Soft Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient - if not handicapping - on a wet track.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the car can move one additional space during each move in the qualifying or race laps. This additional move is not compulsory. But if a car overshoots a corner, the penalty is doubled (loss of tire WP). if a driver does not change their tires during a pit stop after the first lap, they lose the bonus. If a driver does not change their tires during a pit stop after the second lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
* If it is raining, the car travels three spaces further on any turn which contributes to advancing a corner. If a driver cloes not change their tires during a pit stop before beginning the third lap, the penalties For overshooting  a corner are trebled.&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
=== Rain Tires ===&lt;br /&gt;
&lt;br /&gt;
They are highly recommended if it is raining, but are otherwise very sensitive.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the penalties for overshooting a corner are doubled (loss of tire WP) for qualifying and the first two laps of the race. If a driver does not change their tires before the third race lap, the&lt;br /&gt;
penalties are trebled.&lt;br /&gt;
* If it is raining, the car travels one space further on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
== Technical Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
Your pit has 2 WP which can be used during the race to regain lost WP (with the exception of tire WP). Every time a driver makes a pit stop they can choose between two options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tire pit stop&#039;&#039;&#039;: As in the rules for advanced players, except that the driver may change the type of tire whenever they changes tires.&lt;br /&gt;
* &#039;&#039;&#039;Technlcal pit stop&#039;&#039;&#039;: The driver can change their tires (see above) and in addition regain up to two WP in one or two zones (except the tires). This &amp;quot;reservoir&amp;quot; of 2 WP applies for the entire duration of the race, even if it lasts for more than two laps. In the next round, the car may not start higher than 4th gear. A car with soft tires does not profit from the bonus of an additional space when leaving the pits.&lt;br /&gt;
&lt;br /&gt;
== Team Race ==&lt;br /&gt;
&lt;br /&gt;
A game using these rules is appropriate for a large group with an even number of players. The players form teams each with two players; each colour corresponds to a racing team. Apart from the following two exceptions, the rules apply unchanged:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Pit stop&#039;&#039;&#039;: Each team has 4 WP to repair the cars. Both players must decide together how they want to use these points.&lt;br /&gt;
* &#039;&#039;&#039;Winner by points&#039;&#039;&#039;: A team race is not necessarily won by the first car to cross the finishing line. Each car receives a certain number of winning points. The team with the highest number of total points wins the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000&lt;br /&gt;
|-&lt;br /&gt;
|2||720&lt;br /&gt;
|-&lt;br /&gt;
|3||600&lt;br /&gt;
|-&lt;br /&gt;
|4||480&lt;br /&gt;
|-&lt;br /&gt;
|5||400&lt;br /&gt;
|-&lt;br /&gt;
|6||320&lt;br /&gt;
|-&lt;br /&gt;
|7||240&lt;br /&gt;
|-&lt;br /&gt;
|8||160&lt;br /&gt;
|-&lt;br /&gt;
|9||80&lt;br /&gt;
|-&lt;br /&gt;
|10||40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that these points differ from the published rules. If qualifying is enabled, qualifying points are also awarded equally to both members of the team.&lt;br /&gt;
&lt;br /&gt;
== Nitro Fuel ==&lt;br /&gt;
&lt;br /&gt;
When this option is chosen, all cars have a nitro Fuel injection, which allows instant acceleration. Players can use their nitro once a lap after rolling the corresponding gear die. They receive a movement bonus according to the gear they are using at that moment (1 space in 1st gear, 2 spaces in 2nd gear, etc.). This bonus must be used completely.&lt;br /&gt;
&lt;br /&gt;
When a car pits, or crosses the finish line at the end of a lap, it replenishes its nitro fuel and may use it again.&lt;br /&gt;
&lt;br /&gt;
Nitro may only be used if it is available when rolling the gear die. It does not become available during the same move where you complete a lap.&lt;br /&gt;
&lt;br /&gt;
= BGA Rule Variations=&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
The differences from the rules you will find in your own copy of Formula D are:&lt;br /&gt;
&lt;br /&gt;
==Round Order ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, if two cars are level with each other, the driver with the highest gear plays first. If both cars are in the same gear, the car nearest the inside with reference to the next (or the current) corner plays first.&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the higher gear continues to be first but if both cars are in the same gear *then the player who first arrived at their space* goes first. Corners no longer affect who goes first.&lt;br /&gt;
&lt;br /&gt;
==Points ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, points are awarded for race completion &#039;&#039;&#039;and&#039;&#039;&#039; for Qualifying (if enabled). The Qualifying points are minor by comparison and serve as a tie-break if two players are both eliminated and score 0 in the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;&#039;||&#039;&#039;&#039;Race Points&#039;&#039;&#039;||&#039;&#039;&#039;Qualifying Points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000||10&lt;br /&gt;
|-&lt;br /&gt;
|2||720||9&lt;br /&gt;
|-&lt;br /&gt;
|3||600||8&lt;br /&gt;
|-&lt;br /&gt;
|4||480||7&lt;br /&gt;
|-&lt;br /&gt;
|5||400||6&lt;br /&gt;
|-&lt;br /&gt;
|6||320||5&lt;br /&gt;
|-&lt;br /&gt;
|7||240||4&lt;br /&gt;
|-&lt;br /&gt;
|8||160||3&lt;br /&gt;
|-&lt;br /&gt;
|9||80||2&lt;br /&gt;
|-&lt;br /&gt;
|10||40||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To cover multiple players being eliminated during a game where there is not Qualifying, their distance travelled before being eliminated is used as the final tie-break (only in non-team games). If a player overshoots a corner or crashes into the back of other cars, their position at the &#039;&#039;&#039;start&#039;&#039;&#039; of the turn is used.&lt;br /&gt;
&lt;br /&gt;
==Braking ==&lt;br /&gt;
&lt;br /&gt;
The original rules provide a table that describes the outcome of &amp;quot;Emergency Braking&amp;quot; (when a car is blocked by one or more cars which they are unable to overtake). The table does not take Constructed Cars into account, so to clarify, the implemented rules are:&lt;br /&gt;
&lt;br /&gt;
If a player performs Emergency Braking, they must move their car forward as many spaces as possible. If they need to brake more than 3 spaces, they are required to use Brake WPs for the first 3 spaces, and each subsequent space may be paid for using Brake WP *or* Tire WPs.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
==Qualifying ==&lt;br /&gt;
&lt;br /&gt;
Players do not roll the black starting die at the beginning of Qualifying: they just start in 1st gear.&lt;br /&gt;
&lt;br /&gt;
The original rules simply state that &amp;quot;WP are not taken into account&amp;quot; during qualifying. However, the effect of this is clarified in this adaptation:&lt;br /&gt;
&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
&lt;br /&gt;
In this version, Qualifying awards points as long as you complete your lap:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||10&lt;br /&gt;
|-&lt;br /&gt;
|2||9&lt;br /&gt;
|-&lt;br /&gt;
|3||8&lt;br /&gt;
|-&lt;br /&gt;
|4||7&lt;br /&gt;
|-&lt;br /&gt;
|5||6&lt;br /&gt;
|-&lt;br /&gt;
|6||5&lt;br /&gt;
|-&lt;br /&gt;
|7||4&lt;br /&gt;
|-&lt;br /&gt;
|8||3&lt;br /&gt;
|-&lt;br /&gt;
|9||2&lt;br /&gt;
|-&lt;br /&gt;
|10||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Collision Checks ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the active player checks for collisions only after all adjacent players have rolled. If an adjacent player fails their roll and is eliminated as a result, the active player will automatically fail their roll against that player.&lt;br /&gt;
&lt;br /&gt;
==Weather Rolls ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, the Weather die is thrown immediately when a player rolls the maximum number in 5th or 6th gear. In this adaptation, this roll still occurs but it is deferred until the end of the round. This way, weather can only change between rounds and not in the middle of a player&#039;s turn. If multiple players roll the maximum number, the weather die will be rolled multiple times.&lt;br /&gt;
&lt;br /&gt;
==Changeable Weather ==&lt;br /&gt;
&lt;br /&gt;
The original rules have 4 steps for Changeable Weather (Good, Good - Changeable, Rain - Changeable, Rain).&lt;br /&gt;
&lt;br /&gt;
In this adaptation, there are 5 steps: Good, Good - Temporary, Changeable, Rain - Temporary, Rain.&lt;br /&gt;
&lt;br /&gt;
Changeable is only ever used at the start of a race, and by default is Good - with one exception: if it rained in qualifying then a changeable feature race will start Changeable but raining.&lt;br /&gt;
&lt;br /&gt;
Weather will never be changeable in qualifying: it will be Good unless Rain is rolled.&lt;br /&gt;
&lt;br /&gt;
==Spinning ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that if a car on 0 Tire WP overshoots a corner then it &amp;quot;will again spin round in a circle. If the car overshoots the corner by more than one space, it is out of the race&amp;quot;. In this adaptation, a car with 0 Tire WP is eliminated if it overshoots a corner by more than 1 WP. Hence, even a single space overshoot will eliminate a 0 Tire WP car on soft tires.&lt;br /&gt;
&lt;br /&gt;
Additionally, in this adaptation when you spin, your Tire WP are reset to 1 WP (instead of remaining at 0 WP).&lt;br /&gt;
&lt;br /&gt;
==Skidding on Corners in the Rain ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that cars will skid in the rain &amp;quot;provided at least one space of the move lies within the limits of a corner&amp;quot;. In this adaptation, skidding will only occur on any turn that counts towards a corner&#039;s completion. That means:&lt;br /&gt;
&lt;br /&gt;
* Driving through a corner that you have already completed will &#039;&#039;not&#039;&#039; cause you to skid&lt;br /&gt;
* If you are on the final space in a corner and still need to land in it 1 more turn, you will skid on your next move even though you are driving into a straight&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Motor Damage Checks==&lt;br /&gt;
&lt;br /&gt;
Motor damage checks are always performed in round order.&lt;br /&gt;
&lt;br /&gt;
==Braking in the Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that the rules for braking do not apply in the pit lane. In this adaptation, there is no braking cost for stopping immediately behind another car, or in your pit box. However, there is a brake cost for travelling any distance shorter than that.&lt;br /&gt;
&lt;br /&gt;
== Pit Boxes ==&lt;br /&gt;
&lt;br /&gt;
In Individual Driver games, a single pit box will be reserved for each driver instead of drivers being assigned a pit box color. The box will be indicated with the player&#039;s avatar.&lt;br /&gt;
&lt;br /&gt;
== Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down DO apply in the pit lane.&lt;br /&gt;
&lt;br /&gt;
There are also minimum gears that may be used in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
== Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
The soft tire bonus may not be used when moving after a Quick Pit Stop.&lt;br /&gt;
&lt;br /&gt;
If Technical Pit Stops are enabled, players may always choose to take one (and thus finish their turn) even if they have no repair points or repairs to perform.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, if players have selected the option to Construct their own car then there are no limits to how many points they may assign to any given area.&lt;br /&gt;
&lt;br /&gt;
In games that have also selected the Technical Pit Stop rules, then instead of having a fixed 2 WPs available for Pit repairs, a player will have 22 WPs to use in Construction and can choose how many repair points to make available, with a maximum of 2.&lt;br /&gt;
&lt;br /&gt;
==Road Races ==&lt;br /&gt;
&lt;br /&gt;
The Road Race rules, including Drivers with special abilities, are not used.&lt;br /&gt;
&lt;br /&gt;
Where Road Race circuits are used, all non-standard rules are ignored.&lt;br /&gt;
&lt;br /&gt;
Nitro Fuel Injection is available as an option for all races.&lt;br /&gt;
&lt;br /&gt;
==Elimination ==&lt;br /&gt;
&lt;br /&gt;
When a player is eliminated, the outcome is slightly different from the published rules. &lt;br /&gt;
&lt;br /&gt;
*If the elimination was caused by the player overshooting corners, or driving over a damage marker, or quitting the car is immediately removed from the board and &#039;&#039;&#039;no damage marker is placed&#039;&#039;&#039;&lt;br /&gt;
*If the elimination was caused by the player failing a motor damage test, the car is immediately removed from the board and a damage marker is added.&lt;br /&gt;
*If the player is eliminated by any other reason, a damage marker is added and the car remains on the board until the end of the round, when it is removed.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28021</id>
		<title>Gamehelpformulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=28021"/>
		<updated>2026-01-09T21:53:02Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Nitro Fuel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 10-Second Explainer of Formula D =&lt;br /&gt;
New to Formula D?&lt;br /&gt;
&lt;br /&gt;
This 10-second explainer will get you started:&lt;br /&gt;
&lt;br /&gt;
# Your car will start in 1st gear.&lt;br /&gt;
# At the start of your turn, your first decision is whether to stay on your current gear, or go up 1 gear or go down. You can go down 1 gear without penalty.&lt;br /&gt;
# After choosing a gear, you will roll the appropriate &amp;quot;gear die&amp;quot;. The higher the gear, the bigger the die.&lt;br /&gt;
# Once you have rolled, you must move the number of spaces rolled, although you may choose which path you take.&lt;br /&gt;
# Corners are areas marked in red. To drive around corners without penalty, you must finish at least 1 turn in them.&lt;br /&gt;
# Some corners are particularly slow and may require that you finish at least 2 or even 3 turns in them.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! There&#039;s a lot more to it than that, but this covers the absolute basics of driving safely around the track.&lt;br /&gt;
&lt;br /&gt;
= Important: BGA Rule Variations =&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
[[#BGA Rule Variations|At the end of these rules]], you will find a list of all differences from the published game rules.&lt;br /&gt;
&lt;br /&gt;
=Adaptation Notes/Common Mistakes=&lt;br /&gt;
&lt;br /&gt;
# The central area of your car is the colour of the pit box you must use (and your team if playing a team game)&lt;br /&gt;
# Your sidepods are your unique player color&lt;br /&gt;
# To enter the pitbox, you must move out of the pit lane and onto the coloured pit box. Stopping in the pit lane in front of your box is not a pit stop.&lt;br /&gt;
# To zoom the circuit in and out with a mouse, use Ctrl+Wheelmouse.&lt;br /&gt;
&lt;br /&gt;
=Basic Rules=&lt;br /&gt;
&lt;br /&gt;
== Aim of the game ==&lt;br /&gt;
&lt;br /&gt;
FORMULA D is a car race. The aim is to win a race (of one lap) and be the first to cross the finishing line. There are all sorts of risks involved and you have to anticipate what will happen during the course of the race. You must decide on your strategy, trust to luck, keep to the rules and always keep an eye on the technical condition of your car.&lt;br /&gt;
&lt;br /&gt;
== The gears ==&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears. Each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2 or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Color||Die||Movement (Number of spaces)&lt;br /&gt;
!Face distribution&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|1,1,2,2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|2,3,3,4,4,4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|4,5,6,6,7,7,8,8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|2 of each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Driving ==&lt;br /&gt;
&lt;br /&gt;
As in real life the car starts in 1st gear. Then you shift up to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is important especially in the corners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Order of play&#039;&#039;&#039;: In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Driving Code ==&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
===Driving code in the corners ===&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated in the yellow box) within the limits of the corner.  The number of filled red circles indicates the number of stops for that corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refer to the longest path, the numbers in the red box refer to the shortest path.&lt;br /&gt;
&lt;br /&gt;
===Driving code on the straights ===&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
==Wear points (WP) ==&lt;br /&gt;
&lt;br /&gt;
They reflect the capability of the car to stay on the track and survive events during the race. In the Basic Game, each car has 18 WP at the beginning of the race. The players use these points to survive various incidents and risky maneuvers.&lt;br /&gt;
&lt;br /&gt;
==Preparation for play ==&lt;br /&gt;
&lt;br /&gt;
===Start formation ===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. In the case of a tie, all involved players re-roll the die.&lt;br /&gt;
&lt;br /&gt;
===Start ===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: 1 – poor start&#039;&#039;&#039;. The player has stalled the motor of their car. They cannot engage 1st gear and so they have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 2 and 16&#039;&#039;&#039; – normal start. The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 17 and 20&#039;&#039;&#039; – great start! The player makes a fantastic start. They moves their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their WP at any time to avoid having to advance the full number of spaces shown on the die. In this way they can control their progress better, for example when the lanes are blocked by other cars.&lt;br /&gt;
&lt;br /&gt;
==Changing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox. The number of gears skipped equates to the number of WP their car loses as a result. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a number between 1 and 4 their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Two-lap race==&lt;br /&gt;
&lt;br /&gt;
For players who have already played several single-lap games.&lt;br /&gt;
&lt;br /&gt;
Whoever crosses the finishing line first after two laps wins the game. Players may make a pit stop between the first and second laps to regain the WP points they lost during the first round.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap a player may decide to make a pit stop to regain all the WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one’s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the colour of your car&#039;s central strip.&lt;br /&gt;
&lt;br /&gt;
===Entering pits===&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is sufficient to roll the minimum number required or higher using the die corresponding to the selected gear. The car receives all 18 WP back and awaits their next turn to start from the pits in 4th gear (maximum).&lt;br /&gt;
&lt;br /&gt;
The rules for changing down gear, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
There are minimum gears required in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
=Advanced Rules=&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
===The gears===&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears, each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2, or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Die Color||Die Size||Movement (Number of spaces)&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Driving===&lt;br /&gt;
&lt;br /&gt;
As in real life, the car starts in 1st gear. Then you up shift to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then rolls the die which corresponds to the chosen speed. They then moves their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is important especially in the corners.&lt;br /&gt;
&lt;br /&gt;
====Order of play====&lt;br /&gt;
&lt;br /&gt;
In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Same position====&lt;br /&gt;
&lt;br /&gt;
If two cars on the track are level with each other, the driver with the highest gear plays first.&lt;br /&gt;
&lt;br /&gt;
If both cars are in the same gear, the car that arrived first at their current space plays first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Driving Code===&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
====Driving code in the corners====&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated by the number of red stop lights in the corner information box) within the limits of the corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refer to the longest path, the numbers in the red box refer to the shortest path.&lt;br /&gt;
&lt;br /&gt;
====Driving code on the straights====&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wear points (WP)===&lt;br /&gt;
&lt;br /&gt;
Wear Points reflect the ability of the car to stay on the track and survive events during the race. Each car has a certain number of WP at the beginning of the race, which are divided up between six different categories. These points are distributed as follows in the game for advanced players:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|WP tires:||6&lt;br /&gt;
|-&lt;br /&gt;
|WP brakes:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP gearbox:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP car body:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP engine:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP road handling:||2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Preparation for play==&lt;br /&gt;
&lt;br /&gt;
===Start formation===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. (ln the case of a tie, all concerned players re-roll the die.)&lt;br /&gt;
&lt;br /&gt;
===Start===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
====Number rolled, 1 - poor start====&lt;br /&gt;
&lt;br /&gt;
The player has stalled the motor of their car. They cannot engage 1st gear and so have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: between 2 and 19 - normal start====&lt;br /&gt;
&lt;br /&gt;
The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: 2O - great start!====&lt;br /&gt;
&lt;br /&gt;
The player makes a fantastic start. They move their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s tire WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
When a car loses their last tire WP by overshooting a corner, they spin round in a circle. The car is placed on the space where their move ended, pointing backwards. The player must turn their car round again and drive off in 1st gear when it is their next turn. In this adaptation, their Tire WPs are reset to 1.&lt;br /&gt;
&lt;br /&gt;
If a car loses more tire WP than it possesses, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their brake WP at any time to avoid having to advance the full number of spaces shown on the die. This can help to prevent losing tire WP if they would otherwise overshoot a corner.&lt;br /&gt;
&lt;br /&gt;
A driver can find themselves blocked by one or more cars which they are unable to overtake. After the driver has moved their car forward as many spaces as possible, they counts how many spaces they would have moved if they had not been blocked.&lt;br /&gt;
&lt;br /&gt;
If the number of spaces short of the full number 4 or greater, they may use Emergency Braking. In this case, their first 3 spaces must be paid for with Brake WP. Each additional space after that may be paid by either Brake or Tire WP.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
If a car doesn&#039;t have enough brake WP and tire WP to stop before a blockage, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Gearing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox.&lt;br /&gt;
&lt;br /&gt;
As a result, the car then loses a certain number of brake WP, engine WP and gearbox WP. The table below lists the corresponding wear. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gears skipped!!Gearbox WP!!Brake WP!!Engine WP&lt;br /&gt;
|-&lt;br /&gt;
|1 gear||1||0||0&lt;br /&gt;
|-&lt;br /&gt;
|2 gears||1||1||0&lt;br /&gt;
|-&lt;br /&gt;
|3 gears||1||1||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a car has no gearbox WP left, the driver can only change clown one gear at a time until the game is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they rolls a 1, their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In this adaptation&#039;&#039;&#039; the car that did not just move rolls first. If it fails the roll and is eliminated from the race as a result, the car that moved will automatically fail its roll.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last car body WP, it is eliminated&#039;&#039;&#039; from the race.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 engine WP.&lt;br /&gt;
&lt;br /&gt;
If a car loses its last engine WP, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Damage and road handling==&lt;br /&gt;
&lt;br /&gt;
Each time a car loses a car body WP or an engine WP, a damage marker is placed on the space where the move ended.&lt;br /&gt;
&lt;br /&gt;
The same applies whenever a car is eliminated from the race for whatever reason. These spaces are judged to be &amp;quot;dangerous&amp;quot; from then on.&lt;br /&gt;
&lt;br /&gt;
If a car passes over one of these spaces or lands on it, the driver must roll the black die. If the result is between 1 and 4, the car loses one road handling WP. The dangerous spaces can be avoided by changing lanes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last road handling WP, it is eliminated from the race.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If a car drives in the wake of another car, this is called slipstreaming.&lt;br /&gt;
&lt;br /&gt;
For the two concerned drivers, slipstreaming is possible from the 4th gear on.&lt;br /&gt;
&lt;br /&gt;
The car must be driving as fast or faster than the car in front.&lt;br /&gt;
&lt;br /&gt;
If a car wants to profit from slipstreaming after moving, it has to stop directly behind another car. From this position they can then add 3 spaces onto their last move. They can move forward 3 spaces in the following way:&lt;br /&gt;
&lt;br /&gt;
*change a lane, overtake the car in front and return to the original lane.&lt;br /&gt;
*change a lane and move two spaces in a straight line.&lt;br /&gt;
*change two lanes and move one space in a straight line.&lt;br /&gt;
&lt;br /&gt;
The player must move a total of three spaces in any case. (However, the driver may use brake WP in order to reduce this number of spaces.) If slipstreaming brings a car up immediately behind another car, they can carry on slipstreaming (and so on).&lt;br /&gt;
&lt;br /&gt;
If a car is carried into a corner by slipstreaming, they lose a brake WP (without the number of spaces being reduced).&lt;br /&gt;
&lt;br /&gt;
In a corner, a slipstreaming car must follow normal driving code (eg. following the arrows).&lt;br /&gt;
&lt;br /&gt;
Braking in order to take advantage of slipstreaming in the wake of another player&#039;s car is not allowed.&lt;br /&gt;
&lt;br /&gt;
Drivers do not have to slipstream!&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap, a player may decide to make a pit stop to regain all the tire WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one&#039;s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the central colour of your car.&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is necessary to roll the minimum number required or higher using the die corresponding to the selected gear. As soon as the car enters the pits, it receives all its tire WP back. The player now rolls the black die, in order to see how fast their mechanics work.&lt;br /&gt;
&lt;br /&gt;
===Result between 1 and 10: quick pit stop===&lt;br /&gt;
&lt;br /&gt;
The player divides the number shown on the black die by two (rounding it up if necessary). The result is the number of spaces the car is allowed to move when the car leaves the pit in 4th gear.&lt;br /&gt;
&lt;br /&gt;
===Result between 11 and 20: slow pit stop===&lt;br /&gt;
&lt;br /&gt;
The car remains in the pit until the next round. Then the car moves on in 4th gear (or a lower gear).&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Optional Rules=&lt;br /&gt;
&lt;br /&gt;
All the following rules can be used of one another.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car==&lt;br /&gt;
&lt;br /&gt;
Every player can distribute their 20 WP between the zones of their car at their own discretion. At least 1 WP must be assigned to each zone.&lt;br /&gt;
&lt;br /&gt;
If using the Technical Pit Stops option, 2 addition WPs are available to assign, and players may assign 0-2 points to Repair points.&lt;br /&gt;
&lt;br /&gt;
==Qualifying lap with a stopwatch==&lt;br /&gt;
&lt;br /&gt;
All players drive a qualifying lap with stopwatch consecutively, in order to determine their start positions. The rules for moves and driving code remain unchanged during the qualifier, however the WP are not taken into account. The only exception is if a car overshoots a corner - this is penalized.&lt;br /&gt;
&lt;br /&gt;
* The player whose turn it is to drive a qualifying lap places their car in the middle lane in front of the starting line.&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
* The player receives a total number of points over their lap: &lt;br /&gt;
**1 point for each round the player takes to complete the lap&lt;br /&gt;
**1 point for each space the player overshoots a corner by (soft tires will have their points doubled)&lt;br /&gt;
**1 point for every full real-time minute it takes the player to complete the lap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The qualifying lap is over if the driver does not stop at all in corners where two or three stops are required. They then have to start the race at the back of the field from the last start position.&lt;br /&gt;
&lt;br /&gt;
After that the order of starting is determined: the car which has completed the qualifying lap with the fewest points takes first position. The other cars follow on in decreasing order of points. If two drivers have the same number of points, the real time taken to complete the lap decides: the fastest player gets the better start position.&lt;br /&gt;
&lt;br /&gt;
== Weather Conditions ==&lt;br /&gt;
&lt;br /&gt;
There is a weather chart for each &amp;quot;Formula D&amp;quot; racing circuit, which is available to all players before the game so that they can inform themselves about weather conditions during the race and qualifying laps.&lt;br /&gt;
&lt;br /&gt;
lf the weather rules are used, it is strongly recommended that the tire selection rules be used as well.&lt;br /&gt;
&lt;br /&gt;
Before the qualifying laps begin, the black die is rolled and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039; or &#039;&#039;&#039;Changable&#039;&#039;&#039;: no problems for drivers&lt;br /&gt;
&#039;&#039;&#039;Rain&#039;&#039;&#039;: The qualifying laps for all players take place in rain (see below).&lt;br /&gt;
&lt;br /&gt;
Before the actual race begins, the black die is rolled again and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039;: no problem.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: The sky is overcast at the beginning of the race, but is does not rain &#039;&#039;&#039;unless&#039;&#039;&#039; it rained during qualifying. Either way, this can change during the course of the race. Whenever a player in 5th gear throws a 20 or a 3O in 6th gear, at the end of the round they have to roll the black die and consult the weather chart:&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;good weather&amp;quot; comes up. the weather conditions are shifted one line upwards.&lt;br /&gt;
If &amp;quot;rain&amp;quot; is the result, the weather conditions are shifted one line downwards.&lt;br /&gt;
If the result is &amp;quot;changeable&amp;quot;, the weather stays the same.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Weather&#039;&#039;&#039;||&#039;&#039;&#039;Effect on race&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Good||None. The weather will no longer change.&lt;br /&gt;
|-&lt;br /&gt;
|Good (Temporary)||None.&lt;br /&gt;
|-&lt;br /&gt;
|Changable||This is the starting step and once the weather conditions shift up or down off Changeable, it will be skipped for the rest of the game.&lt;br /&gt;
|-&lt;br /&gt;
|Rain (Temporary)||Rain.&lt;br /&gt;
|-&lt;br /&gt;
|Rain||Rain. The weather will no longer change.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effect of rain ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Collision&#039;&#039;&#039;: A result of 1 or 2 (instead of just a 1, as in good weather) means a collision occurs.&lt;br /&gt;
* &#039;&#039;&#039;Engine damage&#039;&#039;&#039;: Occurs when result is between 1 and 3 (instead of between 1 and 4, as in good weather).&lt;br /&gt;
* &#039;&#039;&#039;Road handling&#039;&#039;&#039;: The car loses one road handling WP for a result between 1 and 5 (instead of between 1 and 4, as in good weather)&lt;br /&gt;
* &#039;&#039;&#039;Skidding on corners&#039;&#039;&#039;: Cars will skid on corners depending on their tire selection. See &amp;quot;Selection of tires&amp;quot;, below.&lt;br /&gt;
&lt;br /&gt;
== Selection of tires ==&lt;br /&gt;
&lt;br /&gt;
The choice of tires is crucial not just for qualifying lap, but for the race itself. When weather conditions have been determined, each player can fit their car with special tires (see below). It is also possible to change tires between qualifying lap and the race.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hard Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommencled on a dry track and inefficient on a wet track.&lt;br /&gt;
&lt;br /&gt;
* The game rules apply unchanged if the weather is good or changeable.&lt;br /&gt;
* If it is raining, the car moves three additional spaces on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
=== Soft Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient - if not handicapping - on a wet track.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the car can move one additional space during each move in the qualifying or race laps. This additional move is not compulsory. But if a car overshoots a corner, the penalty is doubled (loss of tire WP). if a driver does not change their tires during a pit stop after the first lap, they lose the bonus. If a driver does not change their tires during a pit stop after the second lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
* If it is raining, the car travels three spaces further on any turn which contributes to advancing a corner. If a driver cloes not change their tires during a pit stop before beginning the third lap, the penalties For overshooting  a corner are trebled.&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
=== Rain Tires ===&lt;br /&gt;
&lt;br /&gt;
They are highly recommended if it is raining, but are otherwise very sensitive.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the penalties for overshooting a corner are doubled (loss of tire WP) for qualifying and the first two laps of the race. If a driver does not change their tires before the third race lap, the&lt;br /&gt;
penalties are trebled.&lt;br /&gt;
* If it is raining, the car travels one space further on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
== Technical Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
Your pit has 2 WP which can be used during the race to regain lost WP (with the exception of tire WP). Every time a driver makes a pit stop they can choose between two options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tire pit stop&#039;&#039;&#039;: As in the rules for advanced players, except that the driver may change the type of tire whenever they changes tires.&lt;br /&gt;
* &#039;&#039;&#039;Technlcal pit stop&#039;&#039;&#039;: The driver can change their tires (see above) and in addition regain up to two WP in one or two zones (except the tires). This &amp;quot;reservoir&amp;quot; of 2 WP applies for the entire duration of the race, even if it lasts for more than two laps. In the next round, the car may not start higher than 4th gear. A car with soft tires does not profit from the bonus of an additional space when leaving the pits.&lt;br /&gt;
&lt;br /&gt;
== Team Race ==&lt;br /&gt;
&lt;br /&gt;
A game using these rules is appropriate for a large group with an even number of players. The players form teams each with two players; each colour corresponds to a racing team. Apart from the following two exceptions, the rules apply unchanged:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Pit stop&#039;&#039;&#039;: Each team has 4 WP to repair the cars. Both players must decide together how they want to use these points.&lt;br /&gt;
* &#039;&#039;&#039;Winner by points&#039;&#039;&#039;: A team race is not necessarily won by the first car to cross the finishing line. Each car receives a certain number of winning points. The team with the highest number of total points wins the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000&lt;br /&gt;
|-&lt;br /&gt;
|2||720&lt;br /&gt;
|-&lt;br /&gt;
|3||600&lt;br /&gt;
|-&lt;br /&gt;
|4||480&lt;br /&gt;
|-&lt;br /&gt;
|5||400&lt;br /&gt;
|-&lt;br /&gt;
|6||320&lt;br /&gt;
|-&lt;br /&gt;
|7||240&lt;br /&gt;
|-&lt;br /&gt;
|8||160&lt;br /&gt;
|-&lt;br /&gt;
|9||80&lt;br /&gt;
|-&lt;br /&gt;
|10||40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that these points differ from the published rules. If qualifying is enabled, qualifying points are also awarded equally to both members of the team.&lt;br /&gt;
&lt;br /&gt;
== Nitro Fuel ==&lt;br /&gt;
&lt;br /&gt;
When this option is chosen, all cars have a nitro Fuel injection, which allows instant acceleration. Players can use their nitro once a lap after rolling the corresponding gear die. They receive a movement bonus according to the gear they are using at that moment (1 space in 1st gear, 2 spaces in 2nd gear, etc.). This bonus must be used completely.&lt;br /&gt;
&lt;br /&gt;
When a car pits, or crosses the finish line at the end of a lap, it replenishes its nitro fuel and may use it again.&lt;br /&gt;
&lt;br /&gt;
Nitro may only be used if it is available when rolling the gear die. It does not become available during the same move where you complete a lap.&lt;br /&gt;
&lt;br /&gt;
= BGA Rule Variations=&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
The differences from the rules you will find in your own copy of Formula D are:&lt;br /&gt;
&lt;br /&gt;
==Round Order ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, if two cars are level with each other, the driver with the highest gear plays first. If both cars are in the same gear, the car nearest the inside with reference to the next (or the current) corner plays first.&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the higher gear continues to be first but if both cars are in the same gear *then the player who first arrived at their space* goes first. Corners no longer affect who goes first.&lt;br /&gt;
&lt;br /&gt;
==Points ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, points are awarded for race completion &#039;&#039;&#039;and&#039;&#039;&#039; for Qualifying (if enabled). The Qualifying points are minor by comparison and serve as a tie-break if two players are both eliminated and score 0 in the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;&#039;||&#039;&#039;&#039;Race Points&#039;&#039;&#039;||&#039;&#039;&#039;Qualifying Points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000||10&lt;br /&gt;
|-&lt;br /&gt;
|2||720||9&lt;br /&gt;
|-&lt;br /&gt;
|3||600||8&lt;br /&gt;
|-&lt;br /&gt;
|4||480||7&lt;br /&gt;
|-&lt;br /&gt;
|5||400||6&lt;br /&gt;
|-&lt;br /&gt;
|6||320||5&lt;br /&gt;
|-&lt;br /&gt;
|7||240||4&lt;br /&gt;
|-&lt;br /&gt;
|8||160||3&lt;br /&gt;
|-&lt;br /&gt;
|9||80||2&lt;br /&gt;
|-&lt;br /&gt;
|10||40||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To cover multiple players being eliminated during a game where there is not Qualifying, their distance travelled before being eliminated is used as the final tie-break (only in non-team games). If a player overshoots a corner or crashes into the back of other cars, their position at the &#039;&#039;&#039;start&#039;&#039;&#039; of the turn is used.&lt;br /&gt;
&lt;br /&gt;
==Braking ==&lt;br /&gt;
&lt;br /&gt;
The original rules provide a table that describes the outcome of &amp;quot;Emergency Braking&amp;quot; (when a car is blocked by one or more cars which they are unable to overtake). The table does not take Constructed Cars into account, so to clarify, the implemented rules are:&lt;br /&gt;
&lt;br /&gt;
If a player performs Emergency Braking, they must move their car forward as many spaces as possible. If they need to brake more than 3 spaces, they are required to use Brake WPs for the first 3 spaces, and each subsequent space may be paid for using Brake WP *or* Tire WPs.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
==Qualifying ==&lt;br /&gt;
&lt;br /&gt;
Players do not roll the black starting die at the beginning of Qualifying: they just start in 1st gear.&lt;br /&gt;
&lt;br /&gt;
The original rules simply state that &amp;quot;WP are not taken into account&amp;quot; during qualifying. However, the effect of this is clarified in this adaptation:&lt;br /&gt;
&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
&lt;br /&gt;
In this version, Qualifying awards points as long as you complete your lap:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||10&lt;br /&gt;
|-&lt;br /&gt;
|2||9&lt;br /&gt;
|-&lt;br /&gt;
|3||8&lt;br /&gt;
|-&lt;br /&gt;
|4||7&lt;br /&gt;
|-&lt;br /&gt;
|5||6&lt;br /&gt;
|-&lt;br /&gt;
|6||5&lt;br /&gt;
|-&lt;br /&gt;
|7||4&lt;br /&gt;
|-&lt;br /&gt;
|8||3&lt;br /&gt;
|-&lt;br /&gt;
|9||2&lt;br /&gt;
|-&lt;br /&gt;
|10||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Collision Checks ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the active player checks for collisions only after all adjacent players have rolled. If an adjacent player fails their roll and is eliminated as a result, the active player will automatically fail their roll against that player.&lt;br /&gt;
&lt;br /&gt;
==Weather Rolls ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, the Weather die is thrown immediately when a player rolls the maximum number in 5th or 6th gear. In this adaptation, this roll still occurs but it is deferred until the end of the round. This way, weather can only change between rounds and not in the middle of a player&#039;s turn. If multiple players roll the maximum number, the weather die will be rolled multiple times.&lt;br /&gt;
&lt;br /&gt;
==Changeable Weather ==&lt;br /&gt;
&lt;br /&gt;
The original rules have 4 steps for Changeable Weather (Good, Good - Changeable, Rain - Changeable, Rain).&lt;br /&gt;
&lt;br /&gt;
In this adaptation, there are 5 steps: Good, Good - Temporary, Changeable, Rain - Temporary, Rain.&lt;br /&gt;
&lt;br /&gt;
Changeable is only ever used at the start of a race, and by default is Good - with one exception: if it rained in qualifying then a changeable feature race will start Changeable but raining.&lt;br /&gt;
&lt;br /&gt;
Weather will never be changeable in qualifying: it will be Good unless Rain is rolled.&lt;br /&gt;
&lt;br /&gt;
==Spinning ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that if a car on 0 Tire WP overshoots a corner then it &amp;quot;will again spin round in a circle. If the car overshoots the corner by more than one space, it is out of the race&amp;quot;. In this adaptation, a car with 0 Tire WP is eliminated if it overshoots a corner by more than 1 WP. Hence, even a single space overshoot will eliminate a 0 Tire WP car on soft tires.&lt;br /&gt;
&lt;br /&gt;
Additionally, in this adaptation when you spin, your Tire WP are reset to 1 WP (instead of remaining at 0 WP).&lt;br /&gt;
&lt;br /&gt;
==Skidding on Corners in the Rain ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that cars will skid in the rain &amp;quot;provided at least one space of the move lies within the limits of a corner&amp;quot;. In this adaptation, skidding will only occur on any turn that counts towards a corner&#039;s completion. That means:&lt;br /&gt;
&lt;br /&gt;
* Driving through a corner that you have already completed will &#039;&#039;not&#039;&#039; cause you to skid&lt;br /&gt;
* If you are on the final space in a corner and still need to land in it 1 more turn, you will skid on your next move even though you are driving into a straight&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Motor Damage Checks==&lt;br /&gt;
&lt;br /&gt;
Motor damage checks are always performed in round order.&lt;br /&gt;
&lt;br /&gt;
==Braking in the Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that the rules for braking do not apply in the pit lane. In this adaptation, there is no braking cost for stopping immediately behind another car, or in your pit box. However, there is a brake cost for travelling any distance shorter than that.&lt;br /&gt;
&lt;br /&gt;
== Pit Boxes ==&lt;br /&gt;
&lt;br /&gt;
In Individual Driver games, a single pit box will be reserved for each driver instead of drivers being assigned a pit box color. The box will be indicated with the player&#039;s avatar.&lt;br /&gt;
&lt;br /&gt;
== Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down DO apply in the pit lane.&lt;br /&gt;
&lt;br /&gt;
There are also minimum gears that may be used in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
== Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
The soft tire bonus may not be used when moving after a Quick Pit Stop.&lt;br /&gt;
&lt;br /&gt;
If Technical Pit Stops are enabled, players may always choose to take one (and thus finish their turn) even if they have no repair points or repairs to perform.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, if players have selected the option to Construct their own car then there are no limits to how many points they may assign to any given area.&lt;br /&gt;
&lt;br /&gt;
In games that have also selected the Technical Pit Stop rules, then instead of having a fixed 2 WPs available for Pit repairs, a player will have 22 WPs to use in Construction and can choose how many repair points to make available, with a maximum of 2.&lt;br /&gt;
&lt;br /&gt;
==Road Races ==&lt;br /&gt;
&lt;br /&gt;
The Road Race rules, including Drivers with special abilities, are not used.&lt;br /&gt;
&lt;br /&gt;
Where Road Race circuits are used, all non-standard rules are ignored.&lt;br /&gt;
&lt;br /&gt;
Nitro Fuel Injection is available as an option for all races.&lt;br /&gt;
&lt;br /&gt;
==Elimination ==&lt;br /&gt;
&lt;br /&gt;
When a player is eliminated, the outcome is slightly different from the published rules. &lt;br /&gt;
&lt;br /&gt;
*If the elimination was caused by the player overshooting corners or driving over a damage marker, the car is immediately removed from the board and &#039;&#039;&#039;no damage marker is placed&#039;&#039;&#039;&lt;br /&gt;
*If the elimination was caused by the player failing a motor damage test, the car is immediately removed from the board and a damage marker is added.&lt;br /&gt;
*If the player is eliminated by any other reason, a damage marker is added and the car remains on the board until the end of the round, when it is removed.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Post-release_phase&amp;diff=27992</id>
		<title>Post-release phase</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Post-release_phase&amp;diff=27992"/>
		<updated>2026-01-09T01:05:08Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: Added a &amp;quot;Documentation for Bug Reports&amp;quot; section as I can never remember how to do this (not sure it&amp;#039;s documented except in Discord)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
Your game is now on BGA: congrats!&lt;br /&gt;
&lt;br /&gt;
But what happened when there are some bugs to fix or when you want to optimize something?&lt;br /&gt;
&lt;br /&gt;
Don&#039;t be afraid: you&#039;re still allowed to modify your game. You just have to pay attention to the points below.&lt;br /&gt;
&lt;br /&gt;
== Bugs reporting ==&lt;br /&gt;
&lt;br /&gt;
Bugs are reported on the [https://boardgamearena.com/bugs BGA bugs page].&lt;br /&gt;
&lt;br /&gt;
During days after your game has been published and from time to time, please have a look at it to check if everything is fine.&lt;br /&gt;
&lt;br /&gt;
== Documentation for Bug Reports ==&lt;br /&gt;
You can provide a wiki page for the attention of bug reporters.&lt;br /&gt;
&lt;br /&gt;
To edit the page for your game, go to https://www.boardgamearena.com/bugs and click &amp;quot;Create a new report&amp;quot;. Choose &amp;quot;About a game...&amp;quot; and then enter a table number where your game has been played, &#039;&#039;&#039;then tab away from the game number text box&#039;&#039;&#039; (important!).&lt;br /&gt;
&lt;br /&gt;
You will be presented with an &amp;quot;Edit bug clarifications Wiki page&amp;quot; button, where you can edit the page.&lt;br /&gt;
&lt;br /&gt;
When players who are not admins follow the same procedure, instead of being offered an &amp;quot;Edit bug clarifications Wiki page&amp;quot; button, they will be offered a &amp;quot;Make sure to read the game specific bug clarifications&amp;quot; link. To be fair, most of them won&#039;t follow it, but it may help reduce the number of reports you keep getting from players who don&#039;t understand the rules, and it does offer a page you can refer players back to when they do.&lt;br /&gt;
&lt;br /&gt;
== How to submit changes? ==&lt;br /&gt;
&lt;br /&gt;
There are steps to make your changes visible on BGA (from your game Control Panel, i.e. https://studio.boardgamearena.com/studiogame?game=mygamename):&lt;br /&gt;
&lt;br /&gt;
* In Build a new release version section&lt;br /&gt;
** Enter some notes about the release (i.e. fixed bug xxx, added feature yyy)&lt;br /&gt;
** Press &amp;quot;Commit &amp;amp; build a new version now&amp;quot;&lt;br /&gt;
** Do not dismiss the build dialog right away, make sure it does not have Errors. If there are error build has failed.&lt;br /&gt;
* Deploy your new version in production&lt;br /&gt;
** Find your newly build version (should be latest, but check release note to make sure)&lt;br /&gt;
** Press &amp;quot;Deploy to production&amp;quot; button&lt;br /&gt;
** Do not dismiss the deploy dialog right away, make sure it does not have Errors. If there are error the deploy has failed.&lt;br /&gt;
* To check - the version of deployed game should be updated in &amp;quot;Online version&amp;quot; of control panel and also in section Credits page of the running game&lt;br /&gt;
* Go to Group page of your game and post update anouncement (usually using release notes from the deployment)&lt;br /&gt;
&lt;br /&gt;
Note: if your game is very popular it will be pretty drammatic if it breaks, you can use two tricks to help your users&lt;br /&gt;
* [https://en.doc.boardgamearena.com/BGA_Studio_Cookbook#Disable_/_lock_table_creation_for_new_deploy Disable / lock table creation for new deploy]&lt;br /&gt;
* [https://en.doc.boardgamearena.com/BGA_Studio_Cookbook#Force_players_to_refresh_after_new_deploy Force players to refresh after new deploy]&lt;br /&gt;
&lt;br /&gt;
== What can be modified after release? ==&lt;br /&gt;
&lt;br /&gt;
Everything can be modified. BUT, some items requires a special attention, and you must inform us in some cases:&lt;br /&gt;
&lt;br /&gt;
===Changes that breaks the games in progress===&lt;br /&gt;
&lt;br /&gt;
Some changes will break the games in progress at the moment the release/the hotfix will be performed. Each time you make a change, you should ask you the question &amp;quot;it is safe to make this change in a game in progress&amp;quot;, and if the answer is &amp;quot;no&amp;quot; you have to inform us.&lt;br /&gt;
&lt;br /&gt;
Example of changes that break the games in progress:&lt;br /&gt;
* Changes in the database schema of the game (dbmodel.sql).&lt;br /&gt;
* New global variable or game option accessed during the game (if it&#039;s only used during setup, it should be safe).&lt;br /&gt;
* Change ID of existing game states (adding new game states is fine).&lt;br /&gt;
* Changing flow of game states (for example, if you change 1 -&amp;gt; 2 -&amp;gt; 3 -&amp;gt; 4 to 1 -&amp;gt; 3 -&amp;gt; 2 -&amp;gt; 4, players at state 2 will skip state 3)&lt;br /&gt;
&lt;br /&gt;
Of course, as a rule of thumb, you should avoid to introduce changes that break a game in progress. Sometimes however, you do not have any other choice. In this case:&lt;br /&gt;
* Try to group all your updates in one version, thus we won&#039;t have to block your game several times.&lt;br /&gt;
* Tell us explicitly that you introduce some update that can break games in progress so we can block the game during a short time.&lt;br /&gt;
&lt;br /&gt;
Note: in the near future, we will introduce the possibility for you to block/unblock a game directly from your Control Panel in order to perform all the process by yourself.&lt;br /&gt;
&lt;br /&gt;
=== Updating game options ===&lt;br /&gt;
&lt;br /&gt;
* If you add options, you should let us know which value should be used for the arena mode, so that we can update the arena configuration.&lt;br /&gt;
* If you remove an option or change a option ID, it will break the arena configuration and prevent creating new arena games, so you should let us know so that we can synchronize to update the configuration at the same time as you deploy the new version.&lt;br /&gt;
* Do not change option IDs once the game is in production, it will break ongoing games and audience option statistics.&lt;br /&gt;
&lt;br /&gt;
=== Updating Statistics ===&lt;br /&gt;
&lt;br /&gt;
You should be careful when updating a statistics:&lt;br /&gt;
&lt;br /&gt;
* If you want to add a new statistic, please be aware that for ongoing games this statistic won&#039;t always be correct since it has not been counted from the start of that game.&lt;br /&gt;
* If you want to update a statistic, please update it and do not remove/create another one. Otherwise, the statistic won&#039;t keep the same ID and players will lose all the historical statistics data.&lt;br /&gt;
* If your game is published on BGA, please don&#039;t remove any statistics (historical data will be lost).&lt;br /&gt;
&lt;br /&gt;
=== Updating the database schema ===&lt;br /&gt;
&lt;br /&gt;
If you want to update the database schema of the game (dbmodel.sql) and your game is already open to everyone on BGA (from BETA onwards), you should inform us before releasing the new version (see &amp;quot;[[#Changes that breaks the games in progress|changes that breaks the games in progress]]&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Any modification in dbmodel.sql should also appear in your nameofyourgame.game.php, in a function&lt;br /&gt;
&lt;br /&gt;
  function upgradeTableDb( $from_version ){&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;if( $from_version &amp;lt;= YYMMDDHHMM ){ // where your CURRENT version in production has number YYMMDD-HHMM&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          // You DB schema update request.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          // Note: all tables names should be prefixed by &amp;quot;DBPREFIX_&amp;quot; to be compatible with the applyDbUpgradeToAllDB method you should use below&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          $sql = &amp;quot;CREATE TABLE DBPREFIX_xxxxxxx ....&amp;quot;;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          // The method below is applying your DB schema update request to all tables, including the BGA framework utility tables like &amp;quot;zz_replayXXXX&amp;quot; or &amp;quot;zz_savepointXXXX&amp;quot;.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          // You should really use this request, in conjunction with &amp;quot;DBPREFIX_&amp;quot; in your $sql, so ALL tables are updated. All utility tables MUST have the same schema than the main table, otherwise the game may be blocked.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          self::applyDbUpgradeToAllDB( $sql ); &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Note1: of course you need to change your dbmodel.sql accordingly, so that new games get your updated scheme.&lt;br /&gt;
&lt;br /&gt;
Note2: this is always risky to modify the DB scheme, so:&lt;br /&gt;
* if your game is already open to everyone on BGA (from BETA onwards), it may be worth contacting us before, so we can stop the realtime games during the update (this way, only turn based games are concerned by the DB live upgrade).&lt;br /&gt;
* if you can avoid it... try to avoid it :)&lt;br /&gt;
&lt;br /&gt;
Note3: testing on the studio is possible by following the following procedure:&lt;br /&gt;
* make sure the current state of your project is correctly committed&lt;br /&gt;
* revert to the revision currently in production using the version control tools (&amp;quot;Display commit log&amp;quot; -&amp;gt; find the revision matching the current version in production, then &amp;quot;Overwrite working copy with this revision&amp;quot; to get back the matching code)&lt;br /&gt;
* launch a game with this code&lt;br /&gt;
* revert to your code latest version using the version control tools (use &amp;quot;Overwrite working copy with this revision&amp;quot; with &amp;quot;head&amp;quot; for the revision)&lt;br /&gt;
* access the game database&lt;br /&gt;
* in the &amp;quot;global&amp;quot; table, find the row with id 300. Its value is 999999999 by default on the studio. Change it to the current production version number&lt;br /&gt;
* hit refresh to reload your game page. Your upgradeTableDb() function will be run and the global value will be updated again to the studio value&lt;br /&gt;
* check the database to see if your changes have been correctly applied.&lt;br /&gt;
&lt;br /&gt;
Note4: consider that if your game has some undo support capability through &#039;db_undo_support&#039; =&amp;gt; true,&#039; in the gameinfos.inc.php, calling the undoRestorePoint() could restore to a prior game version and the upgradeTableDb() could be called again. In that case, it&#039;s better to secure the SQL Alter Table Request with something like: &lt;br /&gt;
       function upgradeTableDb( $from_version ){&lt;br /&gt;
         if( $from_version &amp;lt;= YYMMDDHHMM )&lt;br /&gt;
         {&lt;br /&gt;
           // ! important ! Use DBPREFIX_&amp;lt;table_name&amp;gt; for all tables&lt;br /&gt;
           // test first the new column existance since it can exists from a previous call to upgradeTableDb while an undo was performed&lt;br /&gt;
           $result = self::getUniqueValueFromDB(&amp;quot;SHOW COLUMNS FROM tablename LIKE &#039;new_column&#039;&amp;quot;);&lt;br /&gt;
           if (empty($result))&lt;br /&gt;
               self::applyDbUpgradeToAllDB(&amp;quot;ALTER TABLE DBPREFIX_tablename ADD `new_column` tinyint(4)  unsigned NOT NULL DEFAULT &#039;0&#039;;&amp;quot;);&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
=== Updating string to be translated  ===&lt;br /&gt;
&lt;br /&gt;
When you update a string that has been marked to be translatable, please keep in mind that all current translations done by the BGA community will be lost.&lt;br /&gt;
&lt;br /&gt;
Consequently, when you are about to modify a string to be translated (after release), please ask you the following questions:&lt;br /&gt;
* Is it just an English misspelling? In this case, it is better to fix the English translation of the string than the original string to be translated.&lt;br /&gt;
* Has the meaning of the string changed? If yes, you HAVE to change the original string in order to invalidate all translations that has been done already.&lt;br /&gt;
* Is there a similar string already used elsewhere in my game? In this case, you&#039;d better use it again to enjoy immediately all translations already available.&lt;br /&gt;
&lt;br /&gt;
===Tell the community about your changes :)===&lt;br /&gt;
&lt;br /&gt;
The player&#039;s community is always happy to know that someone is taking care of their preferred game :)&lt;br /&gt;
&lt;br /&gt;
If your are the developer of game XXXX, you are also the administrator of player&#039;s group &amp;quot;XXXX&#039;s players&amp;quot;, and you can publish some news in this group newsfeed.&lt;br /&gt;
&lt;br /&gt;
When you fix a bug or add something, do not hesitate to tell the players about this in this group: you&#039;ll get the &amp;quot;thank you&amp;quot; you deserved :)&lt;br /&gt;
&lt;br /&gt;
See for example Werewolves group:&lt;br /&gt;
https://boardgamearena.com/group?id=2465913&lt;br /&gt;
===Major changes===&lt;br /&gt;
&lt;br /&gt;
If you do some major changes to your game like:&lt;br /&gt;
* Introducing a new expansion.&lt;br /&gt;
* Major code rewriting/refactoring.&lt;br /&gt;
&lt;br /&gt;
... please tell us. In this case, we can:&lt;br /&gt;
* Make your game back from &amp;quot;gold&amp;quot; to &amp;quot;public beta&amp;quot;, to incite player to report bugs.&lt;br /&gt;
* And eventually, publish a news about it :)&lt;br /&gt;
&lt;br /&gt;
== Avoiding version mismatches ==&lt;br /&gt;
Be advised about the timing of deployments: Your new PHP backend code takes effect &#039;&#039;&#039;immediately&#039;&#039;&#039;, but your new JS/HTML/CSS frontend code does not take effect unless current players reload the page (F5). This can lead to unexpected behavior and difficult-to-reproduce bugs caused by old JS client code interacting with new PHP server code.&lt;br /&gt;
&lt;br /&gt;
Until the BGA framework handles this automatically for everyone (please upvote https://studio.boardgamearena.com/bug?id=106), your game should definitely implement something like [[BGA Studio Cookbook#Force players to refresh after new deploy]].&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=27991</id>
		<title>Bugsclarification formulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=27991"/>
		<updated>2026-01-09T00:57:48Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Corners ==&lt;br /&gt;
&lt;br /&gt;
=== I Stopped In A Corner But It Did Not Count ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? All corner stops are required. If you miss a stop in one corner and end your turn in a second corner, that stop counts ONLY AGAINST THE FIRST CORNER. You still need to stop in the second corner and if you move out of it without stopping again, you will be overshooting.&lt;br /&gt;
&lt;br /&gt;
=== I Exited A Corner And Crashed - Why? ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? If you skip Corner 1 and end your turn in Corner 2, that move only counts against Corner 1 and you STILL have to finish a turn in Corner 2. If you move out of Corner 2 at speed without stopping again in it, you will probably destroy your tires.&lt;br /&gt;
&lt;br /&gt;
=== I Was Allowed To Change Lanes After Leaving A Corner ===&lt;br /&gt;
&lt;br /&gt;
Some players have been confused by the line in the rules &amp;quot;When coming out a corner the car may not change lanes&amp;quot;. Note that this line appears in the &#039;&#039;&#039;Overshooting&#039;&#039;&#039; section and is &#039;&#039;only&#039;&#039; intended to apply to cars that are overshooting a corner.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=27807</id>
		<title>Bugsclarification formulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_formulad&amp;diff=27807"/>
		<updated>2025-12-21T02:13:41Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Corners ==&lt;br /&gt;
&lt;br /&gt;
=== I Stopped In A Corner But It Did Not Count ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? All corner stops are required, so if you&#039;ve missed one, your stop will have counted against a previous corner.&lt;br /&gt;
&lt;br /&gt;
=== I Exited A Corner And Crashed - Why? ===&lt;br /&gt;
&lt;br /&gt;
Did you fully stop in all previous corners? If you skip Corner 1 and end your turn in Corner 2, that move only counts against Corner 1 and you STILL have to finish a turn in Corner 2. If you move out of Corner 2 at speed without stopping again in it, you will probably destroy your tires.&lt;br /&gt;
&lt;br /&gt;
=== I Was Allowed To Change Lanes After Leaving A Corner ===&lt;br /&gt;
&lt;br /&gt;
Some players have been confused by the line in the rules &amp;quot;When coming out a corner the car may not change lanes&amp;quot;. Note that this line appears in the &#039;&#039;&#039;Overshooting&#039;&#039;&#039; section and is &#039;&#039;only&#039;&#039; intended to apply to cars that are overshooting a corner.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=27686</id>
		<title>Gamehelpformulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=27686"/>
		<updated>2025-12-15T02:26:01Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Pit Lane */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 10-Second Explainer of Formula D =&lt;br /&gt;
New to Formula D?&lt;br /&gt;
&lt;br /&gt;
This 10-second explainer will get you started:&lt;br /&gt;
&lt;br /&gt;
# Your car will start in 1st gear.&lt;br /&gt;
# At the start of your turn, your first decision is whether to stay on your current gear, or go up 1 gear or go down. You can go down 1 gear without penalty.&lt;br /&gt;
# After choosing a gear, you will roll the appropriate &amp;quot;gear die&amp;quot;. The higher the gear, the bigger the die.&lt;br /&gt;
# Once you have rolled, you must move the number of spaces rolled, although you may choose which path you take.&lt;br /&gt;
# Corners are areas marked in red. To drive around corners without penalty, you must finish at least 1 turn in them.&lt;br /&gt;
# Some corners are particularly slow and may require that you finish at least 2 or even 3 turns in them.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! There&#039;s a lot more to it than that, but this covers the absolute basics of driving safely around the track.&lt;br /&gt;
&lt;br /&gt;
= Important: BGA Rule Variations =&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
[[Gamehelpformulad#BGA Rule Variations|At the end of these rules]], you will find a list of all differences from the published game rules.&lt;br /&gt;
&lt;br /&gt;
=Adaptation Notes/Common Mistakes=&lt;br /&gt;
&lt;br /&gt;
# The central area of your car is the colour of the pit box you must use (and your team if playing a team game)&lt;br /&gt;
# Your sidepods are your unique player color&lt;br /&gt;
# To enter the pitbox, you must move out of the pit lane and onto the coloured pit box. Stopping in the pit lane in front of your box is not a pit stop.&lt;br /&gt;
# To zoom the circuit in and out with a mouse, use Ctrl+Wheelmouse.&lt;br /&gt;
&lt;br /&gt;
=Basic Rules=&lt;br /&gt;
&lt;br /&gt;
== Aim of the game ==&lt;br /&gt;
&lt;br /&gt;
FORMULA D is a car race. The aim is to win a race (of one lap) and be the first to cross the finishing line. There are all sorts of risks involved and you have to anticipate what will happen during the course of the race. You must decide on your strategy, trust to luck, keep to the rules and always keep an eye on the technical condition of your car.&lt;br /&gt;
&lt;br /&gt;
== The gears ==&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears. Each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2 or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Color||Die||Movement (Number of spaces)&lt;br /&gt;
!Face distribution&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|1,1,2,2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|2,3,3,4,4,4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|4,5,6,6,7,7,8,8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|2 of each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Driving ==&lt;br /&gt;
&lt;br /&gt;
As in real life the car starts in 1st gear. Then you shift up to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is important especially in the corners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Order of play&#039;&#039;&#039;: In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Driving Code ==&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
===Driving code in the corners ===&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated in the yellow box) within the limits of the corner.  The number of filled red circles indicates the number of stops for that corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refer to the longest path, the numbers in the red box refer to the shortest path.&lt;br /&gt;
&lt;br /&gt;
===Driving code on the straights ===&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
==Wear points (WP) ==&lt;br /&gt;
&lt;br /&gt;
They reflect the capability of the car to stay on the track and survive events during the race. In the Basic Game, each car has 18 WP at the beginning of the race. The players use these points to survive various incidents and risky maneuvers.&lt;br /&gt;
&lt;br /&gt;
==Preparation for play ==&lt;br /&gt;
&lt;br /&gt;
===Start formation ===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. In the case of a tie, all involved players re-roll the die.&lt;br /&gt;
&lt;br /&gt;
===Start ===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: 1 – poor start&#039;&#039;&#039;. The player has stalled the motor of their car. They cannot engage 1st gear and so they have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 2 and 16&#039;&#039;&#039; – normal start. The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 17 and 20&#039;&#039;&#039; – great start! The player makes a fantastic start. They moves their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their WP at any time to avoid having to advance the full number of spaces shown on the die. In this way they can control their progress better, for example when the lanes are blocked by other cars.&lt;br /&gt;
&lt;br /&gt;
==Changing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox. The number of gears skipped equates to the number of WP their car loses as a result. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a number between 1 and 4 their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Two-lap race==&lt;br /&gt;
&lt;br /&gt;
For players who have already played several single-lap games.&lt;br /&gt;
&lt;br /&gt;
Whoever crosses the finishing line first after two laps wins the game. Players may make a pit stop between the first and second laps to regain the WP points they lost during the first round.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap a player may decide to make a pit stop to regain all the WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one’s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the colour of your car&#039;s central strip.&lt;br /&gt;
&lt;br /&gt;
===Entering pits===&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is sufficient to roll the minimum number required or higher using the die corresponding to the selected gear. The car receives all 18 WP back and awaits their next turn to start from the pits in 4th gear (maximum).&lt;br /&gt;
&lt;br /&gt;
The rules for changing down gear, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
There are minimum gears required in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
=Advanced Rules=&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
===The gears===&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears, each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2, or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Die Color||Die Size||Movement (Number of spaces)&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Driving===&lt;br /&gt;
&lt;br /&gt;
As in real life, the car starts in 1st gear. Then you up shift to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then rolls the die which corresponds to the chosen speed. They then moves their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is important especially in the corners.&lt;br /&gt;
&lt;br /&gt;
====Order of play====&lt;br /&gt;
&lt;br /&gt;
In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Same position====&lt;br /&gt;
&lt;br /&gt;
If two cars on the track are level with each other, the driver with the highest gear plays first.&lt;br /&gt;
&lt;br /&gt;
If both cars are in the same gear, the car that arrived first at their current space plays first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Driving Code===&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
====Driving code in the corners====&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated by the number of red stop lights in the corner information box) within the limits of the corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refer to the longest path, the numbers in the red box refer to the shortest path.&lt;br /&gt;
&lt;br /&gt;
====Driving code on the straights====&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wear points (WP)===&lt;br /&gt;
&lt;br /&gt;
Wear Points reflect the ability of the car to stay on the track and survive events during the race. Each car has a certain number of WP at the beginning of the race, which are divided up between six different categories. These points are distributed as follows in the game for advanced players:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|WP tires:||6&lt;br /&gt;
|-&lt;br /&gt;
|WP brakes:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP gearbox:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP car body:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP engine:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP road handling:||2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Preparation for play==&lt;br /&gt;
&lt;br /&gt;
===Start formation===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. (ln the case of a tie, all concerned players re-roll the die.)&lt;br /&gt;
&lt;br /&gt;
===Start===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
====Number rolled, 1 - poor start====&lt;br /&gt;
&lt;br /&gt;
The player has stalled the motor of their car. They cannot engage 1st gear and so have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: between 2 and 19 - normal start====&lt;br /&gt;
&lt;br /&gt;
The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: 2O - great start!====&lt;br /&gt;
&lt;br /&gt;
The player makes a fantastic start. They move their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s tire WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
When a car loses their last tire WP by overshooting a corner, they spin round in a circle. The car is placed on the space where their move ended, pointing backwards. The player must turn their car round again and drive off in 1st gear when it is their next turn. In this adaptation, their Tire WPs are reset to 1.&lt;br /&gt;
&lt;br /&gt;
If a car loses more tire WP than it possesses, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their brake WP at any time to avoid having to advance the full number of spaces shown on the die. This can help to prevent losing tire WP if they would otherwise overshoot a corner.&lt;br /&gt;
&lt;br /&gt;
A driver can find themselves blocked by one or more cars which they are unable to overtake. After the driver has moved their car forward as many spaces as possible, they counts how many spaces they would have moved if they had not been blocked.&lt;br /&gt;
&lt;br /&gt;
If the number of spaces short of the full number 4 or greater, they may use Emergency Braking. In this case, their first 3 spaces must be paid for with Brake WP. Each additional space after that may be paid by either Brake or Tire WP.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
If a car doesn&#039;t have enough brake WP and tire WP to stop before a blockage, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Gearing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox.&lt;br /&gt;
&lt;br /&gt;
As a result, the car then loses a certain number of brake WP, engine WP and gearbox WP. The table below lists the corresponding wear. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gears skipped!!Gearbox WP!!Brake WP!!Engine WP&lt;br /&gt;
|-&lt;br /&gt;
|1 gear||1||0||0&lt;br /&gt;
|-&lt;br /&gt;
|2 gears||1||1||0&lt;br /&gt;
|-&lt;br /&gt;
|3 gears||1||1||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a car has no gearbox WP left, the driver can only change clown one gear at a time until the game is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they rolls a 1, their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In this adaptation&#039;&#039;&#039; the car that did not just move rolls first. If it fails the roll and is eliminated from the race as a result, the car that moved will automatically fail its roll.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last car body WP, it is eliminated&#039;&#039;&#039; from the race.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 engine WP.&lt;br /&gt;
&lt;br /&gt;
If a car loses its last engine WP, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Damage and road handling==&lt;br /&gt;
&lt;br /&gt;
Each time a car loses a car body WP or an engine WP, a damage marker is placed on the space where the move ended.&lt;br /&gt;
&lt;br /&gt;
The same applies whenever a car is eliminated from the race for whatever reason. These spaces are judged to be &amp;quot;dangerous&amp;quot; from then on.&lt;br /&gt;
&lt;br /&gt;
If a car passes over one of these spaces or lands on it, the driver must roll the black die. If the result is between 1 and 4, the car loses one road handling WP. The dangerous spaces can be avoided by changing lanes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last road handling WP, it is eliminated from the race.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If a car drives in the wake of another car, this is called slipstreaming.&lt;br /&gt;
&lt;br /&gt;
For the two concerned drivers, slipstreaming is possible from the 4th gear on.&lt;br /&gt;
&lt;br /&gt;
The car must be driving as fast or faster than the car in front.&lt;br /&gt;
&lt;br /&gt;
If a car wants to profit from slipstreaming after moving, it has to stop directly behind another car. From this position they can then add 3 spaces onto their last move. They can move forward 3 spaces in the following way:&lt;br /&gt;
&lt;br /&gt;
*change a lane, overtake the car in front and return to the original lane.&lt;br /&gt;
*change a lane and move two spaces in a straight line.&lt;br /&gt;
*change two lanes and move one space in a straight line.&lt;br /&gt;
&lt;br /&gt;
The player must move a total of three spaces in any case. (However, the driver may use brake WP in order to reduce this number of spaces.) If slipstreaming brings a car up immediately behind another car, they can carry on slipstreaming (and so on).&lt;br /&gt;
&lt;br /&gt;
If a car is carried into a corner by slipstreaming, they lose a brake WP (without the number of spaces being reduced).&lt;br /&gt;
&lt;br /&gt;
In a corner, a slipstreaming car must follow normal driving code (eg. following the arrows).&lt;br /&gt;
&lt;br /&gt;
Braking in order to take advantage of slipstreaming in the wake of another player&#039;s car is not allowed.&lt;br /&gt;
&lt;br /&gt;
Drivers do not have to slipstream!&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap, a player may decide to make a pit stop to regain all the tire WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one&#039;s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the central colour of your car.&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is necessary to roll the minimum number required or higher using the die corresponding to the selected gear. As soon as the car enters the pits, it receives all its tire WP back. The player now rolls the black die, in order to see how fast their mechanics work.&lt;br /&gt;
&lt;br /&gt;
===Result between 1 and 10: quick pit stop===&lt;br /&gt;
&lt;br /&gt;
The player divides the number shown on the black die by two (rounding it up if necessary). The result is the number of spaces the car is allowed to move when the car leaves the pit in 4th gear.&lt;br /&gt;
&lt;br /&gt;
===Result between 11 and 20: slow pit stop===&lt;br /&gt;
&lt;br /&gt;
The car remains in the pit until the next round. Then the car moves on in 4th gear (or a lower gear).&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Optional Rules=&lt;br /&gt;
&lt;br /&gt;
All the following rules can be used of one another.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car==&lt;br /&gt;
&lt;br /&gt;
Every player can distribute their 20 WP between the zones of their car at their own discretion. At least 1 WP must be assigned to each zone.&lt;br /&gt;
&lt;br /&gt;
If using the Technical Pit Stops option, 2 addition WPs are available to assign, and players may assign 0-2 points to Repair points.&lt;br /&gt;
&lt;br /&gt;
==Qualifying lap with a stopwatch==&lt;br /&gt;
&lt;br /&gt;
All players drive a qualifying lap with stopwatch consecutively, in order to determine their start positions. The rules for moves and driving code remain unchanged during the qualifier, however the WP are not taken into account. The only exception is if a car overshoots a corner - this is penalized.&lt;br /&gt;
&lt;br /&gt;
* The player whose turn it is to drive a qualifying lap places their car in the middle lane in front of the starting line.&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
* The player receives a total number of points over their lap: &lt;br /&gt;
**1 point for each round the player takes to complete the lap&lt;br /&gt;
**1 point for each space the player overshoots a corner by (soft tires will have their points doubled)&lt;br /&gt;
**1 point for every full real-time minute it takes the player to complete the lap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The qualifying lap is over if the driver does not stop at all in corners where two or three stops are required. They then have to start the race at the back of the field from the last start position.&lt;br /&gt;
&lt;br /&gt;
After that the order of starting is determined: the car which has completed the qualifying lap with the fewest points takes first position. The other cars follow on in decreasing order of points. If two drivers have the same number of points, the real time taken to complete the lap decides: the fastest player gets the better start position.&lt;br /&gt;
&lt;br /&gt;
== Weather Conditions ==&lt;br /&gt;
&lt;br /&gt;
There is a weather chart for each &amp;quot;Formula D&amp;quot; racing circuit, which is available to all players before the game so that they can inform themselves about weather conditions during the race and qualifying laps.&lt;br /&gt;
&lt;br /&gt;
lf the weather rules are used, it is strongly recommended that the tire selection rules be used as well.&lt;br /&gt;
&lt;br /&gt;
Before the qualifying laps begin, the black die is rolled and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039; or &#039;&#039;&#039;Changable&#039;&#039;&#039;: no problems for drivers&lt;br /&gt;
&#039;&#039;&#039;Rain&#039;&#039;&#039;: The qualifying laps for all players take place in rain (see below).&lt;br /&gt;
&lt;br /&gt;
Before the actual race begins, the black die is rolled again and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039;: no problem.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: The sky is overcast at the beginning of the race, but is does not rain &#039;&#039;&#039;unless&#039;&#039;&#039; it rained during qualifying. Either way, this can change during the course of the race. Whenever a player in 5th gear throws a 20 or a 3O in 6th gear, at the end of the round they have to roll the black die and consult the weather chart:&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;good weather&amp;quot; comes up. the weather conditions are shifted one line upwards.&lt;br /&gt;
If &amp;quot;rain&amp;quot; is the result, the weather conditions are shifted one line downwards.&lt;br /&gt;
If the result is &amp;quot;changeable&amp;quot;, the weather stays the same.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Weather&#039;&#039;&#039;||&#039;&#039;&#039;Effect on race&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Good||None. The weather will no longer change.&lt;br /&gt;
|-&lt;br /&gt;
|Good (Temporary)||None.&lt;br /&gt;
|-&lt;br /&gt;
|Changable||This is the starting step and once the weather conditions shift up or down off Changeable, it will be skipped for the rest of the game.&lt;br /&gt;
|-&lt;br /&gt;
|Rain (Temporary)||Rain.&lt;br /&gt;
|-&lt;br /&gt;
|Rain||Rain. The weather will no longer change.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effect of rain ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Collision&#039;&#039;&#039;: A result of 1 or 2 (instead of just a 1, as in good weather) means a collision occurs.&lt;br /&gt;
* &#039;&#039;&#039;Engine damage&#039;&#039;&#039;: Occurs when result is between 1 and 3 (instead of between 1 and 4, as in good weather).&lt;br /&gt;
* &#039;&#039;&#039;Road handling&#039;&#039;&#039;: The car loses one road handling WP for a result between 1 and 5 (instead of between 1 and 4, as in good weather)&lt;br /&gt;
* &#039;&#039;&#039;Skidding on corners&#039;&#039;&#039;: Cars will skid on corners depending on their tire selection. See &amp;quot;Selection of tires&amp;quot;, below.&lt;br /&gt;
&lt;br /&gt;
== Selection of tires ==&lt;br /&gt;
&lt;br /&gt;
The choice of tires is crucial not just for qualifying lap, but for the race itself. When weather conditions have been determined, each player can fit their car with special tires (see below). It is also possible to change tires between qualifying lap and the race.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hard Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommencled on a dry track and inefficient on a wet track.&lt;br /&gt;
&lt;br /&gt;
* The game rules apply unchanged if the weather is good or changeable.&lt;br /&gt;
* If it is raining, the car moves three additional spaces on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
=== Soft Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient - if not handicapping - on a wet track.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the car can move one additional space during each move in the qualifying or race laps. This additional move is not compulsory. But if a car overshoots a corner, the penalty is doubled (loss of tire WP). if a driver does not change their tires during a pit stop after the first lap, they lose the bonus. If a driver does not change their tires during a pit stop after the second lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
* If it is raining, the car travels three spaces further on any turn which contributes to advancing a corner. If a driver cloes not change their tires during a pit stop before beginning the third lap, the penalties For overshooting  a corner are trebled.&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
=== Rain Tires ===&lt;br /&gt;
&lt;br /&gt;
They are highly recommended if it is raining, but are otherwise very sensitive.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the penalties for overshooting a corner are doubled (loss of tire WP) for qualifying and the first two laps of the race. If a driver does not change their tires before the third race lap, the&lt;br /&gt;
penalties are trebled.&lt;br /&gt;
* If it is raining, the car travels one space further on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
== Technical Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
Your pit has 2 WP which can be used during the race to regain lost WP (with the exception of tire WP). Every time a driver makes a pit stop they can choose between two options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tire pit stop&#039;&#039;&#039;: As in the rules for advanced players, except that the driver may change the type of tire whenever they changes tires.&lt;br /&gt;
* &#039;&#039;&#039;Technlcal pit stop&#039;&#039;&#039;: The driver can change their tires (see above) and in addition regain up to two WP in one or two zones (except the tires). This &amp;quot;reservoir&amp;quot; of 2 WP applies for the entire duration of the race, even if it lasts for more than two laps. In the next round, the car may not start higher than 4th gear. A car with soft tires does not profit from the bonus of an additional space when leaving the pits.&lt;br /&gt;
&lt;br /&gt;
== Team Race ==&lt;br /&gt;
&lt;br /&gt;
A game using these rules is appropriate for a large group with an even number of players. The players form teams each with two players; each colour corresponds to a racing team. Apart from the following two exceptions, the rules apply unchanged:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Pit stop&#039;&#039;&#039;: Each team has 4 WP to repair the cars. Both players must decide together how they want to use these points.&lt;br /&gt;
* &#039;&#039;&#039;Winner by points&#039;&#039;&#039;: A team race is not necessarily won by the first car to cross the finishing line. Each car receives a certain number of winning points. The team with the highest number of total points wins the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000&lt;br /&gt;
|-&lt;br /&gt;
|2||720&lt;br /&gt;
|-&lt;br /&gt;
|3||600&lt;br /&gt;
|-&lt;br /&gt;
|4||480&lt;br /&gt;
|-&lt;br /&gt;
|5||400&lt;br /&gt;
|-&lt;br /&gt;
|6||320&lt;br /&gt;
|-&lt;br /&gt;
|7||240&lt;br /&gt;
|-&lt;br /&gt;
|8||160&lt;br /&gt;
|-&lt;br /&gt;
|9||80&lt;br /&gt;
|-&lt;br /&gt;
|10||40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that these points differ from the published rules. If qualifying is enabled, qualifying points are also awarded equally to both members of the team.&lt;br /&gt;
&lt;br /&gt;
== Nitro Fuel ==&lt;br /&gt;
&lt;br /&gt;
When this option is chosen, all cars have a nitro Fuel injection, which allows instant acceleration. Players can use their nitro once a lap after rolling the corresponding gear die. They receive a movement bonus according to the gear they are using at that moment (1 space in 1st gear, 2 spaces in 2nd gear, etc.). This bonus must be used completely.&lt;br /&gt;
&lt;br /&gt;
When a car completes a lap, it replenishes its nitro fuel and may use it again.&lt;br /&gt;
&lt;br /&gt;
Nitro may only be used if it is available when rolling the gear die. It does not become available during the same move where you complete a lap.&lt;br /&gt;
&lt;br /&gt;
= BGA Rule Variations=&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
The differences from the rules you will find in your own copy of Formula D are:&lt;br /&gt;
&lt;br /&gt;
==Round Order ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, if two cars are level with each other, the driver with the highest gear plays first. If both cars are in the same gear, the car nearest the inside with reference to the next (or the current) corner plays first.&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the higher gear continues to be first but if both cars are in the same gear *then the player who first arrived at their space* goes first. Corners no longer affect who goes first.&lt;br /&gt;
&lt;br /&gt;
==Points ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, points are awarded for race completion &#039;&#039;&#039;and&#039;&#039;&#039; for Qualifying (if enabled). The Qualifying points are minor by comparison and serve as a tie-break if two players are both eliminated and score 0 in the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;&#039;||&#039;&#039;&#039;Race Points&#039;&#039;&#039;||&#039;&#039;&#039;Qualifying Points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000||10&lt;br /&gt;
|-&lt;br /&gt;
|2||720||9&lt;br /&gt;
|-&lt;br /&gt;
|3||600||8&lt;br /&gt;
|-&lt;br /&gt;
|4||480||7&lt;br /&gt;
|-&lt;br /&gt;
|5||400||6&lt;br /&gt;
|-&lt;br /&gt;
|6||320||5&lt;br /&gt;
|-&lt;br /&gt;
|7||240||4&lt;br /&gt;
|-&lt;br /&gt;
|8||160||3&lt;br /&gt;
|-&lt;br /&gt;
|9||80||2&lt;br /&gt;
|-&lt;br /&gt;
|10||40||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To cover multiple players being eliminated during a game where there is not Qualifying, their distance travelled before being eliminated is used as the final tie-break (only in non-team games). If a player overshoots a corner or crashes into the back of other cars, their position at the &#039;&#039;&#039;start&#039;&#039;&#039; of the turn is used.&lt;br /&gt;
&lt;br /&gt;
==Braking ==&lt;br /&gt;
&lt;br /&gt;
The original rules provide a table that describes the outcome of &amp;quot;Emergency Braking&amp;quot; (when a car is blocked by one or more cars which they are unable to overtake). The table does not take Constructed Cars into account, so to clarify, the implemented rules are:&lt;br /&gt;
&lt;br /&gt;
If a player performs Emergency Braking, they must move their car forward as many spaces as possible. If they need to brake more than 3 spaces, they are required to use Brake WPs for the first 3 spaces, and each subsequent space may be paid for using Brake WP *or* Tire WPs.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
==Qualifying ==&lt;br /&gt;
&lt;br /&gt;
Players do not roll the black starting die at the beginning of Qualifying: they just start in 1st gear.&lt;br /&gt;
&lt;br /&gt;
The original rules simply state that &amp;quot;WP are not taken into account&amp;quot; during qualifying. However, the effect of this is clarified in this adaptation:&lt;br /&gt;
&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
&lt;br /&gt;
In this version, Qualifying awards points as long as you complete your lap:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||10&lt;br /&gt;
|-&lt;br /&gt;
|2||9&lt;br /&gt;
|-&lt;br /&gt;
|3||8&lt;br /&gt;
|-&lt;br /&gt;
|4||7&lt;br /&gt;
|-&lt;br /&gt;
|5||6&lt;br /&gt;
|-&lt;br /&gt;
|6||5&lt;br /&gt;
|-&lt;br /&gt;
|7||4&lt;br /&gt;
|-&lt;br /&gt;
|8||3&lt;br /&gt;
|-&lt;br /&gt;
|9||2&lt;br /&gt;
|-&lt;br /&gt;
|10||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Collision Checks ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the active player checks for collisions only after all adjacent players have rolled. If an adjacent player fails their roll and is eliminated as a result, the active player will automatically fail their roll against that player.&lt;br /&gt;
&lt;br /&gt;
==Weather Rolls ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, the Weather die is thrown immediately when a player rolls the maximum number in 5th or 6th gear. In this adaptation, this roll still occurs but it is deferred until the end of the round. This way, weather can only change between rounds and not in the middle of a player&#039;s turn. If multiple players roll the maximum number, the weather die will be rolled multiple times.&lt;br /&gt;
&lt;br /&gt;
==Changeable Weather ==&lt;br /&gt;
&lt;br /&gt;
The original rules have 4 steps for Changeable Weather (Good, Good - Changeable, Rain - Changeable, Rain).&lt;br /&gt;
&lt;br /&gt;
In this adaptation, there are 5 steps: Good, Good - Temporary, Changeable, Rain - Temporary, Rain.&lt;br /&gt;
&lt;br /&gt;
Changeable is only ever used at the start of a race, and by default is Good - with one exception: if it rained in qualifying then a changeable feature race will start Changeable but raining.&lt;br /&gt;
&lt;br /&gt;
Weather will never be changeable in qualifying: it will be Good unless Rain is rolled.&lt;br /&gt;
&lt;br /&gt;
==Spinning ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that if a car on 0 Tire WP overshoots a corner then it &amp;quot;will again spin round in a circle. If the car overshoots the corner by more than one space, it is out of the race&amp;quot;. In this adaptation, a car with 0 Tire WP is eliminated if it overshoots a corner by more than 1 WP. Hence, even a single space overshoot will eliminate a 0 Tire WP car on soft tires.&lt;br /&gt;
&lt;br /&gt;
Additionally, in this adaptation when you spin, your Tire WP are reset to 1 WP (instead of remaining at 0 WP).&lt;br /&gt;
&lt;br /&gt;
==Skidding on Corners in the Rain ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that cars will skid in the rain &amp;quot;provided at least one space of the move lies within the limits of a corner&amp;quot;. In this adaptation, skidding will only occur on any turn that counts towards a corner&#039;s completion. That means:&lt;br /&gt;
&lt;br /&gt;
* Driving through a corner that you have already completed will &#039;&#039;not&#039;&#039; cause you to skid&lt;br /&gt;
* If you are on the final space in a corner and still need to land in it 1 more turn, you will skid on your next move even though you are driving into a straight&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Motor Damage Checks==&lt;br /&gt;
&lt;br /&gt;
Motor damage checks are always performed in round order.&lt;br /&gt;
&lt;br /&gt;
==Braking in the Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that the rules for braking do not apply in the pit lane. In this adaptation, there is no braking cost for stopping immediately behind another car, or in your pit box. However, there is a brake cost for travelling any distance shorter than that.&lt;br /&gt;
&lt;br /&gt;
== Pit Boxes ==&lt;br /&gt;
&lt;br /&gt;
In Individual Driver games, a single pit box will be reserved for each driver instead of drivers being assigned a pit box color. The box will be indicated with the player&#039;s avatar.&lt;br /&gt;
&lt;br /&gt;
== Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down DO apply in the pit lane.&lt;br /&gt;
&lt;br /&gt;
There are also minimum gears that may be used in the pit lane:&lt;br /&gt;
&lt;br /&gt;
* Once a player has entered the pit lane, they must choose a gear which would allow their car to enter their pit box on a maximum roll. If they cannot use such a gear, they must use the highest gear permitted by their previous move.&lt;br /&gt;
&lt;br /&gt;
* Exiting the pits: 1st gear is prohibited to drivers from their pit box to the outlet of the pit lane, except when 2nd gear might be unsafe&lt;br /&gt;
&lt;br /&gt;
== Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
The soft tire bonus may not be used when moving after a Quick Pit Stop.&lt;br /&gt;
&lt;br /&gt;
If Technical Pit Stops are enabled, players may always choose to take one (and thus finish their turn) even if they have no repair points or repairs to perform.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, if players have selected the option to Construct their own car then there are no limits to how many points they may assign to any given area.&lt;br /&gt;
&lt;br /&gt;
In games that have also selected the Technical Pit Stop rules, then instead of having a fixed 2 WPs available for Pit repairs, a player will have 22 WPs to use in Construction and can choose how many repair points to make available, with a maximum of 2.&lt;br /&gt;
&lt;br /&gt;
==Road Races ==&lt;br /&gt;
&lt;br /&gt;
The Road Race rules, including Drivers with special abilities, are not used.&lt;br /&gt;
&lt;br /&gt;
Where Road Race circuits are used, all non-standard rules are ignored.&lt;br /&gt;
&lt;br /&gt;
Nitro Fuel Injection is available as an option for all races.&lt;br /&gt;
&lt;br /&gt;
==Elimination ==&lt;br /&gt;
&lt;br /&gt;
When a player is eliminated, the outcome is slightly different from the published rules. &lt;br /&gt;
&lt;br /&gt;
*If the elimination was caused by the player overshooting corners or driving over a damage marker, the car is immediately removed from the board and &#039;&#039;&#039;no damage marker is placed&#039;&#039;&#039;&lt;br /&gt;
*If the elimination was caused by the player failing a motor damage test, the car is immediately removed from the board and a damage marker is added.&lt;br /&gt;
*If the player is eliminated by any other reason, a damage marker is added and the car remains on the board until the end of the round, when it is removed.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=27667</id>
		<title>Gamehelpformulad</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpformulad&amp;diff=27667"/>
		<updated>2025-12-14T00:52:20Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* BGA Rule Variations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 10-Second Explainer of Formula D =&lt;br /&gt;
New to Formula D?&lt;br /&gt;
&lt;br /&gt;
This 10-second explainer will get you started:&lt;br /&gt;
&lt;br /&gt;
# Your car will start in 1st gear.&lt;br /&gt;
# At the start of your turn, your first decision is whether to stay on your current gear, or go up 1 gear or go down. You can go down 1 gear without penalty.&lt;br /&gt;
# After choosing a gear, you will roll the appropriate &amp;quot;gear die&amp;quot;. The higher the gear, the bigger the die.&lt;br /&gt;
# Once you have rolled, you must move the number of spaces rolled, although you may choose which path you take.&lt;br /&gt;
# Corners are areas marked in red. To drive around corners without penalty, you must finish at least 1 turn in them.&lt;br /&gt;
# Some corners are particularly slow and may require that you finish at least 2 or even 3 turns in them.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! There&#039;s a lot more to it than that, but this covers the absolute basics of driving safely around the track.&lt;br /&gt;
&lt;br /&gt;
= Important: BGA Rule Variations =&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
[[Gamehelpformulad#BGA Rule Variations|At the end of these rules]], you will find a list of all differences from the published game rules.&lt;br /&gt;
&lt;br /&gt;
=Adaptation Notes/Common Mistakes=&lt;br /&gt;
&lt;br /&gt;
# The central area of your car is the colour of the pit box you must use (and your team if playing a team game)&lt;br /&gt;
# Your sidepods are your unique player color&lt;br /&gt;
# To enter the pitbox, you must move out of the pit lane and onto the coloured pit box. Stopping in the pit lane in front of your box is not a pit stop.&lt;br /&gt;
# To zoom the circuit in and out with a mouse, use Ctrl+Wheelmouse.&lt;br /&gt;
&lt;br /&gt;
=Basic Rules=&lt;br /&gt;
&lt;br /&gt;
== Aim of the game ==&lt;br /&gt;
&lt;br /&gt;
FORMULA D is a car race. The aim is to win a race (of one lap) and be the first to cross the finishing line. There are all sorts of risks involved and you have to anticipate what will happen during the course of the race. You must decide on your strategy, trust to luck, keep to the rules and always keep an eye on the technical condition of your car.&lt;br /&gt;
&lt;br /&gt;
== The gears ==&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears. Each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2 or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Color||Die||Movement (Number of spaces)&lt;br /&gt;
!Face distribution&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|1,1,2,2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|2,3,3,4,4,4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|4,5,6,6,7,7,8,8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|2 of each&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|2 of each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Driving ==&lt;br /&gt;
&lt;br /&gt;
As in real life the car starts in 1st gear. Then you shift up to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then roll the die which corresponds to the chosen speed. They then move their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is important especially in the corners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Order of play&#039;&#039;&#039;: In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Driving Code ==&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
===Driving code in the corners ===&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated in the yellow box) within the limits of the corner.  The number of filled red circles indicates the number of stops for that corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refer to the longest path, the numbers in the red box refer to the shortest path.&lt;br /&gt;
&lt;br /&gt;
===Driving code on the straights ===&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
==Wear points (WP) ==&lt;br /&gt;
&lt;br /&gt;
They reflect the capability of the car to stay on the track and survive events during the race. In the Basic Game, each car has 18 WP at the beginning of the race. The players use these points to survive various incidents and risky maneuvers.&lt;br /&gt;
&lt;br /&gt;
==Preparation for play ==&lt;br /&gt;
&lt;br /&gt;
===Start formation ===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. In the case of a tie, all involved players re-roll the die.&lt;br /&gt;
&lt;br /&gt;
===Start ===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: 1 – poor start&#039;&#039;&#039;. The player has stalled the motor of their car. They cannot engage 1st gear and so they have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 2 and 16&#039;&#039;&#039; – normal start. The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Number rolled: between 17 and 20&#039;&#039;&#039; – great start! The player makes a fantastic start. They moves their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their WP at any time to avoid having to advance the full number of spaces shown on the die. In this way they can control their progress better, for example when the lanes are blocked by other cars.&lt;br /&gt;
&lt;br /&gt;
==Changing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox. The number of gears skipped equates to the number of WP their car loses as a result. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they roll a number between 1 and 4 their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Two-lap race==&lt;br /&gt;
&lt;br /&gt;
For players who have already played several single-lap games.&lt;br /&gt;
&lt;br /&gt;
Whoever crosses the finishing line first after two laps wins the game. Players may make a pit stop between the first and second laps to regain the WP points they lost during the first round.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap a player may decide to make a pit stop to regain all the WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one’s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the colour of your car&#039;s central strip.&lt;br /&gt;
&lt;br /&gt;
===Entering pits===&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is sufficient to roll the minimum number required or higher using the die corresponding to the selected gear. The car receives all 18 WP back and awaits their next turn to start from the pits in 4th gear (maximum).&lt;br /&gt;
&lt;br /&gt;
The rules for changing down gear, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
=Advanced Rules=&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
===The gears===&lt;br /&gt;
&lt;br /&gt;
The cars have 6 gears, each gear has its own die. The numbers on the dice tell you how many spaces to move the car. The higher the gear you choose, the faster and further the corresponding die will allow the car to travel. You are not allowed to skip gears when accelerating (e.g. changing straight from 1st to 3rd gear). You are allowed to skip 1, 2, or 3 gears when braking (e.g. from 6th to 4th or from 4th to 1st gear); however there is a penalty for doing this.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gear!! Die Color||Die Size||Movement (Number of spaces)&lt;br /&gt;
|-&lt;br /&gt;
|1||Yellow||d4||1-2&lt;br /&gt;
|-&lt;br /&gt;
|2||Orange||d6||2-4&lt;br /&gt;
|-&lt;br /&gt;
|3||Red||d8||4-8&lt;br /&gt;
|-&lt;br /&gt;
|4||Green||d12||7-12&lt;br /&gt;
|-&lt;br /&gt;
|5||Purple||d20||11-20&lt;br /&gt;
|-&lt;br /&gt;
|6||Blue||d20||21-30&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Driving===&lt;br /&gt;
&lt;br /&gt;
As in real life, the car starts in 1st gear. Then you up shift to 2nd gear and so on up to 6th gear, in order to move as fast as possible. When it is a driver’s turn they announce which gear they have chosen, move the gear stick on their dashboard accordingly and then rolls the die which corresponds to the chosen speed. They then moves their car forward the number of spaces indicated on the die. When the move is finished the car “stops”. This notion is important especially in the corners.&lt;br /&gt;
&lt;br /&gt;
====Order of play====&lt;br /&gt;
&lt;br /&gt;
In each round the drivers play according to their car position on the track.&lt;br /&gt;
&lt;br /&gt;
Example: During a round of play car A overtakes car B which was in 1st position. When the next round starts, car A, now in 1st position, will play before car B.&lt;br /&gt;
&lt;br /&gt;
Cars in the straight outside the pit lane will always move before cars in the pit lane. When two cars are level, the car in the highest gear goes first. When cars are level and in the same gear, the car that arrived in their current space first will go first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Same position====&lt;br /&gt;
&lt;br /&gt;
If two cars on the track are level with each other, the driver with the highest gear plays first.&lt;br /&gt;
&lt;br /&gt;
If both cars are in the same gear, the car that arrived first at their current space plays first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Driving Code===&lt;br /&gt;
&lt;br /&gt;
The cars drive in the track lanes. Different driving codes apply to corners and straights. It is generally not allowed to go over other cars – they must be driven round. Driving backwards is also not allowed.&lt;br /&gt;
&lt;br /&gt;
====Driving code in the corners====&lt;br /&gt;
&lt;br /&gt;
To drive through a corner a car must stop a minimum number of times (indicated by the number of red stop lights in the corner information box) within the limits of the corner. After the requisite number of stops, the car may proceed and exit the corner on its next move.&lt;br /&gt;
&lt;br /&gt;
To make it easier to drive through the corner, the driver should consider the indicated number of spaces. The number in the green box refer to the longest path, the numbers in the red box refer to the shortest path.&lt;br /&gt;
&lt;br /&gt;
====Driving code on the straights====&lt;br /&gt;
&lt;br /&gt;
Straights are the portions of track between corners. Depending on the length of each straight, cars may need several rounds before entering the next corner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The maneuver must be completed using the smallest number of spaces possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wear points (WP)===&lt;br /&gt;
&lt;br /&gt;
Wear Points reflect the ability of the car to stay on the track and survive events during the race. Each car has a certain number of WP at the beginning of the race, which are divided up between six different categories. These points are distributed as follows in the game for advanced players:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|WP tires:||6&lt;br /&gt;
|-&lt;br /&gt;
|WP brakes:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP gearbox:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP car body:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP engine:||3&lt;br /&gt;
|-&lt;br /&gt;
|WP road handling:||2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Preparation for play==&lt;br /&gt;
&lt;br /&gt;
===Start formation===&lt;br /&gt;
&lt;br /&gt;
Every player rolls the black die in order to determine the starting position of their car. Whoever rolls the highest number gains pole position. The other cars are positioned in decreasing order according to the numbers rolled. (ln the case of a tie, all concerned players re-roll the die.)&lt;br /&gt;
&lt;br /&gt;
===Start===&lt;br /&gt;
&lt;br /&gt;
Before engaging 1st gear, every player rolls the black die to see how successfully they can start.&lt;br /&gt;
&lt;br /&gt;
====Number rolled, 1 - poor start====&lt;br /&gt;
&lt;br /&gt;
The player has stalled the motor of their car. They cannot engage 1st gear and so have to wait till the next round. Then they can start in 1st gear without having to roll the black die again.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: between 2 and 19 - normal start====&lt;br /&gt;
&lt;br /&gt;
The player can start normally. They roll the die for 1st gear and moves their car forward according to the number rolled.&lt;br /&gt;
&lt;br /&gt;
====Number rolled: 2O - great start!====&lt;br /&gt;
&lt;br /&gt;
The player makes a fantastic start. They move their car forward 4 spaces immediately, although they is still in 1st gear. The car can change one or two lanes to avoid other cars. The driver may shift to 2nd gear in the next round.&lt;br /&gt;
&lt;br /&gt;
==Overshooting==&lt;br /&gt;
&lt;br /&gt;
If a car passes through a corner at the end of its turn without making the required number of stops, it overshoots the corner. The number of spaces the car overshot the corner by is deducted from the car’s tire WP as a penalty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 2 stops&#039;&#039;&#039;: If the car has made no stops, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Corner with 3 stops&#039;&#039;&#039;: If the car has made no stops, or only one stop, it is automatically removed from play.&lt;br /&gt;
&lt;br /&gt;
When coming out of a corner the car may not change lane, but must stay in the same lane. If the move ends in another corner, this stop does not count for the new corner. If the car is blocked by another car, they cannot drive round it and has to brake.&lt;br /&gt;
&lt;br /&gt;
When a car loses their last tire WP by overshooting a corner, they spin round in a circle. The car is placed on the space where their move ended, pointing backwards. The player must turn their car round again and drive off in 1st gear when it is their next turn. In this adaptation, their Tire WPs are reset to 1.&lt;br /&gt;
&lt;br /&gt;
If a car loses more tire WP than it possesses, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Braking==&lt;br /&gt;
&lt;br /&gt;
A player may use their brake WP at any time to avoid having to advance the full number of spaces shown on the die. This can help to prevent losing tire WP if they would otherwise overshoot a corner.&lt;br /&gt;
&lt;br /&gt;
A driver can find themselves blocked by one or more cars which they are unable to overtake. After the driver has moved their car forward as many spaces as possible, they counts how many spaces they would have moved if they had not been blocked.&lt;br /&gt;
&lt;br /&gt;
If the number of spaces short of the full number 4 or greater, they may use Emergency Braking. In this case, their first 3 spaces must be paid for with Brake WP. Each additional space after that may be paid by either Brake or Tire WP.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
If a car doesn&#039;t have enough brake WP and tire WP to stop before a blockage, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Gearing down==&lt;br /&gt;
&lt;br /&gt;
A driver can skip one, two or three gears when changing down, however this wears out their gearbox.&lt;br /&gt;
&lt;br /&gt;
As a result, the car then loses a certain number of brake WP, engine WP and gearbox WP. The table below lists the corresponding wear. Note: It is not possible to skip four gears (from 6th to 1st gear).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Gears skipped!!Gearbox WP!!Brake WP!!Engine WP&lt;br /&gt;
|-&lt;br /&gt;
|1 gear||1||0||0&lt;br /&gt;
|-&lt;br /&gt;
|2 gears||1||1||0&lt;br /&gt;
|-&lt;br /&gt;
|3 gears||1||1||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a car has no gearbox WP left, the driver can only change clown one gear at a time until the game is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Collision==&lt;br /&gt;
&lt;br /&gt;
Whenever a car ends its move on a space next to or behind one or several cars, there is a risk of collision. A driver in this situation must roll the black die to see whether there is a collision or not. If they rolls a 1, their car loses 1 WP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In this adaptation&#039;&#039;&#039; the car that did not just move rolls first. If it fails the roll and is eliminated from the race as a result, the car that moved will automatically fail its roll.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last car body WP, it is eliminated&#039;&#039;&#039; from the race.&lt;br /&gt;
&lt;br /&gt;
==Motor damage==&lt;br /&gt;
&lt;br /&gt;
If a player rolls a 20 in 5th gear or a 30 in 6th gear, this puts a strain on their engine. After their car has finished moving they must therefore roll the black die to test whether their engine has withstood the strain. All players who are driving in 5th or 6th gear at this moment must also roll the black die. If a number between 1 and 4 is rolled, the corresponding car loses 1 engine WP.&lt;br /&gt;
&lt;br /&gt;
If a car loses its last engine WP, it is eliminated from the race.&lt;br /&gt;
&lt;br /&gt;
==Damage and road handling==&lt;br /&gt;
&lt;br /&gt;
Each time a car loses a car body WP or an engine WP, a damage marker is placed on the space where the move ended.&lt;br /&gt;
&lt;br /&gt;
The same applies whenever a car is eliminated from the race for whatever reason. These spaces are judged to be &amp;quot;dangerous&amp;quot; from then on.&lt;br /&gt;
&lt;br /&gt;
If a car passes over one of these spaces or lands on it, the driver must roll the black die. If the result is between 1 and 4, the car loses one road handling WP. The dangerous spaces can be avoided by changing lanes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If a car loses its last road handling WP, it is eliminated from the race.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If a car drives in the wake of another car, this is called slipstreaming.&lt;br /&gt;
&lt;br /&gt;
For the two concerned drivers, slipstreaming is possible from the 4th gear on.&lt;br /&gt;
&lt;br /&gt;
The car must be driving as fast or faster than the car in front.&lt;br /&gt;
&lt;br /&gt;
If a car wants to profit from slipstreaming after moving, it has to stop directly behind another car. From this position they can then add 3 spaces onto their last move. They can move forward 3 spaces in the following way:&lt;br /&gt;
&lt;br /&gt;
*change a lane, overtake the car in front and return to the original lane.&lt;br /&gt;
*change a lane and move two spaces in a straight line.&lt;br /&gt;
*change two lanes and move one space in a straight line.&lt;br /&gt;
&lt;br /&gt;
The player must move a total of three spaces in any case. (However, the driver may use brake WP in order to reduce this number of spaces.) If slipstreaming brings a car up immediately behind another car, they can carry on slipstreaming (and so on).&lt;br /&gt;
&lt;br /&gt;
If a car is carried into a corner by slipstreaming, they lose a brake WP (without the number of spaces being reduced).&lt;br /&gt;
&lt;br /&gt;
In a corner, a slipstreaming car must follow normal driving code (eg. following the arrows).&lt;br /&gt;
&lt;br /&gt;
Braking in order to take advantage of slipstreaming in the wake of another player&#039;s car is not allowed.&lt;br /&gt;
&lt;br /&gt;
Drivers do not have to slipstream!&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Pit stop==&lt;br /&gt;
&lt;br /&gt;
At the end of the first lap, a player may decide to make a pit stop to regain all the tire WP they have lost. There is no speed limit in the pit lanes. It is also not necessary to roll the exact number needed to reach one&#039;s own pit.&lt;br /&gt;
&lt;br /&gt;
In the BGA adaptation, your pit box matches the central colour of your car.&lt;br /&gt;
&lt;br /&gt;
To enter the pits it is necessary to roll the minimum number required or higher using the die corresponding to the selected gear. As soon as the car enters the pits, it receives all its tire WP back. The player now rolls the black die, in order to see how fast their mechanics work.&lt;br /&gt;
&lt;br /&gt;
===Result between 1 and 10: quick pit stop===&lt;br /&gt;
&lt;br /&gt;
The player divides the number shown on the black die by two (rounding it up if necessary). The result is the number of spaces the car is allowed to move when the car leaves the pit in 4th gear.&lt;br /&gt;
&lt;br /&gt;
===Result between 11 and 20: slow pit stop===&lt;br /&gt;
&lt;br /&gt;
The car remains in the pit until the next round. Then the car moves on in 4th gear (or a lower gear).&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down, collision, braking and engine damage do not apply in the pit lane. Overtaking is not possible as it is a single lane. Drivers have to be patient and wait until the car ahead of them moves forward, regardless of selected gear and with no effect on the WP.&lt;br /&gt;
&lt;br /&gt;
Cars in the pit lane must wait for their turn, until the cars on the circuit between pit exit and entry have had their turn.&lt;br /&gt;
&lt;br /&gt;
==Finish==&lt;br /&gt;
&lt;br /&gt;
The player whose car passes the finishing line first has won the race. The race ends when all cars have crossed the finishing line, in order to enable ranking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Optional Rules=&lt;br /&gt;
&lt;br /&gt;
All the following rules can be used of one another.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car==&lt;br /&gt;
&lt;br /&gt;
Every player can distribute their 20 WP between the zones of their car at their own discretion. At least 1 WP must be assigned to each zone.&lt;br /&gt;
&lt;br /&gt;
If using the Technical Pit Stops option, 2 addition WPs are available to assign, and players may assign 0-2 points to Repair points.&lt;br /&gt;
&lt;br /&gt;
==Qualifying lap with a stopwatch==&lt;br /&gt;
&lt;br /&gt;
All players drive a qualifying lap with stopwatch consecutively, in order to determine their start positions. The rules for moves and driving code remain unchanged during the qualifier, however the WP are not taken into account. The only exception is if a car overshoots a corner - this is penalized.&lt;br /&gt;
&lt;br /&gt;
* The player whose turn it is to drive a qualifying lap places their car in the middle lane in front of the starting line.&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
* The player receives a total number of points over their lap: &lt;br /&gt;
**1 point for each round the player takes to complete the lap&lt;br /&gt;
**1 point for each space the player overshoots a corner by (soft tires will have their points doubled)&lt;br /&gt;
**1 point for every full real-time minute it takes the player to complete the lap&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The qualifying lap is over if the driver does not stop at all in corners where two or three stops are required. They then have to start the race at the back of the field from the last start position.&lt;br /&gt;
&lt;br /&gt;
After that the order of starting is determined: the car which has completed the qualifying lap with the fewest points takes first position. The other cars follow on in decreasing order of points. If two drivers have the same number of points, the real time taken to complete the lap decides: the fastest player gets the better start position.&lt;br /&gt;
&lt;br /&gt;
== Weather Conditions ==&lt;br /&gt;
&lt;br /&gt;
There is a weather chart for each &amp;quot;Formula D&amp;quot; racing circuit, which is available to all players before the game so that they can inform themselves about weather conditions during the race and qualifying laps.&lt;br /&gt;
&lt;br /&gt;
lf the weather rules are used, it is strongly recommended that the tire selection rules be used as well.&lt;br /&gt;
&lt;br /&gt;
Before the qualifying laps begin, the black die is rolled and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039; or &#039;&#039;&#039;Changable&#039;&#039;&#039;: no problems for drivers&lt;br /&gt;
&#039;&#039;&#039;Rain&#039;&#039;&#039;: The qualifying laps for all players take place in rain (see below).&lt;br /&gt;
&lt;br /&gt;
Before the actual race begins, the black die is rolled again and the weather chart consulted:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good weather&#039;&#039;&#039;: no problem.&lt;br /&gt;
&#039;&#039;&#039;Changeable&#039;&#039;&#039;: The sky is overcast at the beginning of the race, but is does not rain &#039;&#039;&#039;unless&#039;&#039;&#039; it rained during qualifying. Either way, this can change during the course of the race. Whenever a player in 5th gear throws a 20 or a 3O in 6th gear, at the end of the round they have to roll the black die and consult the weather chart:&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;good weather&amp;quot; comes up. the weather conditions are shifted one line upwards.&lt;br /&gt;
If &amp;quot;rain&amp;quot; is the result, the weather conditions are shifted one line downwards.&lt;br /&gt;
If the result is &amp;quot;changeable&amp;quot;, the weather stays the same.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Weather&#039;&#039;&#039;||&#039;&#039;&#039;Effect on race&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Good||None. The weather will no longer change.&lt;br /&gt;
|-&lt;br /&gt;
|Good (Temporary)||None.&lt;br /&gt;
|-&lt;br /&gt;
|Changable||This is the starting step and once the weather conditions shift up or down off Changeable, it will be skipped for the rest of the game.&lt;br /&gt;
|-&lt;br /&gt;
|Rain (Temporary)||Rain.&lt;br /&gt;
|-&lt;br /&gt;
|Rain||Rain. The weather will no longer change.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effect of rain ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Collision&#039;&#039;&#039;: A result of 1 or 2 (instead of just a 1, as in good weather) means a collision occurs.&lt;br /&gt;
* &#039;&#039;&#039;Engine damage&#039;&#039;&#039;: Occurs when result is between 1 and 3 (instead of between 1 and 4, as in good weather).&lt;br /&gt;
* &#039;&#039;&#039;Road handling&#039;&#039;&#039;: The car loses one road handling WP for a result between 1 and 5 (instead of between 1 and 4, as in good weather)&lt;br /&gt;
* &#039;&#039;&#039;Skidding on corners&#039;&#039;&#039;: Cars will skid on corners depending on their tire selection. See &amp;quot;Selection of tires&amp;quot;, below.&lt;br /&gt;
&lt;br /&gt;
== Selection of tires ==&lt;br /&gt;
&lt;br /&gt;
The choice of tires is crucial not just for qualifying lap, but for the race itself. When weather conditions have been determined, each player can fit their car with special tires (see below). It is also possible to change tires between qualifying lap and the race.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hard Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommencled on a dry track and inefficient on a wet track.&lt;br /&gt;
&lt;br /&gt;
* The game rules apply unchanged if the weather is good or changeable.&lt;br /&gt;
* If it is raining, the car moves three additional spaces on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
=== Soft Tires ===&lt;br /&gt;
&lt;br /&gt;
They are recommended on a dry track and inefficient - if not handicapping - on a wet track.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the car can move one additional space during each move in the qualifying or race laps. This additional move is not compulsory. But if a car overshoots a corner, the penalty is doubled (loss of tire WP). if a driver does not change their tires during a pit stop after the first lap, they lose the bonus. If a driver does not change their tires during a pit stop after the second lap, the penalties for overshooting a corner are trebled.&lt;br /&gt;
* If it is raining, the car travels three spaces further on any turn which contributes to advancing a corner. If a driver cloes not change their tires during a pit stop before beginning the third lap, the penalties For overshooting  a corner are trebled.&lt;br /&gt;
&lt;br /&gt;
Note that in this implementation, if your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
=== Rain Tires ===&lt;br /&gt;
&lt;br /&gt;
They are highly recommended if it is raining, but are otherwise very sensitive.&lt;br /&gt;
&lt;br /&gt;
* If the weather is changeable or good, the penalties for overshooting a corner are doubled (loss of tire WP) for qualifying and the first two laps of the race. If a driver does not change their tires before the third race lap, the&lt;br /&gt;
penalties are trebled.&lt;br /&gt;
* If it is raining, the car travels one space further on any turn which contributes to advancing a corner.&lt;br /&gt;
&lt;br /&gt;
== Technical Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
Your pit has 2 WP which can be used during the race to regain lost WP (with the exception of tire WP). Every time a driver makes a pit stop they can choose between two options:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tire pit stop&#039;&#039;&#039;: As in the rules for advanced players, except that the driver may change the type of tire whenever they changes tires.&lt;br /&gt;
* &#039;&#039;&#039;Technlcal pit stop&#039;&#039;&#039;: The driver can change their tires (see above) and in addition regain up to two WP in one or two zones (except the tires). This &amp;quot;reservoir&amp;quot; of 2 WP applies for the entire duration of the race, even if it lasts for more than two laps. In the next round, the car may not start higher than 4th gear. A car with soft tires does not profit from the bonus of an additional space when leaving the pits.&lt;br /&gt;
&lt;br /&gt;
== Team Race ==&lt;br /&gt;
&lt;br /&gt;
A game using these rules is appropriate for a large group with an even number of players. The players form teams each with two players; each colour corresponds to a racing team. Apart from the following two exceptions, the rules apply unchanged:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Pit stop&#039;&#039;&#039;: Each team has 4 WP to repair the cars. Both players must decide together how they want to use these points.&lt;br /&gt;
* &#039;&#039;&#039;Winner by points&#039;&#039;&#039;: A team race is not necessarily won by the first car to cross the finishing line. Each car receives a certain number of winning points. The team with the highest number of total points wins the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000&lt;br /&gt;
|-&lt;br /&gt;
|2||720&lt;br /&gt;
|-&lt;br /&gt;
|3||600&lt;br /&gt;
|-&lt;br /&gt;
|4||480&lt;br /&gt;
|-&lt;br /&gt;
|5||400&lt;br /&gt;
|-&lt;br /&gt;
|6||320&lt;br /&gt;
|-&lt;br /&gt;
|7||240&lt;br /&gt;
|-&lt;br /&gt;
|8||160&lt;br /&gt;
|-&lt;br /&gt;
|9||80&lt;br /&gt;
|-&lt;br /&gt;
|10||40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that these points differ from the published rules. If qualifying is enabled, qualifying points are also awarded equally to both members of the team.&lt;br /&gt;
&lt;br /&gt;
== Nitro Fuel ==&lt;br /&gt;
&lt;br /&gt;
When this option is chosen, all cars have a nitro Fuel injection, which allows instant acceleration. Players can use their nitro once a lap after rolling the corresponding gear die. They receive a movement bonus according to the gear they are using at that moment (1 space in 1st gear, 2 spaces in 2nd gear, etc.). This bonus must be used completely.&lt;br /&gt;
&lt;br /&gt;
When a car completes a lap, it replenishes its nitro fuel and may use it again.&lt;br /&gt;
&lt;br /&gt;
Nitro may only be used if it is available when rolling the gear die. It does not become available during the same move where you complete a lap.&lt;br /&gt;
&lt;br /&gt;
= BGA Rule Variations=&lt;br /&gt;
&lt;br /&gt;
The BGA Adaptation of Formula D uses a number of variations from the Masters (Tournament) rules.&lt;br /&gt;
&lt;br /&gt;
The differences from the rules you will find in your own copy of Formula D are:&lt;br /&gt;
&lt;br /&gt;
==Round Order ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, if two cars are level with each other, the driver with the highest gear plays first. If both cars are in the same gear, the car nearest the inside with reference to the next (or the current) corner plays first.&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the higher gear continues to be first but if both cars are in the same gear *then the player who first arrived at their space* goes first. Corners no longer affect who goes first.&lt;br /&gt;
&lt;br /&gt;
==Points ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, points are awarded for race completion &#039;&#039;&#039;and&#039;&#039;&#039; for Qualifying (if enabled). The Qualifying points are minor by comparison and serve as a tie-break if two players are both eliminated and score 0 in the race.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;&#039;||&#039;&#039;&#039;Race Points&#039;&#039;&#039;||&#039;&#039;&#039;Qualifying Points&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||1000||10&lt;br /&gt;
|-&lt;br /&gt;
|2||720||9&lt;br /&gt;
|-&lt;br /&gt;
|3||600||8&lt;br /&gt;
|-&lt;br /&gt;
|4||480||7&lt;br /&gt;
|-&lt;br /&gt;
|5||400||6&lt;br /&gt;
|-&lt;br /&gt;
|6||320||5&lt;br /&gt;
|-&lt;br /&gt;
|7||240||4&lt;br /&gt;
|-&lt;br /&gt;
|8||160||3&lt;br /&gt;
|-&lt;br /&gt;
|9||80||2&lt;br /&gt;
|-&lt;br /&gt;
|10||40||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To cover multiple players being eliminated during a game where there is not Qualifying, their distance travelled before being eliminated is used as the final tie-break (only in non-team games). If a player overshoots a corner or crashes into the back of other cars, their position at the &#039;&#039;&#039;start&#039;&#039;&#039; of the turn is used.&lt;br /&gt;
&lt;br /&gt;
==Braking ==&lt;br /&gt;
&lt;br /&gt;
The original rules provide a table that describes the outcome of &amp;quot;Emergency Braking&amp;quot; (when a car is blocked by one or more cars which they are unable to overtake). The table does not take Constructed Cars into account, so to clarify, the implemented rules are:&lt;br /&gt;
&lt;br /&gt;
If a player performs Emergency Braking, they must move their car forward as many spaces as possible. If they need to brake more than 3 spaces, they are required to use Brake WPs for the first 3 spaces, and each subsequent space may be paid for using Brake WP *or* Tire WPs.&lt;br /&gt;
&lt;br /&gt;
Braking is paid for *after* Overshooting, so any Tire WPs lost to Overshooting will not be available for Emergency Braking.&lt;br /&gt;
&lt;br /&gt;
==Qualifying ==&lt;br /&gt;
&lt;br /&gt;
Players do not roll the black starting die at the beginning of Qualifying: they just start in 1st gear.&lt;br /&gt;
&lt;br /&gt;
The original rules simply state that &amp;quot;WP are not taken into account&amp;quot; during qualifying. However, the effect of this is clarified in this adaptation:&lt;br /&gt;
&lt;br /&gt;
* You may not apply the brakes at all during Qualifying. If a roll forces you to overshoot a corner, it cannot be avoided.&lt;br /&gt;
* You may freely Gear down any number of gears during Qualifying, with no cost or penalty.&lt;br /&gt;
&lt;br /&gt;
In this version, Qualifying awards points as long as you complete your lap:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Ranking&#039;&#039;||&#039;&#039;&#039;No. of point&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||10&lt;br /&gt;
|-&lt;br /&gt;
|2||9&lt;br /&gt;
|-&lt;br /&gt;
|3||8&lt;br /&gt;
|-&lt;br /&gt;
|4||7&lt;br /&gt;
|-&lt;br /&gt;
|5||6&lt;br /&gt;
|-&lt;br /&gt;
|6||5&lt;br /&gt;
|-&lt;br /&gt;
|7||4&lt;br /&gt;
|-&lt;br /&gt;
|8||3&lt;br /&gt;
|-&lt;br /&gt;
|9||2&lt;br /&gt;
|-&lt;br /&gt;
|10||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Collision Checks ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, the active player checks for collisions only after all adjacent players have rolled. If an adjacent player fails their roll and is eliminated as a result, the active player will automatically fail their roll against that player.&lt;br /&gt;
&lt;br /&gt;
==Weather Rolls ==&lt;br /&gt;
&lt;br /&gt;
In the original rules, the Weather die is thrown immediately when a player rolls the maximum number in 5th or 6th gear. In this adaptation, this roll still occurs but it is deferred until the end of the round. This way, weather can only change between rounds and not in the middle of a player&#039;s turn. If multiple players roll the maximum number, the weather die will be rolled multiple times.&lt;br /&gt;
&lt;br /&gt;
==Changeable Weather ==&lt;br /&gt;
&lt;br /&gt;
The original rules have 4 steps for Changeable Weather (Good, Good - Changeable, Rain - Changeable, Rain).&lt;br /&gt;
&lt;br /&gt;
In this adaptation, there are 5 steps: Good, Good - Temporary, Changeable, Rain - Temporary, Rain.&lt;br /&gt;
&lt;br /&gt;
Changeable is only ever used at the start of a race, and by default is Good - with one exception: if it rained in qualifying then a changeable feature race will start Changeable but raining.&lt;br /&gt;
&lt;br /&gt;
Weather will never be changeable in qualifying: it will be Good unless Rain is rolled.&lt;br /&gt;
&lt;br /&gt;
==Spinning ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that if a car on 0 Tire WP overshoots a corner then it &amp;quot;will again spin round in a circle. If the car overshoots the corner by more than one space, it is out of the race&amp;quot;. In this adaptation, a car with 0 Tire WP is eliminated if it overshoots a corner by more than 1 WP. Hence, even a single space overshoot will eliminate a 0 Tire WP car on soft tires.&lt;br /&gt;
&lt;br /&gt;
Additionally, in this adaptation when you spin, your Tire WP are reset to 1 WP (instead of remaining at 0 WP).&lt;br /&gt;
&lt;br /&gt;
==Skidding on Corners in the Rain ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that cars will skid in the rain &amp;quot;provided at least one space of the move lies within the limits of a corner&amp;quot;. In this adaptation, skidding will only occur on any turn that counts towards a corner&#039;s completion. That means:&lt;br /&gt;
&lt;br /&gt;
* Driving through a corner that you have already completed will &#039;&#039;not&#039;&#039; cause you to skid&lt;br /&gt;
* If you are on the final space in a corner and still need to land in it 1 more turn, you will skid on your next move even though you are driving into a straight&lt;br /&gt;
&lt;br /&gt;
==Slipstreaming==&lt;br /&gt;
&lt;br /&gt;
If your car has soft tires and you slipstream at the end of a move where you did not use them (but could have), you may move one additional space during your slipstream.&lt;br /&gt;
&lt;br /&gt;
==Motor Damage Checks==&lt;br /&gt;
&lt;br /&gt;
Motor damage checks are always performed in round order.&lt;br /&gt;
&lt;br /&gt;
==Braking in the Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The original rules state that the rules for braking do not apply in the pit lane. In this adaptation, there is no braking cost for stopping immediately behind another car, or in your pit box. However, there is a brake cost for travelling any distance shorter than that.&lt;br /&gt;
&lt;br /&gt;
== Pit Boxes ==&lt;br /&gt;
&lt;br /&gt;
In Individual Driver games, a single pit box will be reserved for each driver instead of drivers being assigned a pit box color. The box will be indicated with the player&#039;s avatar.&lt;br /&gt;
&lt;br /&gt;
== Pit Lane ==&lt;br /&gt;
&lt;br /&gt;
The rules for gearing down DO apply in the pit lane.&lt;br /&gt;
&lt;br /&gt;
== Pit Stops ==&lt;br /&gt;
&lt;br /&gt;
The soft tire bonus may not be used when moving after a Quick Pit Stop.&lt;br /&gt;
&lt;br /&gt;
If Technical Pit Stops are enabled, players may always choose to take one (and thus finish their turn) even if they have no repair points or repairs to perform.&lt;br /&gt;
&lt;br /&gt;
==Construction of one&#039;s own car ==&lt;br /&gt;
&lt;br /&gt;
In this adaptation, if players have selected the option to Construct their own car then there are no limits to how many points they may assign to any given area.&lt;br /&gt;
&lt;br /&gt;
In games that have also selected the Technical Pit Stop rules, then instead of having a fixed 2 WPs available for Pit repairs, a player will have 22 WPs to use in Construction and can choose how many repair points to make available, with a maximum of 2.&lt;br /&gt;
&lt;br /&gt;
==Road Races ==&lt;br /&gt;
&lt;br /&gt;
The Road Race rules, including Drivers with special abilities, are not used.&lt;br /&gt;
&lt;br /&gt;
Where Road Race circuits are used, all non-standard rules are ignored.&lt;br /&gt;
&lt;br /&gt;
Nitro Fuel Injection is available as an option for all races.&lt;br /&gt;
&lt;br /&gt;
==Elimination ==&lt;br /&gt;
&lt;br /&gt;
When a player is eliminated, the outcome is slightly different from the published rules. &lt;br /&gt;
&lt;br /&gt;
*If the elimination was caused by the player overshooting corners or driving over a damage marker, the car is immediately removed from the board and &#039;&#039;&#039;no damage marker is placed&#039;&#039;&#039;&lt;br /&gt;
*If the elimination was caused by the player failing a motor damage test, the car is immediately removed from the board and a damage marker is added.&lt;br /&gt;
*If the player is eliminated by any other reason, a damage marker is added and the car remains on the board until the end of the round, when it is removed.&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Using_Typescript_and_Scss&amp;diff=26254</id>
		<title>Using Typescript and Scss</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Using_Typescript_and_Scss&amp;diff=26254"/>
		<updated>2025-08-20T04:54:49Z</updated>

		<summary type="html">&lt;p&gt;BaronFraser: /* Auto-upload generated files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will help you set up your project to use Typescript client file and Scss style files, and automatically build Javascript (in ES5) files and CSS files so your project stay compatible to BGA framework requirements.&lt;br /&gt;
You can use only TS or only SCSS part if you want, they are not linked.&lt;br /&gt;
&lt;br /&gt;
The following document is geared towards setting up a custom project where you will be in charge of typing all components that you want to use.&lt;br /&gt;
There is also untested 3rd party project that aims to automate some of the steps below, you can look at this instead [[BGA Type Safe Template]]. &lt;br /&gt;
&lt;br /&gt;
== Install and configure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install dev stack  ===&lt;br /&gt;
Install node/npm.  Here is an example to activate auto-build in Visual Studio Code, if you use another tool I strongly recommend to find an equivalent so you don&#039;t have to launch build manually after each modification.&lt;br /&gt;
&lt;br /&gt;
=== Configure package.json and tsconfig.json ===&lt;br /&gt;
&lt;br /&gt;
Create a file named &amp;lt;code&amp;gt;package.json&amp;lt;/code&amp;gt; on the root folder, not on the src folder.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;package.json&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;yourgamename&amp;quot;,&lt;br /&gt;
   &amp;quot;version&amp;quot;: &amp;quot;1.0.0&amp;quot;,&lt;br /&gt;
   &amp;quot;description&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;main&amp;quot;: &amp;quot;YourGameName.js&amp;quot;,&lt;br /&gt;
   &amp;quot;scripts&amp;quot;: {&lt;br /&gt;
     &amp;quot;build:ts&amp;quot;: &amp;quot;tsc&amp;quot;,&lt;br /&gt;
     &amp;quot;build:scss&amp;quot;: &amp;quot;sass --no-source-map src/yourgamename.scss yourgamename.css&amp;quot;,&lt;br /&gt;
     &amp;quot;watch:ts&amp;quot;: &amp;quot;tsc --watch&amp;quot;,&lt;br /&gt;
     &amp;quot;watch:scss&amp;quot;: &amp;quot;sass --watch src/yourgamename.scss yourgamename.css&amp;quot;,&lt;br /&gt;
     &amp;quot;watch&amp;quot;: &amp;quot;npm run watch:ts &amp;amp;&amp;amp; npm run watch:scss&amp;quot;,&lt;br /&gt;
     &amp;quot;build&amp;quot;: &amp;quot;npm run build:ts &amp;amp;&amp;amp; npm run build:scss&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;author&amp;quot;: &amp;quot;yourname&amp;quot;,&lt;br /&gt;
   &amp;quot;license&amp;quot;: &amp;quot;MIT&amp;quot;,&lt;br /&gt;
   &amp;quot;devDependencies&amp;quot;: {&lt;br /&gt;
     &amp;quot;sass&amp;quot;: &amp;quot;^1.32.6&amp;quot;,&lt;br /&gt;
     &amp;quot;typescript&amp;quot;: &amp;quot;^4.1.3&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note: if you not using scss - remove corresponding scripts and deps.&lt;br /&gt;
&lt;br /&gt;
When package.json is created, run &amp;lt;code&amp;gt;npm i&amp;lt;/code&amp;gt; on the root folder to install builders (will generate a node_modules folder).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: exclude node_modules/ subfolder from auto-sync to remote folder (whatever system you use for that).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Typescript compilation we also need to set up a &amp;lt;code&amp;gt;tsconfig.json&amp;lt;/code&amp;gt; on the root folder.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tsconfig.json&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;rootDir&amp;quot;: &amp;quot;.&amp;quot;, &lt;br /&gt;
     &amp;quot;compilerOptions&amp;quot;: {&lt;br /&gt;
       &amp;quot;target&amp;quot;: &amp;quot;es5&amp;quot;,&lt;br /&gt;
       &amp;quot;module&amp;quot;: &amp;quot;none&amp;quot;,&lt;br /&gt;
       &amp;quot;lib&amp;quot;: [&amp;quot;dom&amp;quot;, &amp;quot;esnext&amp;quot;],  &lt;br /&gt;
       &amp;quot;sourceMap&amp;quot;: false,&lt;br /&gt;
       &amp;quot;typeRoots&amp;quot;: [&amp;quot;src/types&amp;quot;, &amp;quot;./types&amp;quot;, &amp;quot;./node_modules/@types&amp;quot;],&lt;br /&gt;
       &amp;quot;outFile&amp;quot;: &amp;quot;YourGameName.js&amp;quot;&lt;br /&gt;
     },&lt;br /&gt;
     &amp;quot;files&amp;quot;: [&lt;br /&gt;
         &amp;quot;bga-framework.d.ts&amp;quot;,&lt;br /&gt;
         &amp;quot;src/yourgamename.d.ts&amp;quot;,&lt;br /&gt;
         &amp;quot;src/yourgamename.ts&amp;quot;,&lt;br /&gt;
         &amp;quot;src/define.ts&amp;quot;&lt;br /&gt;
     ]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note: it only works now with es5&lt;br /&gt;
&lt;br /&gt;
If you want to split your code onto multiple files, just add them in the file list (order is important for dependencies, new subpart should go on top of the list). No need to import classes or types from one file to another. In fact, you can&#039;t with this configuration. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create skeleton ==&lt;br /&gt;
When you create your game in BGA Studio, a JS and CSS file are generated. As we will overwrite them with autobuild. You can put the TS/SCSS files on a &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt; folder to separate them from built files, but that&#039;s not mandatory.&lt;br /&gt;
Note to myself: check if &#039;src&#039; dir will be svn version control, if not cannot really use it (even if duplicated in git).&lt;br /&gt;
&lt;br /&gt;
=== Typescript file skeleton ===&lt;br /&gt;
Typescript example here have been stripped down of all comments for clarity. &lt;br /&gt;
Your TS code can be splitted in multiple files, you can have a look at [https://studio.boardgamearena.com/projects castlecombo] code for inspiration.&lt;br /&gt;
To make this page concise, I removed comments and code samples. If it&#039;s your first game, well - don&#039;t do it if your first game - you won&#039;t be able to apply other code samples from docs, they all using dojo style and have to completely rewritten.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;src/yourgamename.d.ts&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interface YourGameNamePlayer extends Player {&lt;br /&gt;
    cards: Card[]; // any information you add on each result[&#039;players&#039;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
interface YourGameNameGamedatas extends Gamedatas&amp;lt;YourGameNamePlayer&amp;gt; {&lt;br /&gt;
    // Add here variables you set up in getAllDatas&lt;br /&gt;
    discardedCards: { [row: number]: Card[] };&lt;br /&gt;
    remainingCardsInDecks: { [row: number]: number };&lt;br /&gt;
    tableCards: { [row: number]: Card[] };&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Not: the Generic typing is optional.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;src/yourgamename.ts&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// @ts-ignore&lt;br /&gt;
GameGui = (function () { // this hack required so we fake extend GameGui&lt;br /&gt;
  function GameGui() {}&lt;br /&gt;
  return GameGui;&lt;br /&gt;
})();&lt;br /&gt;
&lt;br /&gt;
// Note: it does not really extend it in es6 way, you cannot call super you have to use dojo way &lt;br /&gt;
class YourGameName&amp;lt;YourGameNameGamedatas&amp;gt; extends GameGui { &lt;br /&gt;
     constructor() {}&lt;br /&gt;
     &lt;br /&gt;
     public setup(gamedatas: any) {&lt;br /&gt;
         this.setupNotifications();&lt;br /&gt;
     } &lt;br /&gt;
     public onEnteringState(stateName: string, args: any) {}&lt;br /&gt;
     public onLeavingState(stateName: string) {}&lt;br /&gt;
     public onUpdateActionButtons(stateName: string, args: any) {} &lt;br /&gt;
     public setupNotifications() {}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To plug the class with BGA framework, we&#039;ll also create another file:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;src/define.ts&#039;&#039;&#039;&lt;br /&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;&lt;br /&gt;
 ],&lt;br /&gt;
 function (dojo, declare) {&lt;br /&gt;
     return declare(&amp;quot;bgagame.yourgamename&amp;quot;, ebg.core.gamegui, new YourGameName());             &lt;br /&gt;
 });&lt;br /&gt;
Copy &amp;lt;code&amp;gt;bgagame.yourgamename&amp;lt;/code&amp;gt; from original JS to avoid name mistakes with letter case.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to sync the bga-framework.d.ts from your FTP folder regularly to get the last version.&lt;br /&gt;
&lt;br /&gt;
=== SCSS file ===&lt;br /&gt;
Nothing special here, just write classic SCSS (will be compiled by Dart scss) and name it &#039;&#039;&#039;src/yourgamename.scss&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  @use &#039;variables&#039; as v;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  /* the other files */&lt;br /&gt;
  @use &amp;quot;./Animations&amp;quot;;&lt;br /&gt;
  @use &amp;quot;./Board&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  #ebd-body {&lt;br /&gt;
    background-image: url(img/woodbg.jpg);&lt;br /&gt;
    background-repeat: repeat;&lt;br /&gt;
  }&lt;br /&gt;
  @each $key, $val in v.$colors-list {&lt;br /&gt;
    .fgcolor#{$key} {&lt;br /&gt;
      color: #{$val};&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your SCSS code can be (should be) splitted in multiple files, for example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;variables.scss&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$colors-list: (&lt;br /&gt;
  _6cd0f6: #6cd0f6, // blue&lt;br /&gt;
  _ef58a2: #ef58a2, // pink&lt;br /&gt;
  _ffcc02: #ffcc02, // yellow&lt;br /&gt;
  _a0d28c: #a0d28c // green&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Auto build and auto upload ==&lt;br /&gt;
&lt;br /&gt;
=== Auto build JS and CSS files ===&lt;br /&gt;
&lt;br /&gt;
To build and watch (i.e. re-build continuously changed files) run in terminal:&lt;br /&gt;
  npm run watch&lt;br /&gt;
&lt;br /&gt;
Alternately you can make vscode to do it for you by installing Run on Save extension, see details in [[Setting_up_BGA_Development_environment_using_VSCode]]&lt;br /&gt;
&lt;br /&gt;
Note: to build without watch&lt;br /&gt;
  npm run build&lt;br /&gt;
&lt;br /&gt;
=== Auto-upload generated files ===&lt;br /&gt;
You can setup standard file sync or use vscode SFTP extension, see details in [[Setting_up_BGA_Development_environment_using_VSCode]]&lt;br /&gt;
&lt;br /&gt;
Make sure that your sftp.json file has a &amp;quot;watcher&amp;quot; section to detect and upload changes made outside of the VSCode IDE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;quot;watcher&amp;quot;: {&lt;br /&gt;
        &amp;quot;files&amp;quot;: &amp;quot;**/*.{js,css}&amp;quot;,&lt;br /&gt;
        &amp;quot;autoUpload&amp;quot;: true,&lt;br /&gt;
        &amp;quot;autoDelete&amp;quot;: true&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Exclusions from auto-upload ===&lt;br /&gt;
Make sure &amp;lt;code&amp;gt;.vscode&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_modules&amp;lt;/code&amp;gt; are in &amp;lt;code&amp;gt;.gitignore&amp;lt;/code&amp;gt; if you commit your project somewhere.&lt;br /&gt;
&lt;br /&gt;
=== Code completion ===&lt;br /&gt;
To have a code completion for framework classes, dojo, stock, etc, you&#039;ll need to make sure bga-framework.d.ts file is added to your tsconfig.&lt;br /&gt;
&lt;br /&gt;
== Using the new libs ==&lt;br /&gt;
To use the new front libs (bga-autofit, bga-score-sheet, ...), you will need to add a little trick as the game class is not declared inside the define function.&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;
     getLibUrl(&#039;bga-score-sheet&#039;, &#039;1.0.0&#039;),&lt;br /&gt;
 ],&lt;br /&gt;
 function (dojo, declare, gamegui, counter, BgaScoreSheet) {&lt;br /&gt;
     (window as any).BgaScoreSheet = BgaScoreSheet; // add this to make the variable accessible from anywhere&lt;br /&gt;
     return declare(&amp;quot;bgagame.castlecombo&amp;quot;, ebg.core.gamegui, new CastleCombo());&lt;br /&gt;
 });&lt;br /&gt;
When you will call &amp;lt;code&amp;gt;this.scoreSheet = new BgaScoreSheet.ScoreSheet(...)&amp;lt;/code&amp;gt;, as it will be inside the Game class setup, the added line will be already executed and &amp;lt;code&amp;gt;BgaScoreSheet&amp;lt;/code&amp;gt; will be available globally.&lt;br /&gt;
&lt;br /&gt;
To add the lib typing to your project, follow the [[BgaScoreSheet#Using%20with%20TypeScript|Using with TypeScript]] section of the corresponding lib.&lt;br /&gt;
&lt;br /&gt;
== Referenced Projects ==&lt;br /&gt;
&lt;br /&gt;
* https://github.com/thoun/bga-ts-example&lt;br /&gt;
* https://github.com/elaskavaia/bga-dojoless&lt;br /&gt;
* https://github.com/NevinAF/bga-ts-template&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>BaronFraser</name></author>
	</entry>
</feed>