Ejemplo n.º 1
0
        public void StartGame(StartGameArgs args)
        {
            UndoGame.Clear();
            Model.NumberOfPlayers = args.NumberOfPlayers;
            Model.Players[0].Name = args.Player1;
            Model.Players[1].Name = args.Player2;
            Model.Players[2].Name = args.Player3;
            Model.Players[3].Name = args.Player4;
            Model.Players[4].Name = args.Player5;
            Model.Players[5].Name = args.Player6;

            Model.TileBag.Reset();

            // Reset Hotels
            foreach (var item in Model.Hotels)
            {
                item.Active = false;
            }

            // Reset the Board
            foreach (var item in Model.Board)
            {
                item.Hotel = HotelEnum.NotUsed;
            }

            for (int i = 0; i < args.NumberOfPlayers; i++)
            {
                Model.Players[i].Prepare(Model.TileBag);
            }

            Model.ActivePlayer = 0;

            ViewModel.UpdateBoard(Model);
            ViewModel.UpdatePlayers(Model);

            ViewModel.StartGame(Model);
        }
Ejemplo n.º 2
0
 internal void StartGame(StartGameArgs args)
 {
     Controller.StartGame(args);
 }