// Path: app/src/main/java/link/standen/michael/fatesheets/model/CoreCharacter.java
// public class CoreCharacter extends Character {
// 
// 	@Override
// 	public String getSheetType() {
// 		return "CORE";
// 	}
// 
// 	private List<Skill> skills;
// 	private List<String> extras;
// 	private List<Stress> physicalStress;
// 	private List<Stress> mentalStress;
// 
// 	public CoreCharacter(String name) {
// 		super(name);
// 		skills = new ArrayList<>();
// 		// Init skills (1 at 5, 2 at 4...)
// 		for (int i = 5; i > 0; i--){
// 			for (int j = 5; j >= i; j--){
// 				skills.add(new Skill(i));
// 			}
// 		}
// 		extras = new ArrayList<>();
// 		// Init stresses
// 		physicalStress = new ArrayList<>();
// 		physicalStress.add(new Stress(1));
// 		physicalStress.add(new Stress(2));
// 		mentalStress = new ArrayList<>();
// 		mentalStress.add(new Stress(1));
// 		mentalStress.add(new Stress(2));
// 	}
// 
// 	public List<Skill> getSkills() {
// 		return skills;
// 	}
// 
// 	public void setSkills(List<Skill> skills) {
// 		this.skills = skills;
// 	}
// 
// 	public List<String> getExtras() {
// 		return extras;
// 	}
// 
// 	public void setExtras(List<String> extras) {
// 		this.extras = extras;
// 	}
// 
// 	public List<Stress> getPhysicalStress() {
// 		return physicalStress;
// 	}
// 
// 	public void setPhysicalStress(List<Stress> physicalStress) {
// 		this.physicalStress = physicalStress;
// 	}
// 
// 	public List<Stress> getMentalStress() {
// 		return mentalStress;
// 	}
// 
// 	public void setMentalStress(List<Stress> mentalStress) {
// 		this.mentalStress = mentalStress;
// 	}
// }
// 
// Path: app/src/main/java/link/standen/michael/fatesheets/model/FAECharacter.java
// public class FAECharacter extends Character {
// 
// 	@Override
// 	public String getSheetType() {
// 		return "FAE";
// 	}
// 
// 	private List<Approach> approaches;
// 	private List<Stress> stress;
// 
// 	public FAECharacter(String name, Context context) {
// 		super(name);
// 		approaches = new ArrayList<>();
// 		// Init each approach
// 		if (context != null) {
// 			for (String approach : context.getResources().getStringArray(R.array.fae_approaches)) {
// 				if (!approach.isEmpty()) {
// 					approaches.add(new Approach(approach));
// 				}
// 			}
// 		}
// 		// Init stress
// 		stress = new ArrayList<>();
// 		stress.add(new Stress(1));
// 		stress.add(new Stress(2));
// 		stress.add(new Stress(3));
// 	}
// 
// 	public List<Approach> getApproaches() {
// 		return approaches;
// 	}
// 
// 	public void setApproaches(List<Approach> approaches) {
// 		this.approaches = approaches;
// 	}
// 
// 	public List<Stress> getStress() {
// 		return stress;
// 	}
// 
// 	public void setStress(List<Stress> stress) {
// 		this.stress = stress;
// 	}
// }


import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import com.google.gson.Gson;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import link.standen.michael.fatesheets.R;
import link.standen.michael.fatesheets.model.CoreCharacter;
import link.standen.michael.fatesheets.model.FAECharacter;
package link.standen.michael.fatesheets.util;





/**
 * A helper class for managing characters
 */
public final class CharacterHelper extends JsonFileHelper {

	private static final String TAG = CharacterHelper.class.getName();

	private static final String CORE_PREFIX = "Core_";
	private static final String FAE_PREFIX = "FAE_";

	private CharacterHelper(){}

	/**
	 * Returns the default name for a character.
	 */
	@NonNull
	public static String getCharacterDefaultName(Context context){
		return context.getResources().getString(R.string.character_name_default);
	}

	/**
	 * Saves the Core character to local storage.
	 * @return True if the write operation was successful, false otherwise.
	 */
	public static boolean saveCoreCharacter(Context context, CoreCharacter character) {
		return saveJsonToFile(context, new Gson().toJson(character), CORE_PREFIX + character.getName());
	}

