示例#1
0
        public void Undo(GameCore gameCore)
        {
            var fromHolder = gameCore.GetGridHolder(MoveInfo.FromRow, MoveInfo.FromCol);
            var toHolder = gameCore.GetGridHolder(MoveInfo.ToRow, MoveInfo.ToCol);

            var gridEntity = toHolder.GridItem;
            toHolder.SetGridEntity(null);

            fromHolder.SetGridEntity(gridEntity);
        }
        public void Do(GameCore gameCore)
        {
            var gridHolder = gameCore.GetGridHolder(Row, Col);
            gridHolder.SetGridEntity(NewGridItem);

            gameCore.AddNewCreatedGridItem(NewGridItem);
        }
 public void Undo(GameCore gameCore)
 {
     var gridHolder = gameCore.GetGridHolder(Row, Col);
     gridHolder.SetGridEntity(null);
 }