Пример #1
0
 void updateGameResult()
 {
     if (Result == TTTGameResult.InProgress)
     {
         Result = calculateGameResult();
     }
 }
Пример #2
0
        public int NumberOfGamesWithResult(TTTGameResult result)
        {
            int count = 0;

            foreach (var game in Games)
            {
                if (game.Result == result)
                {
                    count++;
                }
            }

            return(count);
        }
Пример #3
0
        public override void WillDisplay(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
        {
            TTTGame game = Profile.Games [indexPath.Row];

            cell.TextLabel.Text = game.Date.ToString();
            TTTGameResult result = game.Result;

            if (result == TTTGameResult.Victory)
            {
                cell.DetailTextLabel.Text = "Victory";
            }
            else if (result == TTTGameResult.Defeat)
            {
                cell.DetailTextLabel.Text = "Defeat";
            }
            else if (result == TTTGameResult.Draw)
            {
                cell.DetailTextLabel.Text = "Draw";
            }
            else
            {
                cell.DetailTextLabel.Text = "In Progress";
            }
        }
Пример #4
0
		void updateGameResult ()
		{
			if (Result == TTTGameResult.InProgress)
				Result = calculateGameResult ();
		}
Пример #5
0
		public int NumberOfGamesWithResult (TTTGameResult result)
		{
			int count = 0;
			foreach (var game in Games) {
				if (game.Result == result)
					count++;
			}

			return count;
		}