summaryrefslogtreecommitdiffstats
path: root/include/game.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-05-10 22:30:52 -0700
committerArun Persaud <arun@nubati.net>2008-05-10 22:30:52 -0700
commit46319a55bbfaddcf07fed1c19120563807d9670d (patch)
treee5faead0ff1aaaa421515ba03c6e0fe598b7d7c9 /include/game.php
parentd3163cc4ad76ea5608cdef1ec53bfa644485315a (diff)
downloade-DoKo-46319a55bbfaddcf07fed1c19120563807d9670d.tar.gz
e-DoKo-46319a55bbfaddcf07fed1c19120563807d9670d.tar.bz2
e-DoKo-46319a55bbfaddcf07fed1c19120563807d9670d.zip
NEW FEATURE: display if someone is sick during the init phase
Now players can see if someone in front of them said they were sick or not. This way people can decide to wait until people in front of them finished the init phase to see what the other playes said... it's made so that you can also see if people behind you already have decided or not, but the player won't see the result in that case... Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include/game.php')
-rw-r--r--include/game.php25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/game.php b/include/game.php
index 35b94cd..d7e7b95 100644
--- a/include/game.php
+++ b/include/game.php
@@ -186,7 +186,30 @@ switch($mystatus)
/* here we ask the player if he is sick */
$mycards = DB_get_hand($me);
sort($mycards);
+
+ /* output sickness of other playes, in case the already selected and are sitting in front of the current player */
+ echo "\n<ul class=\"tricks\">\n";
+ echo " <li class=\"nohighlight\"> Game ".DB_format_gameid($gameid).": </li>\n";
+ echo " <li onclick=\"hl('0');\" class=\"current\"><a href=\"#\">Pre</a>\n".
+ " <div class=\"trick\" id=\"trick0\">\n";
+ for($pos=1;$pos<5;$pos++)
+ {
+ $usersick = DB_get_sickness_by_pos_and_gameid($pos,$gameid);
+ $userid = DB_get_userid('gameid-position',$gameid,$pos);
+ $userstatus = DB_get_hand_status_by_userid_and_gameid($userid,$gameid);
+
+ if($userstatus=='start' || $userstatus=='init')
+ echo " <div class=\"vorbehalt".($pos-1)."\"> still needs to decide </div>\n"; /* show this to everyone */
+ else
+ if($usersick!=NULL && $pos<=$mypos ) /* only show this for people sitting before the player */
+ echo " <div class=\"vorbehalt".($pos-1)."\"> sick </div>\n";
+ else if($usersick==NULL && $pos<=$mypos)
+ echo " <div class=\"vorbehalt".($pos-1)."\"> healthy </div>\n";
+ }
+ echo " </div>\n </li>\n</ul>\n"; /* end div trick, end li trick , end tricks*/
+ /* end displaying sickness */
+
if(!myisset("solo","wedding","poverty","nines") )
{
output_check_for_sickness($me,$mycards);
@@ -271,7 +294,7 @@ switch($mystatus)
echo "</p>\n";
/* move on to the next stage*/
- DB_set_hand_status_by_hash($me,'poverty');
+ DB_set_hand_status_by_hash($me,'check');
};
};