2 "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
3 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
7 <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
8 <link rel="stylesheet" type="text/css" href="standard.css" />
11 <h1> Welcome to E-Doko </h1>
17 $host = "http://doko.nubati.net/index.php";
18 $wiki = "http://wiki.nubati.net/index.php?title=EmailDoko";
27 function mymail($To,$Subject,$message)
33 $message = str_replace("\n","<br />",$message);
34 echo "<br />To: $To<br />Subject: $Subject <br />$message<br />\n";
37 mail($To,$Subject,$message);
41 function parse_status()
43 global $game,$history,$player,$hash,$lines;
46 $game["solo-who"] = -1;
47 $game["solo-what"] = "todo";
48 $game["wedding"] = -1;
49 $game["poverty"] = "";
51 $game["startplayer"] = 0;
55 $tmp = explode( ":",$lines[$i]);
57 $player[$tmp[0]]["number"] = $i;
58 $player[$tmp[0]]["hash"] = $tmp[0];
59 $player[$tmp[0]]["name"] = $tmp[1];
60 $player[$tmp[0]]["email"] = $tmp[2];
61 $player[$tmp[0]]["option"] = $tmp[3];
62 $player[$tmp[0]]["points"] = $tmp[4];
63 $player[$tmp[0]]["cards"] = $tmp[5];
64 if(ereg("s",$tmp[3])) $game["init"]++; /* how many players are ready? */
65 if(ereg("P",$tmp[3])) $game["poverty"].= $i; /* players with poverty, could be two, so use a string */
66 if(ereg("N",$tmp[3])) $game["nines"] = $i; /* the player with too many nines, only one possible */
67 if(ereg("W",$tmp[3])) $game["wedding"] = $i; /* the player with the wedding, also only one possible */
68 if(ereg("([OSQJCAH])",$tmp[3],$match) && ($game["solo-who"]<0) )
70 $game["solo-who"] = $i;
71 $game["startplayer"] = $i;
75 $game["solo-what"] = "No Trump";
77 $game["solo-what"] = "Trump";
79 $game["solo-what"] = "Queen";
81 $game["solo-what"] = "Jack";
83 $game["solo-what"] = "Club";
85 $game["solo-what"] = "Spade";
87 $game["solo-what"] = "Heart";
92 /* save the game history */
93 for($i=4;$i<sizeof($lines);$i++)
95 if(!ereg("^[[:space:]]*$",trim($lines[$i])))
97 $history[] = $lines[$i];
101 if(sizeof($history)==0 || (sizeof($history)==1 && strlen($history[0])==3 ))
102 $history[0] = $game["startplayer"].":";
107 function count_nines($cards)
109 $card = explode(";",$cards);
115 if($c == "25" || $c == "26") $nines++;
116 else if($c == "33" || $c == "34") $nines++;
117 else if($c == "41" || $c == "42") $nines++;
118 else if($c == "47" || $c == "48") $nines++;
124 function check_wedding($cards)
126 $card = explode(";",$cards);
130 if( in_array("3",$card) && in_array("2",$card) )
136 function count_trump($cards)
138 $card = explode(";",$cards);
142 /* count each trump */
145 if( (int)($c) <27) $trump++;
148 /* subtract one, in case player has both foxes */
149 if( in_array("19",$card) && in_array("20",$card) )
157 function card_to_name($card)
163 return "ten of hearts";
166 return "queen of clubs";
169 return "queen of spades";
172 return "queen of hearts";
175 return "queen of diamonds";
178 return "jack of clubs";
181 return "jack of spades";
184 return "jack of hearts";
187 return "jack of diamonds";
190 return "ace of diamonds";
193 return "ten of diamonds";
196 return "king of diamonds";
199 return "nine of diamonds";;
202 return "ace of clubs";
205 return "ten of clubs";
208 return "king of clubs";
211 return "nine of clubs";
214 return "ace of spades";
217 return "ten of spades";
220 return "king of spades";
223 return "nine of spades";
226 return "ace of hearts";
229 return "king of hearts";
232 return "nine of hearts";
234 return "something went wrong, please contact the admin";
238 function card_value($card)
309 echo "something went wrong, please contact the admin <br>";
314 function display_card($card)
316 if( $card/2 - (int)($card/2) == 0.5)
317 echo "<img src=\"cards/".$card.".png\" alt=\"".card_to_name($card)."\" />\n";
319 echo "<img src=\"cards/".($card-1).".png\" alt=\"".card_to_name($card-1)."\" />\n";
323 function display_link_card($card,$me)
325 if( $card/2 - (int)($card/2) == 0.5)
326 echo "<a href=\"index.php?me=$me&card=$card\"><img src=\"cards/".$card.".png\" alt=\"".card_to_name($card)."\" /></a>\n";
328 echo "<a href=\"index.php?me=$me&card=$card\"><img src=\"cards/".($card-1).".png\" alt=\"".card_to_name($card-1)."\" /></a>\n";
332 function save_status()
334 global $player,$game,$hash,$history;
336 $output = fopen("status.txt","w");
339 foreach($hash as $key)
341 /* sorting the options, not sure why I do that actually */
343 if( ereg("i",$player[$key]["option"]) )
345 if( ereg("s",$player[$key]["option"]) )
347 if( ereg("t",$player[$key]["option"]) )
349 if( ereg("c",$player[$key]["option"]) )
351 if( ereg("N",$player[$key]["option"]) )
353 if( ereg("W",$player[$key]["option"]) )
355 if( ereg("P",$player[$key]["option"]) )
357 if( ereg("O",$player[$key]["option"]) )
359 if( ereg("S",$player[$key]["option"]) )
361 if( ereg("Q",$player[$key]["option"]) )
363 if( ereg("J",$player[$key]["option"]) )
365 if( ereg("C",$player[$key]["option"]) )
367 if( ereg("A",$player[$key]["option"]) )
369 if( ereg("H",$player[$key]["option"]) )
371 $player[$key]["option"]=$tmp;
373 /* saving the player stats */
374 fwrite($output,"".$player[$key]["hash"].":" );
375 fwrite($output,"".$player[$key]["name"].":" );
376 fwrite($output,"".$player[$key]["email"].":" );
377 fwrite($output,"".$player[$key]["option"].":" );
378 fwrite($output,"".$player[$key]["points"].":" );
379 fwrite($output,"".$player[$key]["cards"] .":");
380 fwrite($output,"\n");
382 fwrite($output,"\n");
383 foreach($history as $line)
384 fwrite($output,$line);
386 fwrite($output,"\n");
390 echo "can't open file for writing, please inform the admin.";
395 echo "<p>If you find bugs, please list them in the <a href=\"".$wiki."\">wiki</a>.</p>\n";
397 echo "<p> Names that are underlined have a comment, which you can access by hovering over the name with your mouse ;)</p>\n";
401 /* check for status file and read it, if possible */
403 if(file_exists("status.txt"))
404 $lines = file("status.txt");
408 /* check if we want to start a new game */
409 if( isset($_REQUEST["PlayerA"]) &&
410 isset($_REQUEST["PlayerB"]) &&
411 isset($_REQUEST["PlayerC"]) &&
412 isset($_REQUEST["PlayerD"]) &&
413 isset($_REQUEST["EmailA"]) &&
414 isset($_REQUEST["EmailB"]) &&
415 isset($_REQUEST["EmailC"]) &&
416 isset($_REQUEST["EmailD"]) && sizeof($lines<2))
418 $PlayerA = $_REQUEST["PlayerA"];
419 $PlayerB = $_REQUEST["PlayerB"];
420 $PlayerC = $_REQUEST["PlayerC"];
421 $PlayerD = $_REQUEST["PlayerD"];
422 $EmailA = $_REQUEST["EmailA"] ;
423 $EmailB = $_REQUEST["EmailB"] ;
424 $EmailC = $_REQUEST["EmailC"] ;
425 $EmailD = $_REQUEST["EmailD"] ;
427 $hashA = md5("AGameOfDoko".$PlayerA.$EmailA);
428 $hashB = md5("AGameOfDoko".$PlayerB.$EmailB);
429 $hashC = md5("AGameOfDoko".$PlayerC.$EmailC);
430 $hashD = md5("AGameOfDoko".$PlayerD.$EmailD);
432 /* send out email, check for error with email */
435 "you are invited to play a game of DoKo (that is to debug the program ;).\n".
436 "Place comments and bug reports here:\n".
437 "http://wiki.nubati.net/index.php?title=EmailDoko\n\n".
438 "The whole round would consist of the following players:\n".
443 "If you want to join this game, please follow this link:\n\n".
446 mymail($EmailA,"You are invited to a game of DoKo","Hello $PlayerA,\n".$message.$hashA);
447 mymail($EmailB,"You are invited to a game of DoKo","Hello $PlayerB,\n".$message.$hashB);
448 mymail($EmailC,"You are invited to a game of DoKo","Hello $PlayerC,\n".$message.$hashC);
449 mymail($EmailD,"You are invited to a game of DoKo","Hello $PlayerD,\n".$message.$hashD);
451 /* read in random.txt */
452 if(file_exists("random.txt"))
453 $random = file("random.txt");
455 die("no random file");
457 $randomNR = explode( ":", $random[2] );
459 /* write initial status into file */
460 $output = fopen("status.txt","w");
463 fwrite($output, "$hashA:$PlayerA:$EmailA:::" );
465 fwrite($output,"$randomNR[$i];" );
466 fwrite($output,"$randomNR[11]:" ); $i++;
467 fwrite($output,"\n");
469 fwrite($output, "$hashB:$PlayerB:$EmailB:::" );
471 fwrite($output,"$randomNR[$i];" );
472 fwrite($output,"$randomNR[23]:" ); $i++;
473 fwrite($output,"\n");
475 fwrite($output, "$hashC:$PlayerC:$EmailC:::" );
477 fwrite($output,"$randomNR[$i];" );
478 fwrite($output,"$randomNR[35]:" ); $i++;
479 fwrite($output,"\n");
481 fwrite($output, "$hashD:$PlayerD:$EmailD:::");
483 fwrite($output,"$randomNR[$i];" );
484 fwrite($output,"$randomNR[47]:" );
485 fwrite($output,"\n");
490 echo "can't open file for writing";
493 if(file_exists("status.txt"))
494 $lines = file("status.txt");
498 /* test if a game is running, else output everything for a new game */
502 <p> no game in progress, please input 4 names and email addresses, please make sure that the addresses are correct! </p>
503 <form action="index.php" method="post">
504 Name: <input name="PlayerA" type="text" size="10" maxlength="20" />
505 Email: <input name="EmailA" type="text" size="20" maxlength="30" /> <br />
507 Name: <input name="PlayerB" type="text" size="10" maxlength="20" />
508 Email: <input name="EmailB" type="text" size="20" maxlength="30" /> <br />
510 Name: <input name="PlayerC" type="text" size="10" maxlength="20" />
511 Email: <input name="EmailC" type="text" size="20" maxlength="30" /> <br />
513 Name: <input name="PlayerD" type="text" size="10" maxlength="20" />
514 Email: <input name="EmailD" type="text" size="20" maxlength="30" /> <br />
516 <input type="submit" value="start game" />
521 { /* load game status */
528 * check if a player wants to accept a game
531 if(isset($_REQUEST["a"]))
535 if( ereg("[is]",$player[$a]["option"]) && $game["init"]<4)
537 echo "just wait for the game to start";
539 else if( !ereg("[is]",$player[$a]["option"]) )
543 <form action="index.php" method="post">
544 Do you want to play a game of DoKo?
545 yes<input type="radio" name="in" value="yes" />
546 no<input type="radio" name="in" value="no" /> <br />
548 Do you want to get an email for every card played or only if it your move?
549 every card<input type="radio" name="update" value="card" />
550 only on my turn<input type="radio" name="update" value="turn" /> <br />
552 echo "<input type=\"hidden\" name=\"b\" value=\"$a\" />\n";
554 echo "<input type=\"submit\" value=\"count me in\" />\n";
564 * yes? email him his hand, ask for solo, poverty, email every move or every card?
566 if(isset($_REQUEST["b"]))
570 if( ereg("s",$player[$b]["option"]) && $game["init"]<4)
572 echo "just wait for the game to start";
574 else if( (!isset($_REQUEST["in"])|| !isset($_REQUEST["update"])) && !ereg("i",$player[$b]["option"]))
577 echo "<a href=\"index.php?a=$b\"> here and fill out the form </a> <br />\n";
580 { /* show the hand */
581 if($_REQUEST["in"]=="no")
585 $message = "Hello ".$player[$hash[$i]]["name"].",\n\n".
586 "the game has been canceled due to the request of one of the players.\n";
587 mymail($player[$hash[$i]]["email"],"[DoKo-Debug] the game has been canceled",$message);
589 $output = fopen("status.txt","w");
593 echo "problem opening file";
597 if($_REQUEST["update"]=="card") $player[$b]["option"].="c";
598 if($_REQUEST["update"]=="turn") $player[$b]["option"].="t";
600 $player[$b]["option"].="i";
604 $allcards = $player[$b]["cards"];
605 $mycards = explode(";",$allcards);
608 echo "your cards are <br />\n";
609 foreach($mycards as $card)
615 <p>aehm... at the moment poverty is not implented. so I guess you need to play a normal game, even if you have less than 3 turmp :(...sorry</p>
616 <form action="index.php" method="post">
618 do you want to play solo?
619 <select name="solo" size="1">
621 <option>No trump</option>
622 <option>Normal solo</option>
623 <option>Queen solo</option>
624 <option>Jack solo</option>
625 <option>Club solo</option>
626 <option>Spade solo</option>
627 <option>Heart solo</option>
634 if(check_wedding($player[$b]["cards"]))
636 echo " yes<input type=\"radio\" name=\"wedding\" value=\"yes\" />";
637 echo " no <input type=\"radio\" name=\"wedding\" value=\"no\" /> <br />\n";
641 echo " no <input type=\"hidden\" name=\"wedding\" value=\"no\" /> <br />\n";
644 echo "do you have poverty?";
645 if(count_trump($player[$b]["cards"])<4)
647 echo " yes<input type=\"radio\" name=\"poverty\" value=\"yes\" />";
648 echo " no <input type=\"radio\" name=\"poverty\" value=\"no\" /> <br />\n";
652 echo " no <input type=\"hidden\" name=\"poverty\" value=\"no\" /> <br />\n";
655 echo "do you have too many nines?";
656 if(count_nines($player[$b]["cards"])>4)
658 echo " yes<input type=\"radio\" name=\"nines\" value=\"yes\" />";
659 echo " no <input type=\"radio\" name=\"nines\" value=\"no\" /> <br />\n";
663 echo " no <input type=\"hidden\" name=\"nines\" value=\"no\" /> <br />\n";
666 echo "<input type=\"hidden\" name=\"c\" value=\"$b\" />\n";
667 echo "<input type=\"submit\" value=\"count me in\" />\n";
673 if(isset($_REQUEST["c"]))
677 if(!isset($_REQUEST["solo"])|| !isset($_REQUEST["wedding"])|| !isset($_REQUEST["poverty"]) || !isset($_REQUEST["nines"]) )
680 echo "<a href=\"index.php?b=$c\"> here and fill out the form </a> <br />\n";
682 else if( ereg("s",$player[$c]["option"]) && $game["init"]<4 )
684 echo "just wait for the game to start";
686 else if($game["init"]<4)
688 if( $_REQUEST["solo"]!="No")
690 switch($_REQUEST["solo"])
693 $player[$c]["option"].="O";
696 $player[$c]["option"].="S";
699 $player[$c]["option"].="Q";
702 $player[$c]["option"].="J";
705 $player[$c]["option"].="C";
708 $player[$c]["option"].="A";
711 $player[$c]["option"].="H";
715 else if($_REQUEST["wedding"] == "yes")
717 echo "wedding was chosen<br />\n";
718 $player[$c]["option"].="W";
720 else if($_REQUEST["poverty"] == "yes")
722 echo "poverty was chosen<br />\n";
723 $player[$c]["option"].="P";
725 else if($_REQUEST["nines"] == "yes")
727 echo "nines was chosen<br />\n";
728 $player[$c]["option"].="N";
731 $message = "You're in. Once everyone has filled out the form, ".
732 "the game will start and you'll get an eamil on your turn.\n";
733 mymail($player[$c]["email"],"[DoKo-debug] the game will start soon",$message);
735 $player[$c]["option"].="s";
737 if(file_exists("status.txt"))
738 $lines = file("status.txt");
745 $message = "The game can start now, it's your turn, please use this link to play a card:\n".
746 $host."?me=".$hash[$game["startplayer"]]."\n";
747 mymail($player[$hash[$game["startplayer"]]]["email"],"[DoKo-debug] let's go",$message);
754 /* check for sickness*/
755 /***** someone has 5 nines and no one is playing solo=> cancel game */
756 if($game["nines"]>=0 && $game["solo-who"]<0)
758 $message = $player[$hash[$game["poverty"]]]["nines"]." has more than 4 nines. Game aborted!\n";
761 mymail($player[$hash[$i]]["email"],"[DoKo-debug] the game has been canceled",$message);
764 $output = fopen("status.txt","w");
768 echo "problem opening file";
771 /* who is requesting this*/
772 if(!isset($_REQUEST["me"]))
774 if(!isset($_REQUEST["recovery"]))
776 echo "A game is in progress and kibitzing is not allowed. Sorry!.<br />\n";
777 echo "In case you are playing, but lost your email or can't access the game anymore, please input your email here:<br />\n";
779 <form action="index.php" method="post">
780 recorvery: <input name="recovery" type="text" size="20" maxlength="30" /> <br />
781 <input type="submit" value="get me back into the game" />
787 $recovery=$_REQUEST["recovery"];
790 if(trim($recovery)==trim($player[$hash[$i]]["email"]))
794 $message = "Please try this link: ".$host."?me=".$hash[$ok]."\n".
795 "\n if this doesn't work, contact the admin.\n";
796 mymail($recovery,"[DoKo-Debug] recovery ",$message);
797 echo "email has been sent.";
801 echo "can't find this email address, sorry.";
807 $me = $_REQUEST["me"];
809 /* output if we are playing a solo or a wedding */
810 if($game["solo-who"]>=0)
811 echo $player[$hash[$game["solo-who"]]]["name"]." is playing a ".$game["solo-what"]." solo!<br />\n";
812 else if($game["wedding"]>=0)
813 echo $player[$hash[$game["wedding"]]]["name"]." is playing a wedding!<br />\n";
816 foreach($history as $play)
818 $trick = explode(":",$play);
821 /* found old trick, display it */
822 if(sizeof($trick)==5)
823 echo "<div class=\"oldtrick background".$play[0]."\"><div class=\"table\">\n";
825 echo "<div class=\"trick back".$play[0]."\"><div class=\"table\">\n";
826 for($i=0;$i<sizeof($trick)-1;$i++)
831 $tmp = explode("->",$card);
833 echo "<div class=\"card".$tmp[0]."\">";
835 if(strlen($tmp[2])>0)
836 echo "<span class=\"comment\">";
839 echo $player[$hash[$tmp[0]]]["name"];
840 /* check for comment */
841 if(strlen($tmp[2])>0)
842 echo " <span>".$tmp[2]."</span>";
845 display_card($tmp[1]);
851 echo "</div></div>\n";
854 /* figure out who needs to play next */
860 $next = $history[sizeof($history)-1][0];
863 /* are we trying to play a card? */
864 if(isset($_REQUEST["card"]))
866 if($hash[$next]==$me)
868 $card = $_REQUEST["card"];
869 $mycards = explode(";",$player[$me]["cards"]);
871 /* do we have that card */
872 if(in_array($card,$mycards))
874 /* delete card from array */
876 foreach($mycards as $m)
881 for($i=0;$i<sizeof($tmp)-1;$i++)
886 $player[$me]["cards"]=$tmp2;
888 /* add card to history, special case if this is the first card */
891 $history[sizeof($history)-1]="".$player[$me]["number"]."->".$card.":\n";
895 $tmp = explode(":",$history[sizeof($history)-1]);
896 $tmp[sizeof($tmp)-1] = "".$player[$me]["number"]."->".$card.":";
897 $history[sizeof($history)-1]=join(":",$tmp);
901 echo "<div class=\"card\">";
902 echo " you played <br />";
908 <form action="index.php" method="post">
909 A short comment:<input name="comment" type="text" size="30" maxlength="50" />
910 <input type="hidden" name="me" value="<?php echo $me; ?>" />
911 <input type="submit" value="submit comment" />
914 /* send out email to players who want/need to get informed */
915 /* check if we are in a trick, if trick is done, this needs to be handelt in the
916 * who-won-the-trick section further down */
917 $tmp = explode(":",$history[sizeof($history)-1]);
921 $mynext = $next+1; if($mynext>3)$mynext-=4;
923 if((ereg("c",$player[$hash[$i]]["option"]) || $i==$mynext) && $hash[$i]!=$me)
925 $message = " Hello ".$player[$hash[$i]]["name"].",\n\n";
929 $message .= "it's your turn now.\n".
930 "Use this link to play a card: ".$host."?me=".$hash[$i]."\n\n" ;
932 $message .= $player[$me]["name"]." has played the following card ".
933 card_to_name($card)."\n";
935 if($game["solo-who"]>=0)
936 $message .= $player[$hash[$game["solo-who"]]]["name"]." is playing a ".
937 $game["solo-what"]." solo!\n";
939 mymail($player[$hash[$i]]["email"],"[DoKo-debug] a card has been played",$message);
942 echo "<a href=\"index.php?me=".$hash[$mynext]."\"> next player </a> <br />\n";
947 echo "seems like you don't have that card<br />\n";
951 } /* end if card is set */
952 else if(isset($_REQUEST["comment"]))
954 $comment = $_REQUEST["comment"];
955 $tmp = explode(":",$history[sizeof($history)-1]);
956 $tmp2 = explode("->",$tmp[sizeof($tmp)-2]);
958 $comment = str_replace(":","",$comment);
961 $tmp[sizeof($tmp)-2] .= "->".$comment;
962 $history[sizeof($history)-1]=join(":",$tmp);
966 else if(isset($_REQUEST["win"]) && strlen($history[sizeof($history)-1])>3)
968 $win = $_REQUEST["win"];
970 if(strlen($player[$hash[0]]["cards"]))
971 $history[] = $win.":\n";
973 /* email the player who needs to move next*/
976 if((ereg("c",$player[$hash[$i]]["option"]) || $i==$win) )
978 $message = " Hello ".$player[$hash[$i]]["name"].",\n\n";
982 $message .= "You won the last trick,it's your turn now.\n".
983 "Use this link to play a card: ".$host."?me=".$hash[$i]."\n\n" ;
986 $message .= $player[$hash[$win]]["name"]." has won the last trick\n".
987 "Use this link to look at the game: ".$host."?me=".$hash[$i]."\n\n" ;
989 if($game["solo-who"]>=0)
990 $message.= $player[$hash[$game["solo-who"]]]["name"]." is playing a ".
991 $game["solo-what"]." solo!\n";
993 mymail($player[$hash[$i]]["email"],"[DoKo-debug] a card has been played",$message);
996 echo "<a href=\"index.php?me=".$hash[$win]."\"> next player </a> <br />\n";
1001 /* count points of the last trick */
1004 $tmp = explode(":",$history[sizeof($history)-2]);
1007 $tmp2 = explode("->",$tmp[$i]);
1009 $points += card_value($c);
1011 $player[$hash[$win]]["points"] += $points;
1012 echo "<br />\n ".$player[$hash[$win]]["name"]." won: $points Points <br />\n";
1015 }; /* end if win is set */
1018 $tmp = explode(":",$history[sizeof($history)-1]);
1020 /* check last history entry: end of a trick? ask who won it, unless it was the last trick */
1021 if(sizeof($tmp)==5 && strlen($player[$hash[0]]["cards"]))
1024 <form action="index.php" method="post">
1028 echo $player[$hash[$i]]["name"]." <input type=\"radio\" name=\"win\" value=\"$i\" />";
1029 echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />";
1031 <input type="submit" value="submit" />
1036 else if(sizeof($tmp)<5 && 1<sizeof($tmp) && !isset($_REQUEST["card"]))
1038 if(sizeof($tmp)==2 && strlen($tmp[0])==1)
1043 echo "DEBUG: the next move is for <a href=\"index.php?me=".$hash[$next]."\">the next player</a><br />\n";
1045 if(strlen(trim($player[$me]["cards"]))==0)
1047 echo "<br /> game over, count points <br />\n";
1050 echo $player[$hash[$i]]["name"]." got ".$player[$hash[$i]]["points"]."<br />\n";
1055 } /* end check for winner */
1057 /* do we still have cards? display them */
1058 if(strlen(trim($player[$me]["cards"]))>0 )
1060 $allcards = trim($player[$me]["cards"]);
1061 $mycards = explode(";",$allcards);
1065 echo "<p class=\"mycards\">\n";
1066 /* is it our turn? */
1067 if($hash[$next]==$me && !isset($_REQUEST["card"]) && !isset($_REQUEST["win"]))
1069 echo "ITS YOUR TURN <br />\n";
1070 echo "your cards are: <br />\n";
1071 foreach($mycards as $card)
1073 display_link_card($card,$me);
1077 { /* not our turn, just show the hand */
1078 echo "your cards are: <br />\n";
1079 foreach($mycards as $card)
1081 display_card($card);