<?php
-/* Copyright 2006, 2007, 2008, 2009, 2010 Arun Persaud <arun@nubati.net>
+/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arun Persaud <arun@nubati.net>
*
* This file is part of e-DoKo.
*
* ask if player wants to join the game *
****************************************/
- /* don't ask if user has autosetup set to yest */
+ /* don't ask if user has autosetup set to yes */
$skip = 0;
if($PREF['autosetup']=='yes') $skip = 1;
/* who is the next player? */
$next = $winner;
+ $firstcard = ''; /* unset firstcard, so followsuit doesn't trigger with the last trick */
}
else
{
echo "</div>\n"; /* end ul tricks*/
- if($myturn && !myisset('card') && $mystatus=='play' )
+ if( ($myturn && !myisset('card') && $mystatus=='play') /* it's my turn*/
+ || ($myturn && myisset('card') && $next==$mypos && $mystatus=='play') /* a card has been played and player won the trick*/)
{
$card_status = CARDS_MYTURN;
}