<?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=Mike+Crosley</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=Mike+Crosley"/>
	<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/Special:Contributions/Mike_Crosley"/>
	<updated>2026-10-28T17:46:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpturingmachine&amp;diff=19516</id>
		<title>Gamehelpturingmachine</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpturingmachine&amp;diff=19516"/>
		<updated>2024-01-11T15:01:03Z</updated>

		<summary type="html">&lt;p&gt;Mike Crosley: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
The objective of the game is to be the first player to correctly solve the code, and with the fewest questions asked, or be the only player not eliminated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Turn===&lt;br /&gt;
&lt;br /&gt;
A turn consists of four or five stages, with each stage carried out simultaneously/  The stages are:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Compose&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Question&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Deduce&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;End&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Verification&#039;&#039;&#039; (Not in all rounds)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Compose===&lt;br /&gt;
&lt;br /&gt;
In this phase, each player decides on a number for each colour/shape. A number may be used for multiple shapes (e.g. three triangles three squares, two circles).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Question===&lt;br /&gt;
&lt;br /&gt;
Players pick up to three of the &#039;&#039;&#039;Verifiers&#039;&#039;&#039; and see how their &#039;&#039;&#039;Proposal&#039;&#039;&#039; meets their criteria.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Two Important Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;Verifiers&#039;&#039;&#039; do NOT correspond to colors and/or shapes.  For example:&lt;br /&gt;
## &#039;&#039;Two &#039;&#039;&#039;Verifiers&#039;&#039;&#039; may contain criteria towards the same &#039;&#039;&#039;colour/shape&#039;&#039;&#039;&#039;&#039;, &#039;&#039;or&#039;&#039; &lt;br /&gt;
## &#039;&#039;A single &#039;&#039;&#039;Verifier&#039;&#039;&#039; may ask if &#039;&#039;&#039;Yellow/Square&#039;&#039;&#039; is &#039;&#039;&#039;Even&#039;&#039;&#039;,&#039;&#039;&lt;br /&gt;
## &#039;&#039;Another &#039;&#039;&#039;Verifier&#039;&#039;&#039; may ask if &#039;&#039;&#039;Yellow/Square&#039;&#039;&#039; is &#039;&#039;&#039;greater than&#039;&#039;&#039; &#039;&#039;&#039;three&#039;&#039;&#039;&#039;&#039;)&lt;br /&gt;
# The &#039;&#039;&#039;Correct&#039;&#039;&#039; and &#039;&#039;&#039;Incorrect&#039;&#039;&#039; answer received does NOT mean the number is right or wrong, but whether or not your proposal passed for that the &#039;&#039;&#039;Verifier.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Deduce===&lt;br /&gt;
&lt;br /&gt;
After completing the &#039;&#039;&#039;Verification&#039;&#039;&#039; step, take some time to figure out (but not declare) if you have found the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===End===&lt;br /&gt;
&lt;br /&gt;
At the end, count to three, then reveal either a &#039;&#039;&#039;thumbs up&#039;&#039;&#039; (if think you know the code) or a &#039;&#039;&#039;thumbs down&#039;&#039;&#039; (if you are not sure of the code)&lt;br /&gt;
&lt;br /&gt;
If everyone pointed down, return to Compose Phase&lt;br /&gt;
&lt;br /&gt;
If at least one person pointed up, move to the Verification Phase&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Verification===&lt;br /&gt;
&lt;br /&gt;
The correct code will pass the test of ALL verifiers&lt;br /&gt;
&lt;br /&gt;
If one person is correct, they win!&lt;br /&gt;
&lt;br /&gt;
If more than one person is correct, the person who asked the fewest questions wins!&lt;br /&gt;
&lt;br /&gt;
If no one is correct, they are eliminated!&lt;br /&gt;
&lt;br /&gt;
If the second to last person is eliminated, the final player, even though they did not participate in Verification, will win!&lt;br /&gt;
&lt;br /&gt;
=== Mode ===&lt;br /&gt;
&lt;br /&gt;
==== Classic ====&lt;br /&gt;
1 card for each verifier. &lt;br /&gt;
&lt;br /&gt;
==== Extreme ====&lt;br /&gt;
2 cards for each verifier but only one valid criterion. &lt;br /&gt;
&lt;br /&gt;
==== Nightmare ====&lt;br /&gt;
You do not know which verifier is associated with which verification card.&lt;/div&gt;</summary>
		<author><name>Mike Crosley</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpturingmachine&amp;diff=19515</id>
		<title>Gamehelpturingmachine</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpturingmachine&amp;diff=19515"/>
		<updated>2024-01-11T13:11:55Z</updated>

		<summary type="html">&lt;p&gt;Mike Crosley: A number of grammatical corrections and a small amount of reformatting.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
