Beispiel #1
0
 /// <summary>
 /// Return a delay in miliseconds to assign a delay to a phase, before it actually executes.  This might give other
 /// players an opportunity to respond to that phase.  For instance, you might add an "EndTurnPhase"
 /// with a delay of 15000 ms (15 seconds) to give players the opportunity to say "Before the end of your turn, I will take X action".
 /// </summary>
 /// <param name="p">the phase in question</param>
 /// <returns></returns>
 protected virtual int GetTurnPhaseDelay(Phase p)
 {
     switch (p.PhaseID)
     {
         case (int)PhaseId.BeginTurn:
             return 0;
         case (int)PhaseId.EndTurn:
             return 0;
     }
     return 0;
 }
Beispiel #2
0
 protected void BroadcastTurnPhaseUpdateToPlayer(Phase p, PacketPhaseUpdate.UpdateKind type)
 {
     PacketPhaseUpdate upd = new PacketPhaseUpdate();
     upd.PhaseUpdateKind = type;
     upd.Phase = p;
     Log.LogMsg("Broadcast [" + type.ToString() + "] for phase [" + upd.Phase.PhaseName + "]");
     BroadcastToPlayersInGame(upd, true);
 }