Skip to content
Snippets Groups Projects
Commit bd002f83 authored by tildiko97's avatar tildiko97
Browse files

AbstractField, Crate, Direction, Hole JavaDoc megírása

parent b5ec68e0
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ public abstract class AbstractField {
}
/**
* A paraméterül kapott View-n meghívja annak drawAbstract() függvényét
* Kirajzolásért felelős függvény
* @param view A grafikus felület elemeinek megjelenítéséért felelős View osztály példánya
*/
public void shouldDraw(View view)
......
......@@ -40,12 +40,18 @@ public class Crate extends Moveable {
s.turnOn();
}
/**
* Kiírja az adattagokat
*/
public void printStat()
{
super.printStat();
System.out.println("isOnTarget: " + isOnTarget);
}
/**
* A láda kirajzolásáért felelős
*/
@Override
public void shouldDraw(View view)
{
......@@ -62,5 +68,9 @@ public class Crate extends Moveable {
Main.deleteCrate(this);
}
/**
* Azt adja vissza, hogy a láda szempontjából befejeződhet-e a játék, azaz hogy nem közvetlenül tolható vagy célmezőn van-e.
* @return
*/
public boolean couldGameFinish() {return isOnTarget;}
}
......@@ -20,6 +20,11 @@ public enum Direction {
return ID;
}
/**
* Kap egy számot és megmondja az ahhoz tartozó irányt
* @param num egy szám
* @return irányt ad vissza
*/
public static Direction Dir(int num)
{
switch (num)
......@@ -30,6 +35,8 @@ public enum Direction {
default : return DOWN;
}
}
public static Direction fromString(String dir)
{
switch (dir)
......@@ -40,6 +47,11 @@ public enum Direction {
default : return DOWN;
}
}
/**
* Az ellentétes irányt adja vissza
* @return
*/
public Direction opposite()
{
switch (this)
......
......@@ -18,6 +18,9 @@ public class Hole extends SimpleField {
return true;
}
/**
* Lyuk rajzolásáért felelős
*/
@Override
public void shouldDraw(View view)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment