Inheritance: BaseViewModel
Exemplo n.º 1
0
        public PlayerViewModel(IPlayer player, GameViewModel game)
        {
            Player = player;
            GameVM = game;

            EndOfTurnCommand = new EndOfTurnCommand(game, this);

            HandVM = new ObservableCollection<CardViewModel>();
            InitHand();
            InitMana();
        }
Exemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            var player1 = new Player("Me", null);
            var player2 = new Player("Bender", new DummyStrategy());
            //var player2 = new Player("Skynet", new KamikazeStrategy());
            //var player2 = new Player("Wall-E", new CautiousStrategy());

            var game = new Game(player1, player2);

            vm = new GameViewModel(game, player1, player2);

            DataContext = vm;

            vm.BeginOfTurn();
        }
Exemplo n.º 3
0
 public EndOfTurnCommand(GameViewModel game, PlayerViewModel player)
 {
     Game = game;
     Player = player;
 }