Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

get exit string game class

By: ace on Apr 28th, 2010  |  syntax: None  |  size: 1.19 KB  |  hits: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import java.util.HashMap;
  2.  
  3. /**
  4.  * Write a description of class Hero here.
  5.  *
  6.  * @author (your name)
  7.  * @version (a version number or a date)
  8.  */
  9. public class Hero
  10. {
  11.     // instance variables - replace the example below with your own
  12.  
  13.      private HashMap<String, Potion> potions;
  14.     private HashMap<String, Scroll> scrolls;
  15.     private HashMap <String, Spell> spells;
  16.     /**
  17.      * Constructor for objects of class Hero
  18.      */
  19.     public Hero()
  20.     {
  21.         potions = new HashMap<String, Potion>();
  22.         scrolls = new HashMap<String, Scroll>();
  23.         spells = new HashMap <String, Spell>();
  24.     }
  25.  
  26.     /**
  27.      * An example of a method - replace this comment with your own
  28.      *
  29.      * @param  y   a sample parameter for a method
  30.      * @return     the sum of x and y
  31.      */
  32.     public void getPotion(String description)
  33.     {
  34. Alchemist alchemist = new Alchemist();
  35. potions.put(description, alchemist.requestPotion(description));
  36. }
  37.  
  38. public void getScroll(String description)
  39. {
  40. Scribe scribe = new Scribe();
  41. scrolls.put(description, scribe.requestScroll(description));
  42. }
  43.  
  44.  
  45. public String getDragonDescaler()
  46. {
  47. potions.get == "piss and vinegar"
  48. return
  49.  
  50. }