Beispiel #1
0
 public bool StartGame(ClientHandler fr, ClientHandler sc)
 {
     if (list.Count < N)
     {
         list.Add(new TicTacToy(fr.Name, sc.Name), new Tuple <ClientHandler, ClientHandler>(fr, sc));
         lock (fr)
         {
             fr.StartPlaying(sc.Name, 0);
         }
         lock (sc)
         {
             sc.StartPlaying(fr.Name, 0);
         }
         fr.Turn();
         return(true);
     }
     else
     {
         return(false);
     }
 }