static void Main(string[] args) { //test(); startUpConsole(); List<Move> moveList = new List<Move>(); test firsttest = new test(); firsttest.runtest(); }
static void Main(string[] args) { List<Move> moveList = new List<Move>(); test firsttest = new test(); firsttest.runtest(); }
static void startUpConsole() { Console.Write("Welcome to Moon Monster, the Conquest of the Future" + "\n"); // Console.Write("Today will be a two player gamee" + "\n"); test game= new test(); game.buildmoves(); game.buildMonsters(); gameLoop(game); }
static void gameLoop(test gameLoopTest) { Builder buildRoster = new Builder(); test loopTest = gameLoopTest; // Console.Write("database count at start: " + loopTest.monsterDataBase.Count() + "\n"); Console.Write("What would you like to do today? Enter 1 to play, 2 to develop or 3 to exit " + "\n"); string tempString = Console.ReadLine(); int tempInt = Convert.ToInt32(tempString); if (tempInt == 1) { Console.Write("Player One please select your roster;"+"\n"); Roster playerOne = buildRoster.buildRosterFromConsole(loopTest.getDataBase()); Console.Write("Player Two please selecet your roster:"+"\n"); Roster playerTwo= buildRoster.buildRosterFromConsole(loopTest.getDataBase()); BattleGround firstLoop = new BattleGround(playerOne,playerTwo,loopTest.getDataBase()); firstLoop.iterator(playerOne, playerTwo); gameLoop(loopTest); } if (tempInt == 2) { Console.Write("Welcome to Developer Mode: " + "\n"); Console.Write("Please Select a number from the following list: " + "\n"); Console.Write("1: View Monster DataBase: " + "\n"); Console.Write("2: Create new Monster" + "\n"); Console.Write("3: Create new Move" + "\n"); Console.Write("4: Create new Roster"+"\n"); Console.Write("5: View moveList " + "\n"); string tempStringTwo=Console.ReadLine(); int tempIntTwo = Convert.ToInt32(tempStringTwo); if (tempIntTwo == 1) { loopTest.printMonsterList(loopTest.monsterDataBase); Console.Write("Press enter to continue"+"\n"); Console.ReadLine(); gameLoop(loopTest); } if (tempIntTwo == 2) { Monster newMonster = buildRoster.buildMonsterFromConsole(loopTest.moveList,loopTest.monsterDataBase.Count()); loopTest.monsterDataBase.Add(newMonster); Console.Write("Press enter to continue"+ "\n"); Console.ReadLine(); gameLoop(loopTest); } if (tempIntTwo == 3) { List<Move> listForBuilder = loopTest.moveList; Move newMove = buildRoster.buildMoveFromConsole(listForBuilder); loopTest.moveList.Add(newMove); Console.Write("Press enter to continue"+"\n"); Console.ReadLine(); gameLoop(loopTest); } if (tempIntTwo == 4) { Roster newRoster = buildRoster.buildRosterFromConsole(loopTest.getDataBase()); //roster has not been stored anywhere Console.Write("Press enter to continue" + "\n"); Console.ReadLine(); gameLoop(loopTest); } if (tempIntTwo == 5) { loopTest.printMoveList(loopTest.moveList); Console.Write("Press enter to continue" + "\n"); Console.ReadLine(); gameLoop(loopTest); } } if (tempInt == 3) { Console.Write("Thanks for playing"+"\n"); //saves moves XmlSerializer serializer = new XmlSerializer(typeof(List<Move>)); TextWriter writer = new StreamWriter("movelist.xml"); serializer.Serialize(writer, loopTest.moveList); writer.Close(); } else { } }