public MeetCharmander(Pikachu _UsersPikachu) { userspikachu = _UsersPikachu; InitializeComponent(); //SelfHp.Text = "HP" + _UsersPikachu.pokemon.CurrentHp.ToString() + "/" + _UsersPikachu.pokemon.Hp.ToString(); //EnemyHp.Text = "HP" + _bulbasaur.pokemon.CurrentHp.ToString() + "/" + _bulbasaur.pokemon.Hp.ToString(); }
public void NeuesPikachu(string name) { Pikachu neuesPikachu = new Pikachu(name); _tiere.Add(neuesPikachu); neuesPikachu.Schlachten(); }
static void Main(string[] args) { //set in another part of the game Trainer player1 = new Trainer(); Trainer player2 = new Trainer(); PokeBase pika = new Pikachu(); PokeBase bulbasaur = new Bulbasaur(); player1.SelectCard(pika); PokeBase[] cardsToAdd = { pika, bulbasaur }; player2.SelectCard(cardsToAdd); player1.ChoosePokeForBattle(pika); player2.ChoosePokeForBattle(bulbasaur); ////////////////////////////////////// ////////////////////////////////////// Console.WriteLine("The Battle Begins!"); PokeArena pokeArena = new PokeArena(player1, player2); Console.WriteLine(pokeArena.Battle()); Console.ReadLine(); }
public PokemonRoad(Pikachu defaultspokemon, int seq, bool success) { _UsersPikachu = defaultspokemon; CurrentSeq = seq; StageSitch = success; CurrentStage.Text = CheckStage().ToString(); InitializeComponent(); }
static void Main(string[] args) { var pikachu = new Pikachu(); Console.WriteLine(pikachu); var ashesPikachu = new Pikachu("Ashes"); Console.WriteLine(ashesPikachu); }
public void Be6WhenGiven_OnePikachu() { var pikachu = new Pikachu(); _cashRegister.BuyPokemon(pikachu); var result = _cashRegister.GetOrderTotal(); result.IsEqualToPenny(6.0); }
public void Be12WhenGiven_2Pikachu() { var pikachu = new Pikachu(); _cashRegister.BuyManyPokemon(pikachu, 2); var result = _cashRegister.GetOrderTotal(); result.IsEqualToPenny(12.0); }
public void AddPokemonToGroup_IfNotInGroup() { var pikachu = new Pikachu(); var pokemons = new List <IPokemon> { new Charmander() }; _pokemonGrouper.AddPokemonToGroup(pikachu, pokemons); pokemons.Should().Contain(x => x.Name == pikachu.Name); }
public void ReturnFalse_IfPokemonIsNotInGroup() { var pikachu = new Pikachu(); var pokemons = new List <IPokemon> { new Squirtle(), new Charmander() }; var isInGroup = _pokemonGrouper.IsInGroup(pikachu, pokemons); isInGroup.Should().BeFalse(); }
public void ReturnTrue_IfPokemonIsAlreadyInGroup() { var pikachu = new Pikachu(); var pokemons = new List <IPokemon> { new Pikachu() }; var isInGroup = _pokemonGrouper.IsInGroup(pikachu, pokemons); isInGroup.Should().BeTrue(); }
public void Be2970WhenGiven_3Pikachu3Squirtle() { var pikachu = new Pikachu(); var squirtle = new Squirtle(); _cashRegister.BuyManyPokemon(pikachu, 3); _cashRegister.BuyManyPokemon(squirtle, 3); var result = _cashRegister.GetOrderTotal(); result.IsEqualToPenny(29.70); }
public void Be1590WhenGiven_2Pikachu1Squirtle() { var pikachu = new Pikachu(); var squirtle = new Squirtle(); _cashRegister.BuyManyPokemon(pikachu, 2); _cashRegister.BuyPokemon(squirtle); var result = _cashRegister.GetOrderTotal(); result.IsEqualToPenny(15.90); }
public Starter() { InitializeComponent(); Pokemon Starter1 = new Pikachu("Pikachu"); SetStarters(Starter1, button1); Pokemon Starter2 = new Charmeleon("Charmeleon"); SetStarters(Starter2, button2); textBox1.Text = "player"; }
public void StartBattle() { Pikachu pika = new Pikachu("Pika"); Charmeleon charm = new Charmeleon("Charm"); //eerst valt pika charm aan label1.Text += "\r" + pika.name + " used " + pika.attacks[0].name + "\r" + charm.name + " health: " + charm.health; charm.Attacked(pika.attacks[0]); label1.Text += "\r" + charm.name + " health: " + charm.health; label1.Text += "\r" + charm.name + " used " + charm.attacks[1].name + "\r" + pika.name + " health: " + pika.health; pika.Attacked(charm.attacks[1]); label1.Text += "\r" + pika.name + " health: " + pika.health; }
public void NotAddPokemonToGroup_IfInGroup() { var pikachu = new Pikachu(); var pokemons = new List <IPokemon> { new Pikachu(), new Pikachu() }; _pokemonGrouper.AddPokemonToGroup(pikachu, pokemons); var numberOfPikachu = pokemons.Count(x => x.Name == pikachu.Name); numberOfPikachu.ShouldBeEquivalentTo(1); }
public ActionResult <dynamic> Create([FromBody] Pikachu entity) { //新增一隻皮卡丘 Pikachu pika = new Pikachu(); pika = entity; int code = 200; return(StatusCode(code, new { entity = pika })); }
public void Be1880WhenGiven_2Pikachu1Squirtle1Charmander() { var pikachu = new Pikachu(); var squirtle = new Squirtle(); var charmander = new Charmander(); _cashRegister.BuyManyPokemon(pikachu, 2); _cashRegister.BuyPokemon(squirtle); _cashRegister.BuyPokemon(charmander); var result = _cashRegister.GetOrderTotal(); result.IsEqualToPenny(18.80); }
public static void PokemonJourney() { //Object Instantiation Pikachu pikachu = new Pikachu(); Trainer ash = new Trainer("Ash", "Pallet Town", 0); Trainer defaultTrainer = new Trainer(); //Story ash.Speak(); Console.WriteLine("\n"); pikachu.WildPokemonAppears(); pikachu.Attack(); ash.CatchPokemon("Poke Ball", "Pikachu"); pikachu.HasType(); Console.WriteLine("Alright! I caught a Pikachu! I'm going to call you Sparky!"); pikachu.GivenName = "Sparky"; Console.WriteLine("\n"); Console.WriteLine($"Let's see what your Pokemon ID number is...oh, it's {pikachu.IdNumber}, got it!"); Console.WriteLine($"{pikachu.GivenName} joined Ash's team!\n"); Console.WriteLine("\n"); Console.WriteLine($"{pikachu.GivenName}, I'm going to give you some food to recover from our battle."); pikachu.Eats(); Console.WriteLine("Oh no! That was my last Oran Berry, but you're clearly still hungry. How about a Sitrus Berry?"); pikachu.FoodType = "Sitrus Berry"; pikachu.Eats(); Console.WriteLine("\n"); Console.WriteLine("Good! I'm glad you liked those Sitrus Berries! Now, let's teach you a stronger attack! Instead of Thunder Shock, you can now use Thunder Bolt!"); pikachu.AttackName = "Thunder Bolt"; pikachu.Attack(); Console.WriteLine("Now you've gotten the hang of it! Let's challenge a gym leader now!"); Console.WriteLine("\n"); defaultTrainer.Speak(); ash.ChallengeTrainer(defaultTrainer.TrainerName); Console.WriteLine($"Just wait a number there, {ash.TrainerName}. Firs I need to know what your trainer ID is to make sure it's valid. It must be between 2,000 and 20,000."); Console.WriteLine($"My trainer ID is {ash.TrainerID}. Happy now???"); Console.WriteLine("Yes, we can battle now! "); Console.WriteLine("\n"); defaultTrainer.AcceptChallenge(ash.TrainerName); Console.WriteLine("You'll never beat me and my bird Pokemon! Go. Pidgeotto!"); ash.ChoosePokemon(pikachu.GivenName); Console.WriteLine($"{pikachu.GivenName}, use that new move I showed you!"); pikachu.Attack(); Console.WriteLine($"Great hit, {pikachu.GivenName}! That super-effective move made {defaultTrainer.TrainerName}'s Pidgeotto faint! We won!"); Console.WriteLine($"Congratulations, {ash.TrainerName}. Let me give you a gym badge."); ash.NumberOfGymBadges = 1; Console.WriteLine($"Alright! Thanks for the great battle, {defaultTrainer.TrainerName}! I may only have {ash.NumberOfGymBadges} gym badge, but I will someday defeat the Elite Four with my best friend {pikachu.GivenName}!"); }
static void Main(string[] args) { // create my pokebag Pokebag myPokebag = new Pokebag(); // Create Carl the Pikachu, Charmeleon Hendrick the First etc Pikachu pikachu = new Pikachu("Carl"); Charmeleon charmeleon = new Charmeleon("Hendrick the First"); Charmeleon bro = new Charmeleon("Bro"); Pikachu pikachu2 = new Pikachu(); Console.WriteLine(Pokemon.GetPopulation()); Console.WriteLine(Pokemon.GetAverageHealth()); // yeah it all makes sense trust me Console.WriteLine( pikachu.Attack(pikachu.attacks[0], charmeleon) + charmeleon.Attack(charmeleon.attacks[0], pikachu) + pikachu2.Attack(pikachu2.attacks[0], charmeleon) + charmeleon.Attack(charmeleon.attacks[0], pikachu) + pikachu2.Attack(pikachu2.attacks[0], charmeleon) ); Console.WriteLine(Pokemon.GetPopulation()); Console.WriteLine(Pokemon.GetAverageHealth()); Console.WriteLine( myPokebag.AddPokemonToPokebag(pikachu) + myPokebag.AddPokemonToPokebag(charmeleon) + myPokebag.AddPokemonToPokebag(bro) + myPokebag.GetAllNamesFromPokebag() + myPokebag.RemoveOnePokemonFromPokebag("bro") + myPokebag.RemoveAllPokemonFromList() ); }
// for player from input , for enemy random public Pokemon ChooseStarterPokemon(int _choice) { PokemonType chosenPokemonType = Choose(/*PokemonType.NonValid,*/ PokemonType.Pikachu, PokemonType.Charmander, PokemonType.Bulbasaur, PokemonType.Squirtle, _choice); switch (chosenPokemonType) { case PokemonType.Bulbasaur: Bulbasaur newBulbasaur = new Bulbasaur(20, 100); return(newBulbasaur); case PokemonType.Charmander: Charmander newCharmender = new Charmander(20, 100); return(newCharmender); case PokemonType.Pikachu: Pikachu newPikachu = new Pikachu(20, 100); return(newPikachu); case PokemonType.Squirtle: default: Squirtle newSquirtle = new Squirtle(20, 100); return(newSquirtle); } }
public override void Start() { pokemon = new Pikachu(); Init(); }
public IActionResult Reset() { Pika = new Pikachu(); return(RedirectToAction("Index")); }