Back to project page diploma-assignment.
The source code is released under:
MIT License
If you think the Android project diploma-assignment listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.me.battlescreen; //from ww w. j av a 2 s. c o m public abstract class BattlePlayer { protected int maxMana; protected int manaReg; protected int currMana; protected int[] upList; protected int[] unlockedList; BattlePlayer(int maxM,int manaR,int[] unL,int[] upL){ maxMana=maxM; manaReg=manaR; currMana=0; upList=upL; unlockedList=unL; } public void increaseCurrMana(int m) { if(m<0) return; if(currMana+m>maxMana) currMana = maxMana; else currMana+=m; } public boolean decreaseCurrMana(int m) { if(m<0) return false; if(currMana-m>=0){ currMana -= m; return true; } return false; } public int getCurrMana() { return currMana; } public int getManaReg() { return manaReg; } public final int[] getUpList() { return upList; } public final int[] getUnlockedList() { return unlockedList; } }