Beispiel #1
0
 //-------------------------------------------------------------------------
 byte _genPlayerId()
 {
     if (QuePlayerId.Count == 0)
     {
         return(++MaxPlayerId);
     }
     else
     {
         return(QuePlayerId.Dequeue());
     }
 }
Beispiel #2
0
 //-------------------------------------------------------------------------
 void _freePlayerId(byte player_id)
 {
     QuePlayerId.Enqueue(player_id);
 }