コード例 #1
0
        public static void CreateBattleground(int rows, int collumns, AntWarsViewModel antWarsViewModel)
        {
            _antWarsViewModel = antWarsViewModel;

            _antWarsViewModel.RowCount = rows;
            _antWarsViewModel.ColumnCount = collumns;
            _antWarsViewModel.BattlegroundWidth = _antWarsViewModel.RowCount * BATTLEFIELD_UNIT_HEIGTH;
            _antWarsViewModel.BattlegroundHeigth = _antWarsViewModel.ColumnCount * BATTLEFIELD_UNIT_WIDTH;

            InitiateBattlefield();
        }
コード例 #2
0
        public static void CreateBattleground(int rows, int collumns, AntWarsViewModel antWarsViewModel)
        {
            _antWarsViewModel = antWarsViewModel;

            _antWarsViewModel.RowCount = rows;
            _antWarsViewModel.ColumnCount = collumns;
            _antWarsViewModel.BattlegroundWidth = _antWarsViewModel.RowCount * BattlefieldUnitHeigth;
            _antWarsViewModel.BattlegroundHeigth = _antWarsViewModel.ColumnCount * BattlefieldUnitWidth;

            InitiateBattlefield();
        }
コード例 #3
0
ファイル: AntWars.cs プロジェクト: kmorcinek/hello_wars
 public UserControl GetVisualisationUserControl(IConfigurable configuration)
 {
     _antWarsViewModel = new AntWarsViewModel();
     _movementService = new MovementService(_antWarsViewModel);
     _botService = new BotService(_antWarsViewModel);
     return new AntWarsUserControl(_antWarsViewModel);
 }
コード例 #4
0
ファイル: BotService.cs プロジェクト: kmorcinek/hello_wars
 public BotService(AntWarsViewModel antWarsViewModel)
 {
     _antWarsViewModel = antWarsViewModel;
 }
コード例 #5
0
 public MovementService(AntWarsViewModel antWarsViewModel)
 {
     _antWarsViewModel = antWarsViewModel;
     _listOfMissilesToFire = new List<MissileModel>();
 }
コード例 #6
0
 public AntWarsUserControl(AntWarsViewModel viewModel)
 {
     InitializeComponent();
     DataContext = viewModel;
 }
コード例 #7
0
        public MovementPerformer(AntWarsViewModel antWarsViewModel)
        {
            _antWarsViewModel = antWarsViewModel;

        }