	/**
	 * Saves the FAE character to local storage.
	 * @return True if the write operation was successful, false otherwise.
	 */
// Path: app/src/main/java/link/standen/michael/fatesheets/model/CoreCharacter.java
// public class CoreCharacter extends Character {
// 
// 	@Override
// 	public String getSheetType() {
// 		return "CORE";
// 	}
// 
// 	private List<Skill> skills;
// 	private List<String> extras;
// 	private List<Stress> physicalStress;
// 	private List<Stress> mentalStress;
// 
// 	public CoreCharacter(String name) {
// 		super(name);
// 		skills = new ArrayList<>();
// 		// Init skills (1 at 5, 2 at 4...)
// 		for (int i = 5; i > 0; i--){
// 			for (int j = 5; j >= i; j--){
// 				skills.add(new Skill(i));
// 			}
// 		}
// 		extras = new ArrayList<>();
// 		// Init stresses
// 		physicalStress = new ArrayList<>();
// 		physicalStress.add(new Stress(1));
// 		physicalStress.add(new Stress(2));
// 		mentalStress = new ArrayList<>();
// 		mentalStress.add(new Stress(1));
// 		mentalStress.add(new Stress(2));
// 	}
// 
// 	public List<Skill> getSkills() {
// 		return skills;
// 	}
// 
// 	public void setSkills(List<Skill> skills) {
// 		this.skills = skills;
// 	}
// 
// 	public List<String> getExtras() {
// 		return extras;
// 	}
// 
// 	public void setExtras(List<String> extras) {
// 		this.extras = extras;
// 	}
// 
// 	public List<Stress> getPhysicalStress() {
// 		return physicalStress;
// 	}
// 
// 	public void setPhysicalStress(List<Stress> physicalStress) {
// 		this.physicalStress = physicalStress;
// 	}
// 
// 	public List<Stress> getMentalStress() {
// 		return mentalStress;
// 	}
// 
// 	public void setMentalStress(List<Stress> mentalStress) {
// 		this.mentalStress = mentalStress;
// 	}
// }
// 
// Path: app/src/main/java/link/standen/michael/fatesheets/model/FAECharacter.java
// public class FAECharacter extends Character {
// 
// 	@Override
// 	public String getSheetType() {
// 		return "FAE";
// 	}
// 
// 	private List<Approach> approaches;
// 	private List<Stress> stress;
// 
// 	public FAECharacter(String name, Context context) {
// 		super(name);
// 		approaches = new ArrayList<>();
// 		// Init each approach
// 		if (context != null) {
// 			for (String approach : context.getResources().getStringArray(R.array.fae_approaches)) {
// 				if (!approach.isEmpty()) {
// 					approaches.add(new Approach(approach));
// 				}
// 			}
// 		}
// 		// Init stress
// 		stress = new ArrayList<>();
// 		stress.add(new Stress(1));
// 		stress.add(new Stress(2));
// 		stress.add(new Stress(3));
// 	}
// 
// 	public List<Approach> getApproaches() {
// 		return approaches;
// 	}
// 
// 	public void setApproaches(List<Approach> approaches) {
// 		this.approaches = approaches;
// 	}
// 
// 	public List<Stress> getStress() {
// 		return stress;
// 	}
// 
// 	public void setStress(List<Stress> stress) {
// 		this.stress = stress;
// 	}
// }


// Path: app/src/main/java/link/standen/michael/fatesheets/util/CharacterHelper.java
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import com.google.gson.Gson;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import link.standen.michael.fatesheets.R;
import link.standen.michael.fatesheets.model.CoreCharacter;
import link.standen.michael.fatesheets.model.FAECharacter;

package link.standen.michael.fatesheets.util;





/**
 * A helper class for managing characters
 */
public final class CharacterHelper extends JsonFileHelper {

	private static final String TAG = CharacterHelper.class.getName();

	private static final String CORE_PREFIX = "Core_";
	private static final String FAE_PREFIX = "FAE_";

	private CharacterHelper(){}

	/**
	 * Returns the default name for a character.
	 */
	@NonNull
	public static String getCharacterDefaultName(Context context){
		return context.getResources().getString(R.string.character_name_default);
	}

	/**
	 * Saves the Core character to local storage.
	 * @return True if the write operation was successful, false otherwise.
	 */
	public static boolean saveCoreCharacter(Context context, CoreCharacter character) {
		return saveJsonToFile(context, new Gson().toJson(character), CORE_PREFIX + character.getName());
	}

	/**
	 * Saves the FAE character to local storage.
	 * @return True if the write operation was successful, false otherwise.
	 */
	public static boolean saveFAECharacter(Context context, FAECharacter character) {