mirror of
https://inf.pirckheimer-gymnasium.de/kebab/kebab
synced 2026-08-26 16:31:23 +00:00
Beautify code
This commit is contained in:
@@ -9,7 +9,6 @@ public class Ordersystem {
|
|||||||
private int waitingCustomers = 0;
|
private int waitingCustomers = 0;
|
||||||
private int totalEarned = 0;
|
private int totalEarned = 0;
|
||||||
|
|
||||||
|
|
||||||
public int getMoney(){
|
public int getMoney(){
|
||||||
return money;
|
return money;
|
||||||
}
|
}
|
||||||
@@ -17,9 +16,11 @@ public class Ordersystem {
|
|||||||
public int getKebabSold(){
|
public int getKebabSold(){
|
||||||
return kebabSold;
|
return kebabSold;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKebabPrice(int price){
|
public void setKebabPrice(int price){
|
||||||
kebabPrice = price;
|
kebabPrice = price;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean buyUpgrade() {
|
public boolean buyUpgrade() {
|
||||||
int cost = (upgradeLevel + 1) * 50;
|
int cost = (upgradeLevel + 1) * 50;
|
||||||
|
|
||||||
@@ -38,7 +39,6 @@ public class Ordersystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean buyWorker() {
|
public boolean buyWorker() {
|
||||||
|
|
||||||
int cost = getWorkerCost();
|
int cost = getWorkerCost();
|
||||||
|
|
||||||
if(money >= cost) {
|
if(money >= cost) {
|
||||||
@@ -51,10 +51,8 @@ public class Ordersystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getWorkers() {
|
public int getWorkers() {
|
||||||
return workers;
|
return workers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void addCustomer() {
|
public void addCustomer() {
|
||||||
waitingCustomers++;
|
waitingCustomers++;
|
||||||
@@ -67,11 +65,9 @@ public class Ordersystem {
|
|||||||
totalEarned += kebabPrice;
|
totalEarned += kebabPrice;
|
||||||
kebabSold++;
|
kebabSold++;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTotalIncome() {
|
public int getTotalIncome() {
|
||||||
@@ -79,7 +75,6 @@ public class Ordersystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getWaitingCustomers() {
|
public int getWaitingCustomers() {
|
||||||
|
|
||||||
return waitingCustomers;
|
return waitingCustomers;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,8 +96,5 @@ public class Ordersystem {
|
|||||||
sellKebab();
|
sellKebab();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user