I want this gamification module beefed all the fuckin way up

owly

闇の伝説
Staff member
戦闘 コーダー
Java:
public class AXGamification {
    // this auxiliary module can add fun to tasks, skills, and abilities simply by
    // tracking their usage, and maximum use count.
    private int counter = 0;
    private int max = 0;

    public int getCounter() {
        return counter;
    }

    public int getMax() {
        return max;
    }
    public void resetCount(){
        counter = 0;
    }
    public void resetAll(){
        max = 0;
        counter = 0;
    }
    public void increment(){
        counter++;
        if (counter > max) {
            max = counter;
        }
    }
}

shiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiieeet :s1:
 

fukurou

the supreme coder
ADMIN
Java:
public class AXGamification {
    // this auxiliary module can add fun to tasks, skills, and abilities simply by
    // tracking their usage, and maximum use count.
    private int counter = 0;
    private int max = 0;

    public int getCounter() {
        return counter;
    }

    public int getMax() {
        return max;
    }
    public void resetCount(){
        counter = 0;
    }
    public void resetAll(){
        max = 0;
        counter = 0;
    }
    public void increment(){
        counter++;
        if (counter > max) {
            max = counter;
        }
    }
    public void incrementBy(int n){
        counter+= n;
        if (counter > max) {
            max = counter;
        }
    }
    public Boolean reward(int cost){
        // game grind points used for rewards
        // consumables, items or upgrades this makes games fun
        if (cost>counter){return false;}
        counter-=cost;
        return true;
    }
}

HBU do the rest :s61:
 

fukurou

the supreme coder
ADMIN
Python:
class AXGamification:
    # this auxiliary module can add fun to tasks, skills, and abilities simply by
    # tracking their usage, and maximum use count.
    def __init__(self):
        self._counter: int = 0
        self._max: int = 0

    def getCounter(self) -> int:
        return self._counter

    def getMax(self) -> int:
        return self._max

    def resetCount(self):
        self._counter = 0

    def resetAll(self):
        self._counter = 0
        self._max = 0

    def increment(self):
        self._counter += 1
        if self._counter > self._max:
            self._max = self._counter

    def incrementBy(self, n: int):
        self._counter += n
        if self._counter > self._max:
            self._max = self._counter

    def reward(self, cost: int) -> bool:
        # game grind points used for rewards
        # consumables, items or upgrades this makes games fun
        if cost < self._counter:
            self._counter -= cost
            return True
        return False
 

fukurou

the supreme coder
ADMIN
Swift:
class AXGamification{
    // this auxiliary module can add fun to tasks, skills, and abilities simply by
    // tracking their usage, and maximum use count.
    private var counter:Int = 0
    private var max:Int = 0
    func getCounter()->Int{
        return counter
    }
    func getMax()->Int{
        return max
    }
    func resetCounter(){
        counter = 0
    }
    func resetAll(){
        counter = 0; max = 0
    }
    func increment(){
        counter += 1
        if counter > max{
            max = counter
        }
    }
    func incrementBy(amount:Int){
        counter += amount
        if counter > max{
            max = counter
        }
    }
    func reward(cost:Int)->Bool{
        // game grind points used for rewards
        // consumables, items or upgrades this makes games fun
        if cost > counter{return false}
        counter -= cost
        return true
    }
}
 
Top