Beispiel #1
0
 private void BuildPalaces(Player player1,Player player2)
 {
     checker = new Checker();
     player1.PalaceIsCreated += checker.CheckIn;
     player2.PalaceIsCreated += checker.CheckIn;
      //           player1.OnGetBuildSpot();
       //          player2.OnGetBuildSpot();
     while (!checker.IsReady)
     {
     }
 }
Beispiel #2
0
 private void OnGameStarted(Checker e)
 {
     GameStarted?.Invoke(this, e);
 }
Beispiel #3
0
 public void OnGetBuildSpot(object sender, Checker e)
 {
     Debug.WriteLine("Checker is connect");
     PalaceIsCreated += e.CheckIn;
     Debug.WriteLine("Begin Invoke for Get Spot Palace");
     CreatePalace.BeginInvoke(GetSpotCallback, CreatePalace);
 }
Beispiel #4
0
        private void WaitForPalaces()
        {
            Debug.WriteLine("Start Waiting");
            var checker = new Checker();
            OnGameStarted(checker);

            while (!checker.IsReady)
            {
            }
            Debug.WriteLine("Palaces is ready.");
        }