Skip to content

Commit

Permalink
UI Changes - Frags to Acts (#40)
Browse files Browse the repository at this point in the history
* Fixed the rest of the code to work with the changes.

* Added helper methods for EquipmentDB. (Weapon, Armor, Equipment)

* Fixed InventoryAdapter for Equipment Change

* Refactored some code to fix serialization issues. (mWeaponType -> mIsMelee)

* Fixed inventory fragment after the weapon change.

* Added an message for the inventory screen explaining what to do.

* Added resource values for magician classes' talents.

* Magician's talent will now be displayed. (Fixes #14)

* Made getPowerPoints abstract.

* Fixed #38

* Added a method to reset the data.

* Fixed the portfolio reset.

* Added the function to reset the EquipmentDB. Fixed #44

* Added backstack features.

* Fixed #40

* Moved clearBackStack to Util class.

* Added the inventory screen. (Fixed #6)

* Fixed issue of stuff showing after clearing the back stack

* Added a comparator for AttributeScore(s).

* Updated gradle to 4.1.1.

* Created AttributePriorityDialog along with its layout.
Also, hotfixed some errors in the .xml files.

* Added ids to each of the attribute spinners.

* Made Score serializable.

* Implemented a rough version of the AttributeScorePriority dialog into createCharacter.
* Reroll was also implemented into the createCharacter.

* Added a contains method to Util.

* Added new value to CommonStrings

* Fixed issue where the attributes wouldn't be ordered properly when the
AttributePriorityDialog was restored.

* Fixed #51

* Cleaned up the AttributePriorityDialog visually. (Fixed #52)

* The elements now go directly into the adapter. (Fixed #51)

* CharacterSheetFragment has now been converted to an Activity.

* Added the google repo to the gradle script because of gradle 3.0.0

* Renamed CharacterSheetFragment to CharacterSheetActivity.

* Created CharacterManageActivity.

* Brought CharacterSheetActivity up to snuff.

* Created and added functionality for CharManageFragment.

* Made PlayerCharacter serializeable (again...)

* Added a seperate activity that combines the functions of CharacterSelection and ChracterDeletion.

* Fixed the nav menu drawer to work with the new Activity.

* Marked both of the combined fragments as depricated.

* Bugfix: reroll not doing anything.

* Converted ChracterSheet back to a fragment and made a new container activity.

* Changed how MainMazes handling of navMenu items being selected.

* Bugfix: Rerolls wouldn't be displayed in the GUI.

* Bugfix: CreateCharacter still thought that CharacterSheet was an activity.

* CharacterSheetFragment has now been converted to an Activity.

* Added the google repo to the gradle script because of gradle 3.0.0

* Renamed CharacterSheetFragment to CharacterSheetActivity.

* Created CharacterManageActivity.

* Brought CharacterSheetActivity up to snuff.

* Created and added functionality for CharManageFragment.

* Made PlayerCharacter serializeable (again...)

* Added a seperate activity that combines the functions of CharacterSelection and ChracterDeletion.

* Fixed the nav menu drawer to work with the new Activity.

* Marked both of the combined fragments as depricated.

* Bugfix: reroll not doing anything.

* Converted ChracterSheet back to a fragment and made a new container activity.

* Changed how MainMazes handling of navMenu items being selected.

* Bugfix: Rerolls wouldn't be displayed in the GUI.

* Bugfix: CreateCharacter still thought that CharacterSheet was an activity.

* Converted RadioGroups to LinearLayouts and RadioButtons to Buttons.

* Implemented the onClick listeners for the buttons.

* Hotfix: Fixed #54

* Added new field to BaseClasses called mHitsImprove, and added LUCK_IMPROVE

* Removed the Level interface.

* Added a shortcut method for adding to score.

* Moved doLevelUp to BaseClass, generified it to work with all subclasses.

* Added a note in Priest.

* Added the dialog for experience.

* Added a helper method for adding experience

* Added an click event for opening Experience Dialog. Also cleaned up.

* Corrected error in updateLevel.

* Added functionality for the experience dialog.

* Converted from strings to text resources.

* Added a dialog in order to select stat to improve for level up.
(LevelStatSelectDialogFragment)

* Added functionality for the LevelUpButton and added some comments as well.

* Called updateGUI rather than update manually.

* Removed the listener interface, added ability to select a score, also added a confirm button.

* Added selected score text view to the code. Added more comments. Renamed mListView to mScoreListView.

* Added the LevelResult dialog. Shows the results of the level up(additions to stats.)

* Added the root dialog field to all of the custom dialogs so that we can bubble up.

* Made CharacterSheetFragment a ChangeListener.

* Actually levels up the character this time.

* Added the dialog for experience.

* Added a helper method for adding experience

* Added an click event for opening Experience Dialog. Also cleaned up.

* Corrected error in updateLevel.

* Added functionality for the experience dialog.

* Converted from strings to text resources.

* Added a dialog in order to select stat to improve for level up.
(LevelStatSelectDialogFragment)

* Added functionality for the LevelUpButton and added some comments as well.

* Called updateGUI rather than update manually.

* Removed the listener interface, added ability to select a score, also added a confirm button.

* Added selected score text view to the code. Added more comments. Renamed mListView to mScoreListView.

* Added the LevelResult dialog. Shows the results of the level up(additions to stats.)

* Added the root dialog field to all of the custom dialogs so that we can bubble up.

* Made CharacterSheetFragment a ChangeListener.

* Actually levels up the character this time.

* Prevented the user from inputting too large a number. (Fixed #62)

* Prevented the user from inputting too large a number. (Fixed #62)

* Hotfix (Fixes #62) (#63)

* Added the dialog for experience.

* Added a helper method for adding experience

* Added an click event for opening Experience Dialog. Also cleaned up.

* Corrected error in updateLevel.

* Added functionality for the experience dialog.

* Converted from strings to text resources.

* Added a dialog in order to select stat to improve for level up.
(LevelStatSelectDialogFragment)

* Added functionality for the LevelUpButton and added some comments as well.

* Called updateGUI rather than update manually.

* Removed the listener interface, added ability to select a score, also added a confirm button.

* Added selected score text view to the code. Added more comments. Renamed mListView to mScoreListView.

* Added the LevelResult dialog. Shows the results of the level up(additions to stats.)

* Added the root dialog field to all of the custom dialogs so that we can bubble up.

* Made CharacterSheetFragment a ChangeListener.

* Actually levels up the character this time.

* Prevented the user from inputting too large a number. (Fixed #62)

* Fixed #64, also removed unneeded references from MainMazes.

* Displayed error message to user regarding issue #59 (Fixed #59)

* Displayed error message to user regarding issue #59 (Fixed #59)

* setPossibleLevelScores is now called in all classes.

* setPossibleLevelScores is now called in all classes.

* Added documentation to the Amazon class.

* Added documentation to the Barbarian class.

* Added documentation to the Centaur class.

* Added documentation to the Noble class.

* Added documentation to Spearman.

* Added documentation to Warrior.

* Corrected lack of param tags on Noble's setters.

* Added documentation to the Hunter class.

* Added documentation to the Thief class.

* Added documentation to the Specialist superclass.

* Added documentation to the Magician classes.

* Added documentation to the Magician superclass.

* Added documentation to BaseClass.

* Added package-info.java for the character.classes package.

* Added documentation for the Classes Enum.

* Added documentation to the Amazon class.

* Added documentation to the Barbarian class.

* Added documentation to the Centaur class.

* Added documentation to the Noble class.

* Added documentation to Spearman.

* Added documentation to Warrior.

* Corrected lack of param tags on Noble's setters.

* Added documentation to the Hunter class.

* Added documentation to the Thief class.

* Added documentation to the Specialist superclass.

* Added documentation to the Magician classes.

* Added documentation to the Magician superclass.

* Added documentation to BaseClass.

* Added package-info.java for the character.classes package.

* Added documentation for the Classes Enum.

* Shadow fix: a misspelling of sorcerer.

* Added docs for AttributeScoreComparator.

* Added docs for the Score Enum.

* Added package-info for character.stats package.

* Added documentation for character.stats package. (#73)

* Displayed error message to user regarding issue #59 (Fixed #59)

* setPossibleLevelScores is now called in all classes.

* Added documentation to the Amazon class.

* Added documentation to the Barbarian class.

* Added documentation to the Centaur class.

* Added documentation to the Noble class.

* Added documentation to Spearman.

* Added documentation to Warrior.

* Corrected lack of param tags on Noble's setters.

* Added documentation to the Hunter class.

* Added documentation to the Thief class.

* Added documentation to the Specialist superclass.

* Added documentation to the Magician classes.

* Added documentation to the Magician superclass.

* Added documentation to BaseClass.

* Added package-info.java for the character.classes package.

* Added documentation for the Classes Enum.

* Shadow fix: a misspelling of sorcerer.

* Added docs for AttributeScoreComparator.

* Added docs for the Score Enum.

* Added package-info for character.stats package.

* Added documentation for character package.

* Removed character.CharacterSerializer and moved its documenation to serialization.CharacterSerializer.

* Added documentaion for SaveAndLoadPerformer.

* Added a package-info into serialization package.

* Added documentation for util.Util.

* Added documentation to CommonStrings.

* Added package-info to util package.

* Updated package-info in util package.

* Added a package-info in rollDice package, and updated others' author tags.

* Added documentation for character package.

* Removed character.CharacterSerializer and moved its documenation to serialization.CharacterSerializer.

* Added documentaion for SaveAndLoadPerformer.

* Added a package-info into serialization package.

* Added documentation for util.Util.

* Added documentation to CommonStrings.

* Added package-info to util package.

* Updated package-info in util package.

* Added a package-info in rollDice package, and updated others' author tags.

* Removed outdated todo comment.

* Added documentation for CharManageFragment.

* Added documentation for ExperienceDialogFragment.

* Added documentation for LevelStatSelectDialogFragment. Also fixed typo.

* Added documentation for LevelResultDialogFragment. Also added details.

* Added documentation for HitsChangeFragment.

* Added documentation for InventoryFragment.

* Added documentation for StatChangeFragment.

* Added package-info to fragments package.

* Added documentation for AttributePriorityDialog.

* Added documentation for DetailDialogFragment. Also fixed more typos.

* Added a package-info to NewCharacter.dialogs package.

* Added missing ol tag.

* Added documentation for CharacterCreationFragment.

* Added documentation for CreateCharacter.

* Added package-info to NewCharacter package.

* Removed outdated todo comment.

* Added documentation for CharManageFragment.

* Added documentation for ExperienceDialogFragment.

* Added documentation for LevelStatSelectDialogFragment. Also fixed typo.

* Added documentation for LevelResultDialogFragment. Also added details.

* Added documentation for HitsChangeFragment.

* Added documentation for InventoryFragment.

* Added documentation for StatChangeFragment.

* Added package-info to fragments package.

* Added documentation for AttributePriorityDialog.

* Added documentation for DetailDialogFragment. Also fixed more typos.

* Added a package-info to NewCharacter.dialogs package.

* Added missing ol tag.

* Added documentation for CharacterCreationFragment.

* Added documentation for CreateCharacter.

* Added package-info to NewCharacter package.

* Added authors to package-infos.

* Added documentation to CompanionFragment.

* Removed an incorrect statement in the javadoc.

* Added documentation to PlayerManualFragment.

* Added documentation to WebsiteFragment.

* Added package-info to web_resource package.

* Added documentation for everything related to Equipment.

* Added documentation for AttackResultFragment.

* Added documentation for AttributeScore.

* Added documentation for AttributeScoreGenerator.

* Added documentation for CharacterAdapter.

* Added docs for CharacterSelection and CharacterDeletion fragments.

* Added docs to CharacterManageActivity.

* Added docs to CharacterPlayActivity. Also added author tag to CharacterManage.

* Added docs to CharacterSheetFragment.

* Added docs to the rest of the classes.

* Added package-info to the base level package.

* Added the rest of the documentation for the code. (#78)

* Removed outdated todo comment.

* Added documentation for CharManageFragment.

* Added documentation for ExperienceDialogFragment.

* Added documentation for LevelStatSelectDialogFragment. Also fixed typo.

* Added documentation for LevelResultDialogFragment. Also added details.

* Added documentation for HitsChangeFragment.

* Added documentation for InventoryFragment.

* Added documentation for StatChangeFragment.

* Added package-info to fragments package.

* Added documentation for AttributePriorityDialog.

* Added documentation for DetailDialogFragment. Also fixed more typos.

* Added a package-info to NewCharacter.dialogs package.

* Added missing ol tag.

* Added documentation for CharacterCreationFragment.

* Added documentation for CreateCharacter.

* Added package-info to NewCharacter package.

* Added authors to package-infos.

* Added documentation to CompanionFragment.

* Removed an incorrect statement in the javadoc.

* Added documentation to PlayerManualFragment.

* Added documentation to WebsiteFragment.

* Added package-info to web_resource package.

* Added documentation for everything related to Equipment.

* Added documentation for AttackResultFragment.

* Added documentation for AttributeScore.

* Added documentation for AttributeScoreGenerator.

* Added documentation for CharacterAdapter.

* Added docs for CharacterSelection and CharacterDeletion fragments.

* Added docs to CharacterManageActivity.

* Added docs to CharacterPlayActivity. Also added author tag to CharacterManage.

* Added docs to CharacterSheetFragment.

* Added docs to the rest of the classes.

* Added package-info to the base level package.

* Added documentation for CharManageFragment.

* Added documentation for ExperienceDialogFragment.

* Added documentation for LevelStatSelectDialogFragment. Also fixed typo.

* Added documentation for LevelResultDialogFragment. Also added details.

* Added documentation for AttributePriorityDialog.

* Added documentation for DetailDialogFragment. Also fixed more typos.

* Added docs to CharacterManageActivity.

* Added docs to CharacterPlayActivity. Also added author tag to CharacterManage.

* Added docs to CharacterSheetFragment.

* Added docs to the rest of the classes.

* Added package-info to the base level package.

* Actually fixed the doc. bug.

* Added documentation for CharManageFragment.

* Added documentation for ExperienceDialogFragment.

* Added documentation for LevelStatSelectDialogFragment. Also fixed typo.

* Added documentation for LevelResultDialogFragment. Also added details.

* Added documentation for AttributePriorityDialog.

* Added documentation for DetailDialogFragment. Also fixed more typos.

* Added docs to CharacterManageActivity.

* Added docs to CharacterPlayActivity. Also added author tag to CharacterManage.

* Added docs to CharacterSheetFragment.

* Added docs to the rest of the classes.

* Added package-info to the base level package.

* Patched Noble character creation.

* Added verification of Noble's scores.

* Added the exception to the constructor's signature.
  • Loading branch information
JayTSmith authored and Thorin Schmidt committed Jan 29, 2018
1 parent 2bdb22d commit 2e7159d
Show file tree
Hide file tree
Showing 100 changed files with 4,928 additions and 2,363 deletions.
245 changes: 245 additions & 0 deletions .idea/workspace.xml.orig

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MazesAndMinotaurs/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
buildToolsVersion '26.0.2'
defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationId "com.example.cis.mazeminotaurs"
Expand Down
39 changes: 29 additions & 10 deletions MazesAndMinotaurs/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.cis.mazeminotaurs"
android:installLocation="auto">
package="com.example.cis.mazeminotaurs"
android:installLocation="auto">

<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
android:xlargeScreens="true"/>

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<uses-permission android:name="android.permission.INTERNET"/>

<application
Expand All @@ -19,22 +18,42 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
android:theme="@style/AppTheme">
<activity
android:name=".MainMazes"
android:screenOrientation="portrait"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" >
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".NewCharacter.ClassConfirmationPopUp"
android:label="CharacterCreation"
android:screenOrientation="portrait">
</activity>

<activity
android:name=".CharacterManageActivity"
android:label="@string/title_activity_character_manage"
android:parentActivityName=".MainMazes"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.cis.mazeminotaurs.MainMazes"/>
</activity>
<activity
android:name=".CharacterPlayActivity"
android:label="Character Play"
android:parentActivityName=".MainMazes"
android:screenOrientation="portrait"
android:label="CharacterCreation">
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.cis.mazeminotaurs.MainMazes"/>
</activity>
</application>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
package com.example.cis.mazeminotaurs;

/**
* Created by Thorin Schmidt on 3/20/2017.
* This class serves as a container for data related to an armor piece.
*
* @author Thorin Schmidt on 3/20/2017.
*/

public class Armor extends Equipment {

//instance variables
/**
* The bonus defense granted by wearing this armor piece.
*/
private int mDefenseBonus;

/**
* Default Constructor.
*
* @param resId The name of the armor.
* @param encumberance The encumberance value of the armor.
* @param quantity The number the player is holding.
* @param costInSp The cost of the armor in silver.
* @param longDescription The description of the armor.
* @param defenseBonus The defense bonus of the armor.
*/
public Armor(String resId, int encumberance, int quantity, double costInSp, String longDescription, int defenseBonus) {
super(resId, encumberance, quantity, costInSp, longDescription);
mDefenseBonus = defenseBonus;
}

/**
* Getter for the mDefenseBonus property.
* @return the value of mDefenseBonus
*/
public int getDefenseBonus() {
return mDefenseBonus;
}

/**
* Setter for the mDefenseBonus property.
* @param defenseBonus the new value of mDefenseBonus
*/
public void setDefenseBonus(int defenseBonus) {
mDefenseBonus = defenseBonus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,73 @@
import com.example.cis.mazeminotaurs.rollDice.rollDice;

/**
* Created by Thorin Schmidt on 4/13/2017.
* This fragment displays the results of an attack roll and damage roll of the
* equipped weapon.
* The user can also click to get a second damage roll for critical damage.
* @author Thorin Schmidt on 4/13/2017.
*/

public class AttackResultFragment extends DialogFragment {

/**
* The index of the character in the Portfolio singleton.
*/
int mCurrentCharacterIndex;

/**
* The list of all of the player's characters.
*/
Portfolio mPortfolio;

/**
* The character that is currently being used.
*/
PlayerCharacter mCurrentCharacter;

/**
* The score modifier being used, based on weapon type.
*/
int mMod;

/**
* The first attack roll, based on D20 values.
*/
int mAttackRoll1;

/**
* The second attack roll, based on D20 values. Used for special situations.
*/
int mAttackRoll2;

/**
* The first damage roll, based on the weapon's damageDie.
*/
int mDamage1;

/**
* The second damgage roll, based on the weapon's damageDie. Used for special
* situations.
*/
int mDamage2;

/**
* The type of attack being done. (Melee or Ranged)
*/
String mAttackType;

/**
* The sum of the attack roll and modifier. (mAttack1 and mMod)
*/
int mTotal1;

/**
* The sum of the attack roll and modifier. (mAttack2 and mMod)
*/
int mTotal2;

/*
* These are widgets found in the layout.
*/
Button mCritButton;

static AttackResultFragment newInstance(int characterIndex) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
package com.example.cis.mazeminotaurs;

/**
* This serves as a container for a player's scores.
* Created by Thorin Schmidt on 3/18/2017.
*/

public class AttributeScore {

//instance variables
/**
* The score's value.
*/
int mScore;

/**
* The modifier of the score, based on the score's value.
*/
int mModifier;

/**
* The description of the score's value.
*/
String mDescription;

//private methods
Expand Down Expand Up @@ -81,20 +93,37 @@ else if(this.mScore <= 20){

//public methods

/**
* Default constructor
*
* @param score the value of the score.
*/
public AttributeScore(int score) {
this.mScore = score;
this.updateModifier();
}

/**
* Getter for the mScore property.
* @return the value of mScore.
*/
public int getScore() {
return mScore;
}

/**
* Setter for the mScore property.
* @param score the new value of mScore.
*/
public void setScore(int score) {
this.mScore = score;
this.updateModifier();
}

/**
* Getter for the mModifier property.
* @return the value of mModifier.
*/
public int getModifier() {
return mModifier;
}
Expand All @@ -104,6 +133,10 @@ public void setModifier(int modifier) {
this.modifier = modifier;
}*/

/**
* Getter for the mDescription property.
* @return the value of mDescription.
*/
public String getDescription() {
return mDescription;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,33 @@
import java.util.Random;

/**
* Created by Thorin Schmidt on 3/18/2017.
* This is a helper class for generating a valid set of AttributeScores.
* @author Thorin Schmidt on 3/18/2017.
*/

public class AttributeScoreGenerator {
//random number generator
/**
* An instance of Random for generating numbers.
*/
Random dieRoller = new Random();

//private methods
/**
* A helper method for generating a new score value.
*
* @return a score value between 8 - 18
*/
private AttributeScore nextScore(){
int rollOne = dieRoller.nextInt(6)+1;
int rollTwo = dieRoller.nextInt(6)+1;

return new AttributeScore(rollOne+rollTwo+6);
}

/**
* Returns an array of AttributeScores that are valid according to the rules
* of Mazes and Minotaurs.
* @return a valid array of AttributeScores.
*/
public AttributeScore[] nextValidSet(){

AttributeScore[] attributes = new AttributeScore[6];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,36 @@

import com.example.cis.mazeminotaurs.character.PlayerCharacter;

import java.util.ArrayList;

/**
* Created by jsmith on 10/18/17.
* This adapter is meant to display every character present in portfolio.
* @author jsmith on 10/18/17.
*/

public class CharacterAdapter extends BaseAdapter {
/**
* A reference to the Portfolio singleton.
*/
private Portfolio mPortfolio = Portfolio.get();

/**
* The context that we use to create our layout.
*/
private Context mContext;

/**
* Default constructor
*
* @param context the context to create the layout.
*/
public CharacterAdapter(Context context) {
mContext = context;
}

/**
* A helper method to remove a character based on index within the portfolio.
* This also calls {@code notifyDataSetChanged}.
* @param i the index of the character to remove
*/
public void removeCharacter(int i) {
mPortfolio.deletePlayerCharacter(mPortfolio.getPlayerCharacter(i));
notifyDataSetChanged();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
import android.widget.Toast;

/**
* Created by jsmith on 10/19/17.
* This is the old fragment used for deleting characters.
* @see CharacterManageActivity
* @deprecated
*
* @author jsmith on 10/19/17.
*/

public class CharacterDeletionFragment extends Fragment {
Expand Down
Loading

0 comments on commit 2e7159d

Please sign in to comment.