public void Do(GameCore gameCore) { var gridHolder = gameCore.GetGridHolder(Row, Col); gridHolder.SetGridEntity(NewGridItem); gameCore.AddNewCreatedGridItem(NewGridItem); }
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 GameManager() { GameCore = new GameCore(); }
public void Undo(GameCore gameCore) { var gridHolder = gameCore.GetGridHolder(Row, Col); gridHolder.SetGridEntity(null); }