The aim is to solve the code correctly, first, and with the fewest questions asked (Or be the only player not eliminated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Turn===&lt;br /&gt;
&lt;br /&gt;
A turn consists of four or five stages, with each stage carried out simultaneously/  The stages are:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Compose&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Question&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Deduce&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;End&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;Verification&#039;&#039;&#039; (Not in all rounds)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Compose===&lt;br /&gt;
&lt;br /&gt;
In this phase, each player decides on a number for each colour/shape. A number may be used for multiple shapes (e.g. three triangles three squares, two circles).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Question===&lt;br /&gt;
&lt;br /&gt;
Players pick up to three of the &#039;&#039;&#039;Verifiers&#039;&#039;&#039; and sees how your proposal meets their criteria.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Two Important Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;Verifiers&#039;&#039;&#039; do NOT each correspond to a colour/shape (&#039;&#039;i.e. two &#039;&#039;&#039;Verifiers&#039;&#039;&#039; may contain criteria towards the same &#039;&#039;&#039;colour/shape&#039;&#039;&#039;&#039;&#039;, &#039;&#039;or a single &#039;&#039;&#039;Verifier&#039;&#039;&#039; may ask if &#039;&#039;&#039;Yellow/Square&#039;&#039;&#039; is &#039;&#039;&#039;Even&#039;&#039;&#039; and another &#039;&#039;&#039;Verifier&#039;&#039;&#039; may ask if &#039;&#039;&#039;Yellow/Square&#039;&#039;&#039; is greater than the &#039;&#039;&#039;number three&#039;&#039;&#039;&#039;&#039;)&lt;br /&gt;
# The &#039;&#039;&#039;Correct&#039;&#039;&#039; and &#039;&#039;&#039;Incorrect&#039;&#039;&#039; answer you receive does NOT mean your number is right or wrong, but rather that in relation to the &#039;&#039;&#039;Verifier&#039;&#039;&#039;. whether or not your proposal passed that &#039;&#039;&#039;Verifiers&#039;&#039;&#039; test&lt;br /&gt;
&lt;br /&gt;
===Deduce===&lt;br /&gt;
&lt;br /&gt;
After completing verification, take some time to figure out (but not declare) if you have found the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===End===&lt;br /&gt;
&lt;br /&gt;
At the end, count to three, then reveal either a thumbs up (think you know the code) or a thumbs down (not sure of the code just yet)&lt;br /&gt;
&lt;br /&gt;
If everyone pointed down, return to Compose Phase&lt;br /&gt;
&lt;br /&gt;
If at least one person pointed up, move to the Verification Phase&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Verification===&lt;br /&gt;
&lt;br /&gt;
The correct code will pass the test of ALL verifiers&lt;br /&gt;
&lt;br /&gt;
If one person is correct, they win!&lt;br /&gt;
&lt;br /&gt;
If more than one person is correct, the person who asked the fewest questions wins!&lt;br /&gt;
&lt;br /&gt;
If no one is correct, they are eliminated!&lt;br /&gt;
&lt;br /&gt;
If the second to last person is eliminated, the final player, even though they did not participate in Verification, will win!&lt;br /&gt;
&lt;br /&gt;
=== Mode ===&lt;br /&gt;
&lt;br /&gt;
==== Classic ====&lt;br /&gt;
1 card for each verifier. &lt;br /&gt;
&lt;br /&gt;
==== Extreme ====&lt;br /&gt;
2 cards for each verifier but only one valid criterion. &lt;br /&gt;
&lt;br /&gt;
==== Nightmare ====&lt;br /&gt;
You do not know which verifier is associated with which verification card.&lt;/div&gt;</summary>
		<author><name>Mike Crosley</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Game_database_model:_dbmodel.sql&amp;diff=14610</id>
		<title>Game database model: dbmodel.sql</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Game_database_model:_dbmodel.sql&amp;diff=14610"/>
		<updated>2022-09-11T09:45:13Z</updated>

		<summary type="html">&lt;p&gt;Mike Crosley: /* Default tables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
In this file you specify the database schema of your game.&lt;br /&gt;
&lt;br /&gt;
This file contains SQL queries that will be executed during the creation of your game table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; you can&#039;t change the database schema during the game.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Create your schema ==&lt;br /&gt;
&lt;br /&gt;
To build this file, we recommend you to build the tables you need with the PhpMyAdmin tool (see BGA user guide), and then to export them and to copy/paste the content inside this file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; you must not use for a column the same name as for the table, as the framework replay function relies on regexp substitution to save/restore a previous state in a clone table with another name.&lt;br /&gt;
&lt;br /&gt;
Example: Deck component, see [[Deck]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `card` (&lt;br /&gt;
  `card_id` int(10) unsigned NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `card_type` varchar(16) NOT NULL,&lt;br /&gt;
  `card_type_arg` int(11) NOT NULL,&lt;br /&gt;
  `card_location` varchar(16) NOT NULL,&lt;br /&gt;
  `card_location_arg` int(11) NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`card_id`)&lt;br /&gt;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Euro Game. See details on database design for euro game at [[BGA_Studio_Cookbook#Database_for_The_euro_game]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `token` (&lt;br /&gt;
  `token_key` varchar(32) NOT NULL,&lt;br /&gt;
  `token_location` varchar(32) NOT NULL,&lt;br /&gt;
  `token_state` int(10),&lt;br /&gt;
  PRIMARY KEY (`token_key`)&lt;br /&gt;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rules you should follow:&lt;br /&gt;
&lt;br /&gt;
* Do not overcomplicate, you are dealing with games with 50-500 pieces!&lt;br /&gt;
** If you have 5 tables for a card game with 30 cards - it is overkill&lt;br /&gt;
* Database should only be storing dynamic data, all static data should be stored in material.php.inc&lt;br /&gt;
** Example: if you have cards that have power, color and special abilities. In the database you only need to store the card type, all the other properties should not be there. Only exception being if it changes during the game.&lt;br /&gt;
* Columns should be permanent, independent of game data, i.e. location, type, position, row, etc&lt;br /&gt;
** Example: do not create columns like Country1, Country2, Country3, ...&lt;br /&gt;
* Do not store translatable string in the database, use integer number of &amp;quot;ident&amp;quot; to access properties&lt;br /&gt;
** I.e. card type should be &amp;quot;22&amp;quot; or &amp;quot;bob_cat&amp;quot;, instead of &amp;quot;Bob&#039;s cat&amp;quot;&lt;br /&gt;
* Create separate module in php to handle all database queries, do a lot of type checking to prevent SQL injections&lt;br /&gt;
&lt;br /&gt;
Example of method handling database query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Set token state&lt;br /&gt;
    function setTokenState($token_key, $state) {&lt;br /&gt;
        self::checkState($state); // ensure state is number&lt;br /&gt;
        self::checkKey($token_key); // ensure key is alphanum&lt;br /&gt;
        $sql = &amp;quot;UPDATE &amp;quot; . $this-&amp;gt;table;&lt;br /&gt;
        $sql .= &amp;quot; SET token_state=&#039;$state&#039;&amp;quot;;&lt;br /&gt;
        $sql .= &amp;quot; WHERE token_key=&#039;$token_key&#039;&amp;quot;; // don&#039;t need to escape anymore since we checked key before&lt;br /&gt;
        self::DbQuery($sql);&lt;br /&gt;
        return $state;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Default tables ==&lt;br /&gt;
&lt;br /&gt;
By default, BGA creates four tables for your game: &#039;&#039;&#039;global&#039;&#039;&#039;, &#039;&#039;&#039;stats&#039;&#039;&#039;, &#039;&#039;&#039;gamelog&#039;&#039;&#039;, and &#039;&#039;&#039;player&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;&#039;MUST NOT MODIFY&#039;&#039;&#039; the schemas of the &#039;&#039;&#039;global&#039;&#039;&#039;, &#039;&#039;&#039;stats&#039;&#039;&#039; or &#039;&#039;&#039;gamelog&#039;&#039;&#039; tables (and you must not access them directly with SQL queries in your PHP code).&lt;br /&gt;
&lt;br /&gt;
=== The &#039;&#039;&#039;player&#039;&#039;&#039; table ===&lt;br /&gt;
&lt;br /&gt;
You may add columns to the &#039;&#039;&#039;player&#039;&#039;&#039; table. This is very practical to add simple values associated with players. &#039;&#039;&#039;NB:&#039;&#039;&#039; you must not alter existing columns created by the framework.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALTER TABLE `player` ADD `player_reserve_size` SMALLINT UNSIGNED NOT NULL DEFAULT &#039;7&#039;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The commonly used columns of default &amp;quot;player&amp;quot; table are:&lt;br /&gt;
* &amp;lt;strong&amp;gt;player_no&amp;lt;/strong&amp;gt;: the index of player in natural playing order (starting with 1)&lt;br /&gt;
* &amp;lt;strong&amp;gt;player_id&amp;lt;/strong&amp;gt; (int)&lt;br /&gt;
* &amp;lt;strong&amp;gt;player_name&amp;lt;/strong&amp;gt;: (note: it is better to access this data with getActivePlayerName() or loadPlayersBasicInfos() methods)&lt;br /&gt;
* &amp;lt;strong&amp;gt;player_score&amp;lt;/strong&amp;gt;: the current score of the player (displayed in the player panel). You must update this field to update player&#039;s scores.&lt;br /&gt;
* &amp;lt;strong&amp;gt;player_score_aux&amp;lt;/strong&amp;gt;: the secondary score, used as a tie breaker. You must update this field according to tie breaking rules of the game (see also: [[Main_game_logic:_yourgamename.game.php#Manage_player_scores_and_Tie_breaker|Manage_player_scores_and_Tie_breaker]])&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;player_table_order&amp;lt;/strong&amp;gt;: gives an indication of the rank of the player by order of arrival in the lobby (starting with 1). It is not the same as player_no (which is the player order &amp;lt;u&amp;gt;within&amp;lt;/u&amp;gt; the game). player_table_order is useful for setting custom teams if desired in a game option (for instance, 1st-2nd vs 3rd-4th).&amp;lt;br/&amp;gt;&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; player_table_order &#039;&#039;only exists during game initialization&#039;&#039; (in the &#039;&#039;&#039;setupNewGame&#039;&#039;&#039; function). It is not added as a column in the &#039;&#039;&#039;players&#039;&#039;&#039; Db table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;&amp;lt;u&amp;gt;CAUTION:&amp;lt;/u&amp;gt;&amp;lt;/strong&amp;gt; &#039;&#039;&#039;player_table_order&#039;&#039;&#039; is not guaranteed to be equal to the rank of the player in the table. For example, in a four-player game, if the table was full but the third player leaves before the game starts, the fourth player becomes the third on this table &amp;lt;u&amp;gt;but&amp;lt;/u&amp;gt; their player_table_no is still equal to four! If another player then joins, their player_table_no will then be 5...&amp;lt;br /&amp;gt;Thus, it is essential to normalize these values first in the game setup if you wish to use them to prevent bugs at game launch. For example, if the set of player_table_order are &amp;lt;player A&amp;gt;: 3, &amp;lt;player B&amp;gt;: 2, &amp;lt;player C&amp;gt;: 5, &amp;lt;player D&amp;gt;: 7, you see that you can&#039;t read that values as ranks directly, but you can still deduce that &amp;lt;player B&amp;gt; was first on the table, then &amp;lt;player A&amp;gt; then &amp;lt;player C&amp;gt; then &amp;lt;player D&amp;gt;&amp;amp;nbsp;&amp;amp;#128521;&lt;br /&gt;
&lt;br /&gt;
See [https://en.doc.boardgamearena.com/BGA_Studio_Cookbook#Assigning_Player_Order Assigning Player Order] in the &#039;&#039;&#039;BGA Studio Cookbook&#039;&#039;&#039; for an example.&lt;br /&gt;
&lt;br /&gt;
== CREATE TABLES ==&lt;br /&gt;
You can create tables, using engine InnoDB.&lt;br /&gt;
See examples above on how to create tables.&lt;br /&gt;
Pay attention to the following:&lt;br /&gt;
* Always add IF NOT EXISTS&lt;br /&gt;
* Always set ENGINE=InnoDB DEFAULT CHARSET=utf8&lt;br /&gt;
* Define primary keys&lt;br /&gt;
* If you create NOT NULL fields after game in production, make sure you took care of database migration&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: if you put comments, you cannot do it in the same line as code.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
`activated` BOOL NOT NULL DEFAULT 1, --  activated or not&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will also comment out whole column `activated` BOOL, and that code will not be executed.&lt;br /&gt;
&lt;br /&gt;
== PHP ==&lt;br /&gt;
Database initialization should be in function setupNewGame() in &#039;gamename.game.php&#039;.&lt;br /&gt;
&lt;br /&gt;
Database schema migration should be in function upgradeTableDb(), see below.&lt;br /&gt;
&lt;br /&gt;
Warning: all CREATE/ALTER tables and view should be in dbmodel.sql. Do not call these queries from php to avoid implicit commits https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html&lt;br /&gt;
which will cause issues. The only time you can do such queries from php is in the upgradeTableDb method.&lt;br /&gt;
&lt;br /&gt;
== Errors Log ==&lt;br /&gt;
To trace Database creation check the logs that you can access in /admin/studio.&lt;br /&gt;
&lt;br /&gt;
== Post-release database modification ==&lt;br /&gt;
If you want to modify your database schema after the first release of your game in production, you should implement upgradeTableDb method, see [[Post-release phase#Updating the database schema|Updating the database schema after release]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>Mike Crosley</name></author>
	</entry>
</feed>