Beispiel #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));
        }
Beispiel #2
0
 public PartialTurnTracker(Player player, ChessClock clock, BoardState boardstate)
 {
     Player     = player;
     Clock      = clock;
     BoardState = boardstate;
     StartTime  = Clock.Time;
 }
Beispiel #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());
        }