Guest User

Untitled

a guest
Mar 6th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public class Game
  2. {
  3. private Player player;
  4. private TreasureChest chest;
  5. private SlotCollection ground;
  6. private UI ui;
  7.  
  8. public Game(UI ui)
  9. {
  10. this.ui = ui;
  11. int numStones = ui.readStones(); // You can ignore this until task 2
  12. ground = new SlotCollection();
  13. ground.placeStone(ground.getSlot1(), 1);
  14. ground.placeStone(ground.getSlot2(), 2);
  15. ground.placeStone(ground.getSlot3(), 3);
  16. ground.placeStone(ground.getSlot4(), 4);
  17. chest = new TreasureChest(ui.readCombination(), 5);
  18. int maxTurns = ui.readMaxTurns();
  19. player = new Player(ui.readName(), 0, ground, chest, maxTurns);
  20. }
Add Comment
Please, Sign In to add comment