public void WcfAddFighter(Fighter.TypeFighter typeFighter, Cell addedCell) { addedCell = SearchNeedCell(addedCell); CellViewModel cellVM = SearchCellVMtoCell(addedCell); if (Fighter.CanAddFighter(typeFighter, _fieldViewModel.Game.WhoTurn)) { switch (typeFighter) { case Fighter.TypeFighter.WizardFighter: cellVM.Cell.Fighter = new WizardFighter(_fieldViewModel.Field.Game.WhoTurn.Orientation, addedCell, typeFighter); break; case Fighter.TypeFighter.ArcherFighter: cellVM.Cell.Fighter = new ArcherFighter(_fieldViewModel.Field.Game.WhoTurn.Orientation, addedCell, typeFighter); break; case Fighter.TypeFighter.BarbarianFighter: cellVM.Cell.Fighter = new BarbarianFighter(_fieldViewModel.Field.Game.WhoTurn.Orientation, addedCell, typeFighter); break; default: break; } _fieldViewModel.BattleFieldViewModel.RefreshPanelEnergyAndWhoTurn(); FieldViewModel.ClearAllCellsFromSelection(); cellVM.Fighter = null; //refresh } else if (FieldViewModel.Game.WhoTurn._user.Equals(_fieldViewModel.BattleFieldViewModel.You)) { new MsgBoxGame("Not enough energy").ShowDialog(); } }
public void AddFighter(Fighter.TypeFighter typeFighter, Cell addedCell) { _battleFieldViewModel.FieldViewModel.Cells[0].WcfAddFighter(typeFighter, addedCell); }
public void AddFighter(Game game, Fighter.TypeFighter typeFighter, Cell addedCell) { _chanel.AddFighter(game, typeFighter, addedCell); }
private void SetHelpersMethod(Fighter.TypeFighter typeFighter) { FieldViewModel.MarkCellsForAddNewFigure(); FieldViewModel.HelperIsAddNewFigure.IsAddedCommand = true; FieldViewModel.HelperIsAddNewFigure.TypeFighter = typeFighter; }
public void AddFighter(Game game, Fighter.TypeFighter typeFighter, Cell addedCell) { CachData.Games[game].CallBack1.AddFighter(typeFighter, addedCell); CachData.Games[game].CallBack2.AddFighter(typeFighter, addedCell); }