Exemplo n.º 1
0
        public void start()
        {
            stopWatch.Start();

            Console.SetWindowSize(140, 30);

            printWelcomeScreen();

            // Initialize levels
            RoomHandler gameLevels = new RoomHandler();

            gameLevels.initializeRooms();

            // Create the Player
            commands.createPlayer();

            if (Game.currentRoom.hasMonster == false)
            {
                EnemyCharacterModel.noEnemy();
                Console.WriteLine("No enemies found in this room, navigate through the cave to find your treasure.");
            }

            CommandHandler commandHandler = new CommandHandler();

            commandHandler.getCommand();

            Console.ReadLine();
        }
Exemplo n.º 2
0
        // *** Enemy Creation ***
        public void createEnemy()
        {
            type = randomEnemy();

            switch (type)
            {
            case EnemyType.SMALL_MONSTER:
                enemy.healthPoints = randomNumber(1, 3);
                enemy.attackPoints = randomNumber(1, 3);
                EnemyCharacterModel.small();

                Console.WriteLine("SMALL MONSTER with so much health points: {0} and can give so much damage to the player: {1}", enemy.healthPoints, enemy.attackPoints);
                break;

            case EnemyType.MEDIUM_MONSTER:
                enemy.healthPoints = randomNumber(4, 6);
                enemy.attackPoints = randomNumber(4, 6);
                EnemyCharacterModel.medium();

                Console.WriteLine("MEDIUM MONSTER with so much health points: {0} and can give so much damage to the player: {1}", enemy.healthPoints, enemy.attackPoints);
                break;

            case EnemyType.BIG_MONSTER:
                enemy.healthPoints = randomNumber(7, 10);
                enemy.attackPoints = randomNumber(7, 10);
                EnemyCharacterModel.big();

                Console.WriteLine("BIG MONSTER with so much health points: {0} and can give so much damage to the player: {1}", enemy.healthPoints, enemy.attackPoints);
                break;

            default:
                Console.WriteLine("No monsters in this room :)");
                break;
            }
        }
Exemplo n.º 3
0
        public void checkRoom()
        {
            if (Game.currentRoom.hasMonster == true)
            {
                commands.createEnemy();
                Console.WriteLine("The health from the enemy is: {0}, and for the Player is: {1}", commands.getHealthEnemy(), commands.getHealthPlayer());
            }
            else
            {
                EnemyCharacterModel.noEnemy();
                Console.WriteLine("No enemies found in this room, navigate through the cave to find your treasure.");
            }

            if (Game.currentRoom.hasTreasure == true)
            {
                commands.foundTreasure();
            }
        }