aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/miz_hi/smileessence/util/CountUpInteger.java
blob: d6a5f485ab7914aaa1b37378617d9c8287dd0328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package net.miz_hi.smileessence.util;

public class CountUpInteger
{

    private int count = 0;
    private int maxCount;

    public CountUpInteger(int maxCount)
    {
        this.maxCount = maxCount;
    }

    public boolean countUp()
    {
        count++;
        return isOver();
    }

    public boolean isOver()
    {
        return count >= maxCount;
    }

    public void reset()
    {
        count = 0;
    }

}