PokemonGameLib 1.0.0-beta.1.3.0
See the version list below for details.
dotnet add package PokemonGameLib --version 1.0.0-beta.1.3.0
NuGet\Install-Package PokemonGameLib -Version 1.0.0-beta.1.3.0
<PackageReference Include="PokemonGameLib" Version="1.0.0-beta.1.3.0" />
paket add PokemonGameLib --version 1.0.0-beta.1.3.0
#r "nuget: PokemonGameLib, 1.0.0-beta.1.3.0"
// Install PokemonGameLib as a Cake Addin #addin nuget:?package=PokemonGameLib&version=1.0.0-beta.1.3.0&prerelease // Install PokemonGameLib as a Cake Tool #tool nuget:?package=PokemonGameLib&version=1.0.0-beta.1.3.0&prerelease
PokemonGameLib
PokemonGameLib is a .NET library designed for creating and managing a Pokémon game. It provides essential classes and functionality for building a Pokémon game, including features for Pokémon, moves, Trainers, and battles.
Installation
You can install the library via NuGet. Run the following command in your project directory:
dotnet add package PokemonGameLib
Usage
Here’s a quick example of how to use PokemonGameLib in your project:
1. Create a Pokémon
using PokemonGameLib.Models;
var pikachu = new Pokemon("Pikachu", PokemonType.Electric, 10, 100, 55, 40);
2. Access Pokémon Properties
Console.WriteLine($"Name: {pikachu.Name}");
Console.WriteLine($"Type: {pikachu.Type}");
Console.WriteLine($"HP: {pikachu.HP}");
Console.WriteLine($"Attack: {pikachu.Attack}");
Console.WriteLine($"Defense: {pikachu.Defense}");
3. Add Moves to Pokémon
var thunderbolt = new Move("Thunderbolt", PokemonType.Electric, 90, 10);
pikachu.AddMove(thunderbolt);
4. Create Trainers
var ash = new Trainer("Ash");
ash.AddPokemon(pikachu);
var charizard = new Pokemon("Charizard", PokemonType.Fire, 10, 150, 70, 50);
var brock = new Trainer("Brock");
brock.AddPokemon(charizard);
5. Setup a Battle
var battle = new Battle(ash, brock);
battle.PerformAttack(ash, thunderbolt);
6. Determine Battle Result
var result = battle.DetermineBattleResult();
Console.WriteLine(result);
Trainer Class
The Trainer
class represents a Pokémon Trainer and manages their Pokémon team. Here's how you can use it:
Create a Trainer
var trainer = new Trainer("TrainerName");
Add Pokémon to Trainer
var pokemon = new Pokemon("Pikachu", PokemonType.Electric, 10, 100, 55, 40);
trainer.AddPokemon(pokemon);
Access Pokémon of a Trainer
var trainerPokemons = trainer.Pokemons;
- Name: Mads Ludvigsen
- Email: [Mads72q2@edu.zealand.dk]
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.1.0 | 117 | 8/19/2024 |
8.1.0-release | 110 | 8/19/2024 |
8.0.0-Release | 96 | 8/11/2024 |
8.0.0-alpha | 77 | 8/4/2024 |
1.0.0-beta.1.3.0 | 49 | 8/2/2024 |
1.0.0-beta.1.2.1 | 54 | 7/25/2024 |
1.0.0-beta.1.2 | 50 | 7/25/2024 |
1.0.0-beta.1.1 | 56 | 7/22/2024 |
1.0.0-beta.1 | 57 | 7/20/2024 |