Exemplo n.º 1
0
 public CBoardSynchronizer(CPlayer whitePlayer, CPlayer blackPlayer, CBoardRecorder recorder, Action <ESideColor> endRoundAction)
 {
     White     = new CPlayerSide(whitePlayer, SPiecesKitFactory.GetPiecesStartKit(ESideColor.White), SPiecesKitFactory.GetPawns(ESideColor.White));
     Black     = new CPlayerSide(blackPlayer, SPiecesKitFactory.GetPiecesStartKit(ESideColor.Black), SPiecesKitFactory.GetPawns(ESideColor.Black));
     _recorder = recorder;
     _checker  = new CBoardChecker(White, Black, recorder, endRoundAction);
 }
Exemplo n.º 2
0
 public CBoardChecker(CPlayerSide white, CPlayerSide black, CBoardRecorder recorder, Action <ESideColor> endRoundAction)
 {
     White           = white;
     Black           = black;
     _recorder       = recorder;
     _endRoundAction = endRoundAction;
     _timer          = new Timer(CheckBoard, null, CheckInterval, CheckInterval);
 }