From a9d00c607e72f9d79f79b6380db42c9de83481f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mih=C3=A1ly=20P=C3=A1l?= Date: Sat, 23 Apr 2022 14:57:28 +0200 Subject: [PATCH] =?UTF-8?q?Haj=C3=B3=20oszt=C3=A1ly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Torpedo/Beadando/Hajo.cs | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/MihalyPal_HorvathKrisztian/Torpedo/Beadando/Hajo.cs b/MihalyPal_HorvathKrisztian/Torpedo/Beadando/Hajo.cs index c763f74..11b75e4 100644 --- a/MihalyPal_HorvathKrisztian/Torpedo/Beadando/Hajo.cs +++ b/MihalyPal_HorvathKrisztian/Torpedo/Beadando/Hajo.cs @@ -8,8 +8,45 @@ namespace Beadando { internal class Hajo { + public int X { get; set; } + public int Y { get; set; } + + private int Tipus; + public int Eletero { get; set; } + + public Hajo(int x, int y, int tipus, int eletero) + { + X = x; + Y = y; + Tipus = tipus; + Eletero = eletero; + + } + public Hajo() + { + + } + public void SetTipus(int tipus) + { + if (tipus >= 2 && tipus <= 5) + { + this.Tipus = tipus; + } + } + public int GetTipus() { return this.Tipus; } + public Boolean HajoKoordinataE(int x, int y) + { + if (x == X && y == Y) + { + return true; + } + else + { + return false; + } + } //Attributumai egy x és y kezdőérték //tipusa: 2,3,4,5 //életerő: ami kezdetben a típussal egyezik meg de ez csökken } -} +} \ No newline at end of file