Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1.  
  2. /**
  3. * Write a description of class Take here.
  4. *
  5. * @author (your name)
  6. * @version (a version number or a date)
  7. */
  8. public class Take extends Command
  9. {
  10. // instance variables - replace the example below with your own
  11. private Item item;
  12.  
  13. /**
  14. * Initialize the item
  15. * pre condition- Item is not null.
  16. */
  17. public Take(Item item)
  18. {
  19. // initialise instance variables
  20. assert item != null : "Take.Take gets null item";
  21. System.out.println("ITS WORKING!!");
  22. this.item=item;
  23.  
  24. }
  25.  
  26.  
  27. public String Process(GameMain ui, Game game)
  28. {
  29. // put your code here
  30. assert game != null : "Go.Process gets null game";
  31. System.out.println("test");
  32. return game.take(item);
  33.  
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement