Example #1
0
        public void buildRoster()
        {
            List <Monster> player1temp = new List <Monster>();

            player1temp.Add(monsterDataBase.ElementAt(0));
            playerOne = new Roster(player1temp);


            playerOne.addMonster(dragonShep);
            playerOne.addMonster(dragonShep);
            playerOne.addMonster(dragonShep);
            playerOne.addMonster(triceritops);
            playerOne.addMonster(triceritops);

            List <Monster> player2Temp = new List <Monster>();

            player2Temp.Add(monsterDataBase.ElementAt(1));
            playerTwo = new Roster(player2Temp);
            playerTwo.addMonster(triceritops);
            playerTwo.addMonster(triceritops);
            playerTwo.addMonster(triceritops);
            playerTwo.addMonster(dragonShep);
            playerTwo.addMonster(dragonShep);

            /*
             * Console.Write("playerOne roster size is " + playerOne.count() + "\n");
             * Console.Write("playerTwo roster size is " + playerTwo.count() + "\n");
             *
             * // Console.Write("player twos triceritops from his roster is level " + playerTwo.returnMonsterAt(0).getlevel() + "\n");
             * // Console.Write("playerTwo roster size is " + playerTwo.count() + "\n");
             * Console.ReadLine();
             */
        }
Example #2
0
        public Roster buildRosterFromConsole()
        {
            List <Monster> monsterList     = new List <Monster>();
            Roster         playerOneRoster = new Roster(monsterList, "Player One");

            Console.Write("How many Monsters does this roster need? (input an Integar)" + "\n");
            String p1NumberOfMonsterS = Console.ReadLine();

            int p1numMon = Convert.ToInt32(p1NumberOfMonsterS);

            for (int i = 0; i < p1numMon; i++)
            {
                Console.Write("Pick the Id of your first Monster" + "\n");
                for (int b = 0; b < monsterDataBase.Count; b++)
                {
                    Console.Write(" Monster: " + monsterDataBase.ElementAt(b).getName() + ", Id: " + monsterDataBase.ElementAt(b).getId() + "\n");
                }
                string monsterIdString = Console.ReadLine();
                int    monsterId       = Convert.ToInt32(monsterIdString);
                monsterId = monsterId - 1;
                playerOneRoster.addMonster(monsterDataBase.ElementAt(monsterId));
            }
            for (int i = 0; i < playerOneRoster.count(); i++)
            {
                Console.Write("Player 1 Monster at:" + +i + " is called = " + playerOneRoster.returnMonsterAt(i).getName() + "\n");
                for (int b = 0; b < playerOneRoster.returnMonsterAt(i).getMoveList().Count; b++)
                {
                    Console.Write(playerOneRoster.returnMonsterAt(i).getName() + " move number " + b + " is named " + playerOneRoster.returnMonsterAt(i).getMoveList().ElementAt(b).getName() + "\n");
                }
            }


            Console.ReadLine();
            return(playerOneRoster);
        }
        public Roster buildRosterFromConsole()
        {
            List<Monster> monsterList = new List<Monster>();
            Roster playerOneRoster = new Roster(monsterList);
            Console.Write("How many Monsters does this roster need? (input an Integar)" + "\n");
            String p1NumberOfMonsterS = Console.ReadLine();

            int p1numMon = Convert.ToInt32(p1NumberOfMonsterS);
            for (int i = 0; i < p1numMon; i++)
            {
                Console.Write("Pick the Id of your first Monster" + "\n");
                for (int b = 0; b < monsterDataBase.Count; b++)
                {
                    Console.Write(" Monster: " + monsterDataBase.ElementAt(b).getName() + ", Id: " + monsterDataBase.ElementAt(b).getId() + ", Level:  " + monsterDataBase.ElementAt(b).getlevel() + ", Type: " + monsterDataBase.ElementAt(b).getType()+", Health: "+ monsterDataBase.ElementAt(b).gethealth() + "\n");
                }
                string monsterOrderString = Console.ReadLine();
                int monsterOrder = Convert.ToInt32(monsterOrderString);
                monsterOrder = monsterOrder -1;

                playerOneRoster.addMonster(monsterDataBase.ElementAt(monsterOrder));
            }
            for (int i = 0; i < playerOneRoster.count(); i++)
            {
                Console.Write("Player" + "\n");
                    //Monster at:" + +i + " is called = " + playerOneRoster.returnMonsterAt(i).getName() + "\n");

                for (int b = 0; b < playerOneRoster.returnMonsterAt(i).getmoveList().Count; b++)
                {
                    Console.Write(playerOneRoster.returnMonsterAt(i).getName() + " move number " + b + " is named " + playerOneRoster.returnMonsterAt(i).getmoveList().ElementAt(b).getName() + "\n");
                }
            }
            Console.ReadLine();
            return playerOneRoster;
        }
Example #4
0
        public void buildRoster()
        {
            List<Monster> player1temp = new List<Monster>();
            player1temp.Add(monsterDataBase.ElementAt(0));
            playerOne = new Roster(player1temp);

            playerOne.addMonster(dragonShep);
            playerOne.addMonster(dragonShep);
            playerOne.addMonster(dragonShep);
            playerOne.addMonster(triceritops);
            playerOne.addMonster(triceritops);

            List<Monster> player2Temp = new List<Monster>();
            player2Temp.Add(monsterDataBase.ElementAt(1));
            playerTwo = new Roster(player2Temp);
            playerTwo.addMonster(triceritops);
            playerTwo.addMonster(triceritops);
            playerTwo.addMonster(triceritops);
            playerTwo.addMonster(dragonShep);
            playerTwo.addMonster(dragonShep);
            /*
            Console.Write("playerOne roster size is " + playerOne.count() + "\n");
            Console.Write("playerTwo roster size is " + playerTwo.count() + "\n");

            // Console.Write("player twos triceritops from his roster is level " + playerTwo.returnMonsterAt(0).getlevel() + "\n");
               // Console.Write("playerTwo roster size is " + playerTwo.count() + "\n");
            Console.ReadLine();
            */
        }