PokemonGameLib 1.0.0-beta.1.3.0

This is a prerelease version of PokemonGameLib.
There is a newer version of this package available.
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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PokemonGameLib" Version="1.0.0-beta.1.3.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PokemonGameLib --version 1.0.0-beta.1.3.0                
#r "nuget: PokemonGameLib, 1.0.0-beta.1.3.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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 123 8/19/2024
8.1.0-release 114 8/19/2024
8.0.0-Release 97 8/11/2024
8.0.0-alpha 77 8/4/2024
1.0.0-beta.1.3.0 53 8/2/2024
1.0.0-beta.1.2.1 54 7/25/2024
1.0.0-beta.1.2 52 7/25/2024
1.0.0-beta.1.1 56 7/22/2024
1.0.0-beta.1 61 7/20/2024