public IFigureEntity Create(IFigureDef figureDef, GameTeam team) { var figureEntity = FigureCreator.Create(figureDef, team); var figureView = FigureViewFactory.Spawn(figureEntity); FigureViewModel.AddView(figureEntity, figureView); return(figureEntity); }
private void TransformFigure(IFigureEntity figure, IFigureDef figureDef) { var cell = figure.PlacedCell; var team = figure.Team; FigureController.RemoveFigure(figure); var newTransformFigure = FigureCreator.Create(figureDef, team); FigureController.MoveFigure(newTransformFigure, cell); }
private void ArrangementFigures(IGameDef gameDef) { foreach (var startInfoFigureDef in gameDef.StartInfoFigureDefs) { var figureDef = startInfoFigureDef.Def; var team = startInfoFigureDef.Team; var figureEntity = FigureCreator.Create(figureDef, team); var cell = BoardModel.GetCell(startInfoFigureDef.StartCol, startInfoFigureDef.StartRow); FigureController.MoveFigure(figureEntity, cell); } }