Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.vignesh.learnjava;
- import java.util.ArrayList;
- /**
- * Created by vignesh on 10-11-2016.
- */
- public class Demo {
- public static void main(String[] args) {
- Player tim = new Player();
- //System.out.println(tim.handleName);
- tim.setHandleName("tim");
- // System.out.println(tim.getHandleName());
- Player louise = new Player("lousie");
- System.out.println(louise.getHandleName());
- System.out.println(tim.getWeapon().getName());
- InventoryItem redPotion = new InventoryItem(itemType.POTION,"Red Potion");
- tim.addInventoryItem(redPotion);
- ArrayList<InventoryItem> allItems = tim.getInventoryItems();
- for(InventoryItem item : allItems){
- System.out.println(item.getName());
- }
- }
- }
Add Comment
Please, Sign In to add comment