public void AcceptPreview()
 {
     _boardView.ClearHighlights();
     if (_previewPickup != null)
     {
         if (_move != null)
         {
             int oldCount = _move.PickUpMove.PickUpCount;
             _move.TakeBackMove(_game);
             _previewPickup = new PickUpMove(
                 _previewPickup.Position,
                 oldCount + _previewPickup.PickUpCount,
                 _game);
             _boardView.CarryClear();
         }
         _move = new PickupAndPlaceMove(_previewPickup);
         _move.MakeMove(_game);
         _boardView.CarryVisible = true;
         foreach (var pieceID in _move.PickUpMove.PickUpPieces)
         {
             _boardView.CarryAdd(pieceID);
         }
         _previewPickup = null;
     }
     else if (_previewPlace != null)
     {
         _move.AddToChain(_previewPlace);
         _previewPlace = null;
     }
 }
Ejemplo n.º 2
0
 public InteractiveMove_PickupAndPlace(GameState game, BoardView boardView)
 {
     _game      = game;
     _boardView = boardView;
     _boardView.CarryClear();
     _boardView.CarryVisible = false;
 }
Ejemplo n.º 3
0
 public InteractiveMove_PlaceFromReserve(GameState game, BoardView boardView, int pieceID)
 {
     _game      = game;
     _boardView = boardView;
     _pieceID   = pieceID;
     _boardView.CarryClear();
     _boardView.CarryAdd(pieceID);
     _boardView.CarryVisible = true;
 }
Ejemplo n.º 4
0
 private void CancelTool()
 {
     SetActiveTool(null);
     _boardView.CarryClear();
     _boardView.ClearHighlights();
 }
Ejemplo n.º 5
0
 public void AcceptPreview()
 {
     _boardView.CarryClear();
     _boardView.ClearHighlights();
 }