diff --git a/app/src/main/java/com/example/proj2/Classes/Ability.java b/app/src/main/java/com/example/proj2/Classes/Ability.java index 1c6d48a..d6a89bc 100644 --- a/app/src/main/java/com/example/proj2/Classes/Ability.java +++ b/app/src/main/java/com/example/proj2/Classes/Ability.java @@ -43,6 +43,7 @@ public int getRank() { ArrayList ratioBAD = null; ArrayList ratioAD = null; ArrayList ratioAP = null; + public Ability(){ Name = "PlaceHolder"; this.damageType = 0; @@ -262,6 +263,11 @@ public void setRatioAP(ArrayList ratioAP) { this.ratioAP = ratioAP; } + /** + * + * @param champ + * @return + */ public double returnDamage(Champion champ){ Log.d("Working on Abi", Name); Log.d("Working on Abi", String.valueOf(rank)); @@ -276,6 +282,12 @@ public double returnDamage(Champion champ){ } return 0; } + + /** + * + * @param champ + * @return + */ public double returnADDamage(Champion champ){ Log.d("Working on Abi", Name); Log.d("Working on Abi", String.valueOf(rank)); @@ -290,6 +302,12 @@ public double returnADDamage(Champion champ){ } return 0; } + + /** + * + * @param champ + * @return + */ public double returnAPDamage(Champion champ){ Log.d("Working on Abi", Name); Log.d("Working on Abi", String.valueOf(rank)); @@ -304,6 +322,12 @@ public double returnAPDamage(Champion champ){ } return 0; } + + /** + * + * @param champ + * @return + */ public double returnTrueDamage(Champion champ){ Log.d("Working on Abi", Name); Log.d("Working on Abi", String.valueOf(rank)); @@ -318,18 +342,36 @@ public double returnTrueDamage(Champion champ){ } return 0; } + + /** + * + * @param champ + * @return + */ public double returnDOT(Champion champ){ if(isDOT == true){ return dotDamage.get(rank-1)*duration/perSecond; } return 0; } + + /** + * + * @param champ + * @return + */ public double returnMaxHPDOT(Champion champ){ if(isMaxHP == true){ return dotDamage.get(rank-1)*duration/perSecond; } return 0; } + + /** + * + * @param champ + * @return + */ public double returnSummonDamage(Champion champ){ if(isSummon == true){ return summonAA.get(rank-1); diff --git a/app/src/main/java/com/example/proj2/Classes/Champion.java b/app/src/main/java/com/example/proj2/Classes/Champion.java index 194ecae..e8ffa84 100644 --- a/app/src/main/java/com/example/proj2/Classes/Champion.java +++ b/app/src/main/java/com/example/proj2/Classes/Champion.java @@ -234,6 +234,10 @@ public double getAttackSpeedPerLevel() { return attackSpeedPerLevel; } + /** + * returnCombineDamage + * @return + */ public double returnCombineDamage(){ double qDamage = abilities.get(0).returnDamage(this); double wDamage = abilities.get(1).returnDamage(this); @@ -242,6 +246,11 @@ public double returnCombineDamage(){ //Log.d("Combine Dmg" ,String.valueOf(getBaseDamage() + qDamage + wDamage + eDamage+ rDamage)); return getBaseDamage()+ getDamagePerLevel()* getLevel() + qDamage + wDamage + eDamage+ rDamage; } + + /** + * returnADDamage + * @return + */ public double returnADDamage(){ double qDamage = abilities.get(0).returnADDamage(this); double wDamage = abilities.get(1).returnADDamage(this); @@ -258,6 +267,11 @@ public double returnAPDamage(){ //Log.d("AP Dmg" ,String.valueOf(getBaseDamage() + qDamage + wDamage + eDamage+ rDamage)); return qDamage + wDamage + eDamage+ rDamage; } + + /** + * returnTrueDamage + * @return + */ public double returnTrueDamage(){ double qDamage = abilities.get(0).returnAPDamage(this); double wDamage = abilities.get(1).returnAPDamage(this); diff --git a/app/src/main/java/com/example/proj2/Classes/ChampionViewModel.java b/app/src/main/java/com/example/proj2/Classes/ChampionViewModel.java index 63791f2..f4d3300 100644 --- a/app/src/main/java/com/example/proj2/Classes/ChampionViewModel.java +++ b/app/src/main/java/com/example/proj2/Classes/ChampionViewModel.java @@ -37,6 +37,12 @@ enum qwer{Qability,Wability,Eability,Rability}; public LiveData getChampion() { return championData; } + + /** + * + * @param context + * @param championName + */ public void fetchChampionData(Context context, String championName) { if (queue == null) { queue = Volley.newRequestQueue(context); diff --git a/app/src/main/java/com/example/proj2/FirstFragment.java b/app/src/main/java/com/example/proj2/FirstFragment.java index f52ae88..cb47909 100644 --- a/app/src/main/java/com/example/proj2/FirstFragment.java +++ b/app/src/main/java/com/example/proj2/FirstFragment.java @@ -12,7 +12,9 @@ import com.example.proj2.databinding.FragmentFirstBinding; import com.google.firebase.firestore.FirebaseFirestore; -// Defining the FirstFragment class that extends Fragment +/** + * Defining the FirstFragment class that extends Fragment + */ public class FirstFragment extends Fragment { private static final String TAG = FirstFragment.class.getSimpleName(); // TAG for logging @@ -28,7 +30,12 @@ public View onCreateView( return binding.getRoot(); } - // Method called after the view has been created + /** + * + * @param view The View returned by {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}. + * @param savedInstanceState If non-null, this fragment is being re-constructed + * from a previous saved state as given here. + */ public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); @@ -47,8 +54,9 @@ public void onClick(View view) { Navigation.findNavController(view).navigate(R.id.action_FirstFragment_to_SecondFragment, result); } }); - - // Similar click listeners for other champion buttons +/** + * Similar click listeners for other champion buttons + */ // Garen view.findViewById(R.id.GarenButton2).setOnClickListener(new View.OnClickListener() { @Override diff --git a/app/src/main/java/com/example/proj2/ItemSelectionActivity.java b/app/src/main/java/com/example/proj2/ItemSelectionActivity.java index 8251fa5..860b174 100644 --- a/app/src/main/java/com/example/proj2/ItemSelectionActivity.java +++ b/app/src/main/java/com/example/proj2/ItemSelectionActivity.java @@ -21,7 +21,9 @@ import com.google.firebase.firestore.DocumentReference; import com.google.firebase.firestore.FirebaseFirestore; -// Defining the ItemSelectionActivity class that extends AppCompatActivity +/** + * Defining the ItemSelectionActivity class that extends AppCompatActivity + */ public class ItemSelectionActivity extends AppCompatActivity { // Initialize Firestore database reference diff --git a/app/src/main/java/com/example/proj2/LoginActivity.java b/app/src/main/java/com/example/proj2/LoginActivity.java index ac07fe5..854cced 100644 --- a/app/src/main/java/com/example/proj2/LoginActivity.java +++ b/app/src/main/java/com/example/proj2/LoginActivity.java @@ -22,7 +22,9 @@ import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; - +/** + * Extended LoginActivity Class + */ public class LoginActivity extends AppCompatActivity { private FirebaseAuth mFirebaseAuth; private DatabaseReference mDatabaseRef; diff --git a/app/src/main/java/com/example/proj2/RegisterActivity.java b/app/src/main/java/com/example/proj2/RegisterActivity.java index 76bf5c3..e16389e 100644 --- a/app/src/main/java/com/example/proj2/RegisterActivity.java +++ b/app/src/main/java/com/example/proj2/RegisterActivity.java @@ -21,6 +21,9 @@ import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; +/** + * RegisterActivity extends + */ public class RegisterActivity extends AppCompatActivity { private FirebaseAuth mFirebaseAuth; diff --git a/app/src/main/java/com/example/proj2/SecondFragment.java b/app/src/main/java/com/example/proj2/SecondFragment.java index 61b1cf4..a6cb2c9 100644 --- a/app/src/main/java/com/example/proj2/SecondFragment.java +++ b/app/src/main/java/com/example/proj2/SecondFragment.java @@ -25,6 +25,9 @@ import com.example.proj2.Classes.ItemViewModel; import com.example.proj2.databinding.FragmentSecondBinding; +/** + * Defining the SecondFragment class that extends Fragment + */ public class SecondFragment extends Fragment { private FragmentSecondBinding binding; diff --git a/app/src/main/java/com/example/proj2/UserAccount.java b/app/src/main/java/com/example/proj2/UserAccount.java index fca7f9b..4051021 100644 --- a/app/src/main/java/com/example/proj2/UserAccount.java +++ b/app/src/main/java/com/example/proj2/UserAccount.java @@ -1,5 +1,8 @@ package com.example.proj2; // Package declaration indicating the location of the class +/** + * UserAccount Class + */ public class UserAccount { private String emailId; // Private field to store the user's email ID private String password; // Private field to store the user's password