Android Open Source - diploma-assignment Battle Player






From Project

Back to project page diploma-assignment.

License

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.

Java Source Code

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;
  }
}




Java Source Code List

com.me.battlescreen.BallistaArrow.java
com.me.battlescreen.Ballista.java
com.me.battlescreen.BattlePlayer.java
com.me.battlescreen.BattleScreen.java
com.me.battlescreen.Bot.java
com.me.battlescreen.Castle.java
com.me.battlescreen.CleanBackground.java
com.me.battlescreen.ComputerPlayer.java
com.me.battlescreen.Constants.java
com.me.battlescreen.HumanPlayer.java
com.me.battlescreen.Monster.java
com.me.battlescreen.MyButton.java
com.me.battlescreen.MyLabel.java
com.me.battlescreen.OpponentMonster.java
com.me.battlescreen.PlayerMonster.java
com.me.battlescreen.TimeLabel.java
com.me.battlescreen.UnitButton.java
com.me.battlescreen.getTextures.java
com.me.battlescreen.iAttacking.java
com.me.battlescreen.iHittable.java
com.me.battlescreen.iUpdateable.java
com.me.main.MyGame.java
com.me.main.Player.java
com.me.mygdxgame.MainActivity.java
com.me.openingscreen.AbstractMenu.java
com.me.openingscreen.Constants.java
com.me.openingscreen.FirstMenu.java
com.me.openingscreen.FloatingBackground.java
com.me.openingscreen.OpeningScreen.java
com.me.openingscreen.PlayerMenu.java
com.me.openingscreen.ResetMenu.java
com.me.openingscreen.StatisticsMenu.java
com.me.openingscreen.UpgradeButton.java
com.me.openingscreen.UpgradeMenu.java