Пример #1
0
        public void startGame(string[] strings , int nrP , int nrH)
        {
            _board = new Board(playerList, this);
            createPlayers(nrP, nrH);
            board.newCreateField(strings, playerList);

               // createPlayers(stri, humans);
               // _board = new Board(_playerList);
            firstRoll(_playerList);
            //addPawn();
        }
Пример #2
0
        public void startFromFile(String[] file)
        {
            _board = null;

            //TEST STRINGARRAY
            string[] strings = new string[8];
            strings = file;

            //Strings == files later on
            int NrofPlayers = 0;
            Int32.TryParse((strings[0].Substring(strings[0].IndexOf('=')+1, 1)), out NrofPlayers);
            int NrofHumans = 0;
            Int32.TryParse((strings[1].Substring(strings[1].IndexOf('=')+1, 1)), out NrofHumans);

            createPlayers(NrofPlayers, NrofHumans);

            foreach (Player p in _playerList)
            {
                if(p != null)
                    if (p.color.Equals(strings[3].Substring(strings[3].IndexOf('=')+1, 1)))
                        playersTurn = p;

                //create spawns for players? (nu we toch in een loop zitten)
                //evt ook goals?

            }

            _board = new Board(playerList, this);
            board.newCreateField(strings , _playerList);
        }