This repository has been archived by the owner on Sep 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,45 @@ namespace Beadando | |
{ | ||
internal class Hajo | ||
{ | ||
public int X { get; set; } | ||
This comment has been minimized.
Sorry, something went wrong. |
||
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 comment has been minimized.
Sorry, something went wrong.
webmaster442
Contributor
|
||
{ | ||
this.Tipus = tipus; | ||
} | ||
} | ||
public int GetTipus() { return this.Tipus; } | ||
public Boolean HajoKoordinataE(int x, int y) | ||
{ | ||
if (x == X && y == Y) | ||
This comment has been minimized.
Sorry, something went wrong.
webmaster442
Contributor
|
||
{ | ||
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 | ||
} | ||
} | ||
} |
Mivel van paraméteres konstruktora az osztálynak, ezért a
set;
tag elhagyható