Exemple #1
0
        // The user of the game right now: s-sjoshi, s-kbowers, Sarang, etc.

        public void InitializeGameMode()
        {
            MyMap.randomizePlayerRoom();
            //MyMap.setPlayerRoom(new Room(4, 1));
            MyMap.setAdjacentRooms(MyCave.loadCaveandRoom(MyMap.getPlayerRoom().getDecimalForm()));
            if (isMusicOn)
            {
                MySound.PlayBg();
            }
        }
Exemple #2
0
        private void RandomizePlayerRoom()
        {
            Room temp;

            Room[] myAdjacentRooms;
            Random r = MyMap.r;
            int    count;

            do
            {
                count           = 0;
                temp            = new Room(MyMap.getRandomRoom());
                myAdjacentRooms = MyCave.loadCaveandRoom(temp.getDecimalForm());

                if (MyMap.randomizePlayerRoom(temp.getIntegerForm(), myAdjacentRooms))
                {
                    count++;
                }
            } while (MyMap.isRoomOkay(temp, 'p'));

            MyMap.setPlayerRoom(temp);
            //explored.Add(new Room(playerRoom));
        }