public static CGME.Game Build() { // BUILDING THE GAME TABLE game = new CGME.Game(); // BUILDING PHASES AddPhase (new Phase("Play Phase")); // BUILDING ACTIONS Action pass = new ActionEndPhase("End Phase"); ActionConditionWaitForInput play_wait = new ActionConditionWaitForInput("Pass",pass); game.GetPhase("Play Phase").AddAction (play_wait); // BUILDING PLAYERS AddPlayer (new Player("Game Player")); AddPlayer (new Player("Human Player")); // BUILDING DECKS game.GetPlayer("Human Player").AddDeck(new Deck("Draw Pile")); // ADDING RESOURCES game.AddResource(new ResourceNumber("Life Points",30), "Human Player"); game.AddResource(new ResourceNumber("Life Points",30), "Game Player"); game.AddResource (new ResourceNumber("Victory Points", 0), "Human Player"); // BUILDING CARDS card_list.Add(new Card("Dwarf Dork",false)); // BUILD DECKS for (int i = 1; i <= 2; i++){ Card new_card = card_list[0]; new_card.AddResource(new ResourceText("Description", "Drunk and Smelly")); new_card.AddResource(new ResourceAction("Play Phase",new ActionAttack("Attack"))); game.GetPlayer ("Human Player").GetDeck ("Draw Pile").AddCard(new_card); } return game; }
public static CGME.Game Build() { // BUILDING THE GAME TABLE game = new CGME.Game(); // BUILDING PLAYERS //CGME.Player game_player = Factory.BuildPlayer("Game Player", true); game.AddPlayer (new Player("Game Player")); //CGME.Player human_player = Factory.BuildPlayer("Human Player", true); game.AddPlayer (new Player("Human Player")); // ADDING RESOURCES game.AddResource(new Resource<int>("Life Points",30), "Human Player"); game.AddResource(new Resource<int>("Life Points",30), "Game Player"); game.AddResource (new Resource<int>("Victory Points", 0), "Human Player"); // BUILDING DECKS game.GetPlayer("Human Player").AddDeck(new Deck("Draw Pile")); // BUILDING CARDS for (int i = 1; i <= 2; i++){ game.GetPlayer ("Human Player").GetDeck ("Draw Pile").AddCard(new Card("Dwarf Dork")); game.AddResource(new Resource<string>("Description", "Drunk and Smelly"),"Dwarf Dork"); } // BUILDING RULESET game.AddRuleset(new Ruleset("Standard")); // BUILDING PHASES game.GetRuleset ("Standard").AddPhase (new Phase("Draw Phase")); game.GetRuleset ("Standard").AddPhase (new Phase("Play Phase")); // BUILDING ACTIONS game.GetRuleset ("Standard").GetPhase ("Draw Phase").AddAction(new EndPhaseAction("End Phase")); game.GetRuleset ("Standard").GetPhase("Draw Phase").AddAction(new SubtractResourceAction("Damage","Life Points", 5)); game.GetRuleset ("Standard").GetPhase ("Play Phase").AddAction(new EndGameAction("End Game")); return game; }