Conflicts:
	src/de/teamteamteam/spacescooter/gui/Credits.java
This commit is contained in:
Sosch 2014-11-11 14:28:13 +01:00
commit c0b62d59ac
1 changed files with 32 additions and 1 deletions

View File

@ -1,16 +1,47 @@
package de.teamteamteam.spacescooter.gui;
/**
* Static class accounting the credits a player earned during the game.
*/
public class Credits {
/**
* Credit points for the shop
*/
private static int credits = 1000;
/**
* Private constructor.
*/
private Credits() { }
/**
* Get the current amount of credits.
*/
public static int getCredits() {
return credits;
}
/**
* Set the current amount of credits.
*/
public static void setCredits(int credits) {
Credits.credits = credits;
}
/**
* Add a number of credits to the credits account.
*/
public static void add(int credits) {
Credits.credits += credits;
}
/**
* Remove a number of credits to the credits account.
*/
public static void remove(int credits) {
Credits.credits -= credits;
}
}