summaryrefslogtreecommitdiffstats
path: root/include/game.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2010-02-02 20:19:43 -0800
committerArun Persaud <arun@nubati.net>2010-02-02 20:19:43 -0800
commite2d7a3291f85403b4faf6f8be7e30caeefb0c1a3 (patch)
treec3ad9d93845facafb88651d33c7e6a4083e4696f /include/game.php
parentba7d92fad7b3ac0cfe4a6733339aa474991315a2 (diff)
downloade-DoKo-e2d7a3291f85403b4faf6f8be7e30caeefb0c1a3.tar.gz
e-DoKo-e2d7a3291f85403b4faf6f8be7e30caeefb0c1a3.tar.bz2
e-DoKo-e2d7a3291f85403b4faf6f8be7e30caeefb0c1a3.zip
highlight the call if this is the last round where you can make this call
also added some more comments
Diffstat (limited to 'include/game.php')
-rw-r--r--include/game.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/game.php b/include/game.php
index 30abe7d..de19cab 100644
--- a/include/game.php
+++ b/include/game.php
@@ -1420,7 +1420,10 @@ switch($mystatus)
$play = DB_get_cards_by_trick($trickid);
$winner = get_winner($play,$gametype); /* returns the position */
- /* check if someone caught a fox */
+ /*
+ * check if someone caught a fox
+ *******************************/
+
/* first check if we should account for solos at all,
* since it doesn't make sense in some games
*/
@@ -1453,7 +1456,10 @@ switch($mystatus)
}
}
- /* check for karlchen (jack of clubs in the last trick)*/
+ /*
+ * check for karlchen (jack of clubs in the last trick)
+ ******************************************************/
+
/* same as for foxes, karlchen doesn't always make sense
* check what kind of game it is and set karlchen accordingly */
$ok = 1; /* default: karlchen should be accounted for */
@@ -1478,7 +1484,10 @@ switch($mystatus)
DB_query("INSERT INTO Score".
" VALUES( NULL,NULL,$gameid,'$party1',$uid1,NULL,'karlchen')");
}
- /* check for doppelopf (>40 points)*/
+ /*
+ * check for doppelopf (>40 points)
+ ***********************************/
+
$points = 0;
foreach($play as $played)
{
@@ -1493,6 +1502,10 @@ switch($mystatus)
" VALUES( NULL,NULL,$gameid,'$party1',$uid1,NULL,'doko')");
}
+ /*
+ * set winner (for this trick)
+ */
+
if($winner>0)
DB_query("UPDATE Trick SET winner='$winner' WHERE id='$trickid'");
else