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();
        }
示例#2
0
 public void Setup()
 {
     Player = new Player();
 }
示例#3
0
 public GameBuilder withOpponentPlayer(Player player)
 {
     opponentPlayer = player;
     return this;
 }
示例#4
0
 public GameBuilder withActivePlayer(Player player)
 {
     activePlayer = player;
     return this;
 }