private void showCharacterInfo() { character.println( "{cls}{text:bold}{text:magenta}Character{text}: {text:bold}%s{text}", character.getName()); // start = 5, min = 3, max = 7 character.println( "{text:bold}{text:magenta}Health{text}: {text:bold}%d{text} (min 3, max 7)", character.getHealth()); // start = 5, min = 3, max = 7 character.println( "{text:bold}{text:magenta}Sanity{text}: {text:bold}%d{text} (min 3, max 7)", character.getSanity()); // start = 1, min = 1, max = 3> character.println( "{text:bold}{text:magenta}Focus{text}: {text:bold}%d{text} (min 1, max 3)", character.getFocus()); character.println( "{text:bold}{text:magenta}Items{text}: {text:bold}%s{text}", character.getItemSummary()); character.println( "{text:bold}{text:magenta}Spells{text}: {text:bold}%s{text}", character.getSpellSummary()); character.println( "{text:bold}{text:magenta}Skills{text}: {text:bold}%s{text}", character.getSkillsSummary()); character.println( "{text:bold}{text:magenta}Money{text}: {text:bold}$%d{text}", character.getMoney()); }
private void handleOption(char c) { switch (c) { case '1': moreHealth(); break; case '2': moreSanity(); break; // available only at character creation case '3': buyFocus(); break; case '4': buySkill(); break; // random shop case '5': buyMoney(); break; case '6': buyCommonItem(); break; case '7': buyUniqueItem(); break; case '8': buySpell(); break; case 'G': randomise(character.getName().hashCode()); break; case 'R': randomise(System.currentTimeMillis()); break; case 'U': undo(); break; case 'Q': quit(); break; } }