Android Open Source - Fruity-Bang Account






From Project

Back to project page Fruity-Bang.

License

The source code is released under:

MIT License

If you think the Android project Fruity-Bang listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package Model;
/*  ww  w .  jav  a2  s  .  c om*/
/**
 * @author Thong
 */
public class Account {

    public static final int STRAWBERRY = 1;
    public static final int APPLE = 2;
    private int capacity = 1;
    private int power = 1;
    private int money = 0;
    private int fruit = APPLE;
    private long score = 0;
    private boolean shield;

    public Account() {
        reset();
    }

    public final void reset() {
        capacity = 1;
        power = 1;
        shield = false;
        fruit = APPLE;
    }

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public void addScore(int score) {
        this.score += score;
    }

    public int getFruit() {
        return fruit;
    }

    public String getFruitString() {
        if (fruit == APPLE) {
            return "Apple";
        } else {
            return "Strawberry";
        }
    }

    public void setFruit(int fruit) {
        this.fruit = fruit;
    }

    public boolean isShield() {
        return shield;
    }

    public void setShield(boolean shield) {
        this.shield = shield;
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        this.score = score;
    }
}




Java Source Code List

GameController.BushGhost.java
GameController.CharGhost.java
GameController.SaGhost.java
GameController.WormGhost.java
Game.GameConstant.java
Game.Game.java
Game.Home.java
Game.MapGenerator.java
GameModel.Bush.java
GameModel.Coin.java
GameModel.CuteModel.java
GameModel.Explosion.java
GameModel.Fruit.java
GameModel.Rock.java
GameModel.Ruby.java
GameModel.Sa.java
GameModel.Win.java
GameModel.Worm.java
Game.Scene.java
Game.Store.java
Model.Account.java
vn.edu.rmit.fruitybang.GameActivity.java
vn.edu.rmit.fruitybang.LoadingAsyncTask.java
vn.edu.rmit.fruitybang.MainActivity.java
vn.edu.rmit.fruitybang.SelectionFragment.java
vn.edu.rmit.fruitybang.SplashFragment.java