From 3a981d068f40c9e620b7fce5d2cc1f977c0df357 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Fri, 22 Nov 2024 12:21:29 +0100 Subject: [PATCH] Pokemon start --- Emne 3/Pokemon/Program.cs | 13 ++++++++++++- Emne 3/Pokemon/pokemon.cs | 7 +++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Emne 3/Pokemon/pokemon.cs diff --git a/Emne 3/Pokemon/Program.cs b/Emne 3/Pokemon/Program.cs index 5f28270..d94f691 100644 --- a/Emne 3/Pokemon/Program.cs +++ b/Emne 3/Pokemon/Program.cs @@ -1 +1,12 @@ - \ No newline at end of file +namespace Pokemon +{ + class Program + { + static void Main(string[] args) + { + var pikachu = new Pikachu(); + Console.WriteLine($"Pikachu har {Pikachu.Health}hp og er level {Pikachu.Level}"); + } + } +} + diff --git a/Emne 3/Pokemon/pokemon.cs b/Emne 3/Pokemon/pokemon.cs new file mode 100644 index 0000000..7e9a4d7 --- /dev/null +++ b/Emne 3/Pokemon/pokemon.cs @@ -0,0 +1,7 @@ +namespace Pokemon; + + public class Pikachu +{ + internal static int Health = 50; + internal static int Level = 21; +} \ No newline at end of file