From 193099c75801f128beb8f3bb9541a3cb70f24002 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 24 Jan 2009 17:30:53 -0800 Subject: NEW FEATURE: show exchanged cards in poverty pre-game phase now you can see the cards that are exchanged during the pre-game setup. Also added a "trump back" message in case trump has been given back. --- include/db.php | 3 ++ include/game.php | 109 +++++++++------------------------------------ include/output.php | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+), 88 deletions(-) diff --git a/include/db.php b/include/db.php index 6e1af93..27d639e 100644 --- a/include/db.php +++ b/include/db.php @@ -852,6 +852,9 @@ function DB_set_recovery_password($user,$newpw) function DB_get_card_name($card) { + if($card==0) + return 'backside'; + $r = DB_query_array("SELECT strength,suite FROM Card WHERE id='$card'"); if($r) diff --git a/include/game.php b/include/game.php index b08f36b..377d0aa 100644 --- a/include/game.php +++ b/include/game.php @@ -782,9 +782,6 @@ switch($mystatus) * it is easier to check B) first */ - /* output pre game in case user reloads */ - - set_gametype($gametype); /* this sets the $CARDS variable */ $myparty = DB_get_party_by_hash($me); @@ -810,6 +807,25 @@ switch($mystatus) $mycards = DB_get_hand($me); $mycards = mysort($mycards,$gametype); + /* output pre-game trick in case user reloads, + * only needs to be done when a team has been formed */ + if($myparty=='re' || $myparty=='contra') + { + echo "\n