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)); }
public TurnManager(Player whiteplayer, Player blackplayer, ClockManager clockManager, ChessBoard board) { turns = new List <Turn>(); Turns = turns.AsReadOnly(); ClockManager = clockManager; WhitePlayer = whiteplayer; BlackPlayer = blackplayer; Board = board; EnPassantManager = new EnPassantManager(board); }
public ChessMatch(ChessBoard board, Player whiteplayer, Player blackplayer) { Board = board; WhitePlayer = whiteplayer; BlackPlayer = blackplayer; ClockManager = new ClockManager(CreateClocks(new TimeSpan(0, 5, 0)), new TimeSpan(0, 0, 5)); TurnManager = new TurnManager(whiteplayer, blackplayer, ClockManager, board); Started = false; Ended = false; }
public void Start() { Started = true; PartialTurnTracker = new PartialTurnTracker(WhitePlayer, ClockManager.GetCurrentClock(), Board.CurrentState); }