Esempio n. 1
0
        private void start()
        {
            // build a game like this
            _game = new SimpleGameBuilder()
                // rules define cards and stuff that can use properties of cards
                .WithRule<DefaultTileset>()
                .WithRule<CityRule>()
                .WithRule<FarmersRule>()
                .WithRule<PriestsRule>()
                .WithRule<HighwaymanRule>()
                // with players
                .WithPlayer<SimpleComputerPlayer>()
                .WithPlayer(Player)
                // build the game
                .Build();

            // attach an observer of the game (UI representation)
            _game.AddObserver(this);

            // play a game like this
            _game.Start();
        }