Skip to content
TheGreenDude edited this page Oct 5, 2011 · 15 revisions

Process of commiting

  1. Make sure you update your repository before you start working!
  2. Only commit when you have thoroughly tested your work!

Interface definition

How to read the below

  • [optional]
  • missing

Game

  • void handleInput(String input)
  • [TBA]

Player()

  • int getX()
  • int getY()
  • void move(String direction, int amount)
  • ArrayList getInventory()
  • void drop(int item_number)
  • void drop(String upgrade_key)
  • void add(Item item)
  • int getMoney()
  • void alterMoney(int change)
  • int getHealth()
  • void alterHealth(int change)
  • int getDamage()
  • void setImage(Image image)
  • [void buyItem(Item item)]

Enemy(int health, int damage)

  • void alterHealth(int change)
  • void setDamage(int newDamage)
  • int getHealth()
  • int getDamage()
  • void move(String direction, int amount)
  • int getX()
  • int getY()
  • void setImage(Image image)
  • void setHealthRegen(double regenPct)
  • double getHealthRegen()

Item(String name, int price, int health, int damage, boolean is_upgrade)

  • String getName()
  • boolean isUpgrade()
  • int getPrice()
  • int getHealth()
  • int getDamage()
  • void setDiscount(double discount_pct)
  • double getDiscount()
  • HashMap inspect()

Shop()

  • void add(Item item)
  • Item viewNext()

Image

  • [TBA: image holding class]

Canvas(Color background, int height, int width)

  • void draw(Image image, int posX, int posY)
  • void drawText(String text, int height, int width)
  • void erase()

Input

  • [TBA: use scanner, key presses]

Valid inputs

  • [TBA: use enum]