Skip to content

Commit

Permalink
Merge pull request #14 from BME-MIT-IET/unit_test
Browse files Browse the repository at this point in the history
Unit test
  • Loading branch information
CRLJQ8 authored May 22, 2024
2 parents 0c3bacd + 691c70d commit 5080094
Show file tree
Hide file tree
Showing 34 changed files with 2,108 additions and 579 deletions.
1 change: 0 additions & 1 deletion Drumakomi_sivatag/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,4 @@
</plugin>
</plugins>
</build>

</project>
645 changes: 340 additions & 305 deletions Drumakomi_sivatag/src/main/java/Game.java

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Drumakomi_sivatag/src/main/java/Mechanic.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public Mechanic(int id,int cm,Element e){
public int getPumpes() {
return pumpes;
}

public void setPumpes(int pumpesnumber) {
this.pumpes = pumpesnumber;
}

/**
* A pumpnak amin a szerelo al allitja at az inputjat es outputjat
* @param i Az elemnek amin allunk az i-edik szomszedja
Expand Down
30 changes: 17 additions & 13 deletions Drumakomi_sivatag/src/main/java/Mountains.java
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
/**
* Ahonnan folyik a jatek soran a viz (kezdoallomas)
*/
//Csaba
// Csaba
public class Mountains extends Node {

/**
* Konstruktor
*/
public Mountains() {
//PipeSystem.getViews().put(this, new MountainsView());
// PipeSystem.getViews().put(this, new MountainsView());
}

/**
* Segitsegevel a Mountains class, illetve a fuggvenyei az ido fuggvenyeben kepesek
* Segitsegevel a Mountains class, illetve a fuggvenyei az ido fuggvenyeben
* kepesek
* cselekedni
*/
@Override
public void TimerNotify(){
counter=1;
public void TimerNotify() {
counter = 1;
this.Path(null);
}

/**
* Meghivja a kovetkezo elem Path-jet (a viz folyasat hivatott jelezni).
*
* @param e - A cso ahonnan jon a viz
*/
public void Path(Element e){
if(counter==1) {
public void Path(Element e) {
if (counter == 1) {
System.out.println("Mountains");
counter++;
for (Element neighbour : this.neighbours) {
if(neighbour!=null){
if (neighbour != null) {
neighbour.Path(this);
}
}
}
}

/**
*
* Mountainsrol kiirja a fontosabb adatokat
*/
public void Info(){
*
* Mountainsrol kiirja a fontosabb adatokat
*/
public void Info() {
System.out.println("Mountains info:");
System.out.println("Hozza kapcsolodo csovek szama: " + this.neighbours.size());
super.Info();
}

/**
* Visszaadja a benne talalhato vizet.
*
* @return Integer.MAX_VALUE
*/
public int GetStorage() {
Expand All @@ -57,10 +61,10 @@ public int GetStorage() {
/**
* Felul irja az elment SetStorage-et.
* Azert nem csinal semmit, mert vegtelen sok viz van benne minden idopontban.
*
* @param n Az uj storage ertek
*/
public void SetStorage(int n) {
// Mivel vegtelen sok viz van benne minden idopontban, itt nincs ertelme allitani a vizmennyiseget.
}
}

Loading

0 comments on commit 5080094

Please sign in to comment.