Пример #1
0
        public void UpdateClock(TimeSpan delta)
        {
            ClockManager.SubTractTime(delta);
            ChessClock clock = ClockManager.GetCurrentClock();

            System.Diagnostics.Debug.WriteLine(string.Format("{0}:{1}:{2}", clock.Time.Hours, clock.Time.Minutes, clock.Time.Seconds));
        }
Пример #2
0
 public PartialTurnTracker(Player player, ChessClock clock, BoardState boardstate)
 {
     Player     = player;
     Clock      = clock;
     BoardState = boardstate;
     StartTime  = Clock.Time;
 }
Пример #3
0
        private ReadOnlyCollection <ChessClock> CreateClocks(TimeSpan startTime)
        {
            ChessClock WhiteClock = new ChessClock(WhitePlayer, startTime);
            ChessClock BlackClock = new ChessClock(BlackPlayer, startTime);

            return(new List <ChessClock>()
            {
                WhiteClock, BlackClock
            }.AsReadOnly());
        }