Inheritance: IPlayer
        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();
        }
Beispiel #2
0
 public void Setup()
 {
     Player = new Player();
 }
 public GameBuilder withOpponentPlayer(Player player)
 {
     opponentPlayer = player;
     return this;
 }
 public GameBuilder withActivePlayer(Player player)
 {
     activePlayer = player;
     return this;
 }