コード例 #1
0
 public void UpdateGameStatus(GameStatus status)
 {
     writer.WriteLine("Round no. " + status.RoundNumber);
     writer.WriteLine("Scores:");
     writer.WriteLine(status.PlayerNames.Aggregate((s, acm) => acm += "/t" + s));
     writer.WriteLine(status.Scores.Aggregate<int,string>("", (acm, score) => acm += "/t" + score));
 }
コード例 #2
0
 public void UpdateGameStatus(GameStatus status)
 {
     try
     {
         webClient.RecieveGameStatusUpdate(status);
     }
     catch (Exception e)
     {
     }
 }
コード例 #3
0
 public virtual void UpdateGameStatus(GameStatus status)
 {
     CurrentGameStatus = status;
 }
コード例 #4
0
 public void UpdateGameStatus(GameStatus status)
 {
     this.gameStatus = status;
 }
コード例 #5
0
        private void ShowGameStatus(GameStatus status)
        {
            lbl_name_self.Text = status.PlayerNames[0];
            lbl_name_west.Text = status.PlayerNames[1];
            lbl_name_north.Text = status.PlayerNames[2];
            lbl_name_east.Text = status.PlayerNames[3];

            lbl_score_self.Text = status.Scores[0] + "";
            lbl_score_west.Text = status.Scores[1] + "";
            lbl_score_north.Text = status.Scores[2] + "";
            lbl_score_east.Text = status.Scores[3] + "";

            lbl_round_count.Text = status.RoundNumber + "";
            ShowRoundStatus(new RoundStatus { Biddings = new Bid?[4], CurrentPlay = new Card?[4], TricksTaken = new int[4]}, new[] { new Card[0], new Card[0], new Card[0], new Card[0] });
        }
コード例 #6
0
 public void UpdateGameStatus(GameStatus status)
 {
     //BeginInvoke(new MethodInvoker( delegate() { ShowGameStatus(status); }));
     statusHistory.Add(status.Clone());
     int _roundIndex = status.RoundNumber;
     if (!round_to_index.ContainsKey(_roundIndex))
         round_to_index.Add(_roundIndex, statusHistory.Count - 1);
     if (_roundIndex > maxRonudIndex)
         maxRonudIndex = _roundIndex;
     BeginInvoke(new MethodInvoker(delegate() { lbl_status.Text = "Finished simulating round #" + maxRonudIndex; }));
 }
コード例 #7
0
 public void UpdateGameStatus(GameStatus status)
 {
     this.imp.UpdateGameStatus(status);
 }