Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Game
- {
- private Player player;
- private TreasureChest chest;
- private SlotCollection ground;
- private UI ui;
- public Game(UI ui)
- {
- this.ui = ui;
- int numStones = ui.readStones(); // You can ignore this until task 2
- ground = new SlotCollection();
- ground.placeStone(ground.getSlot1(), 1);
- ground.placeStone(ground.getSlot2(), 2);
- ground.placeStone(ground.getSlot3(), 3);
- ground.placeStone(ground.getSlot4(), 4);
- chest = new TreasureChest(ui.readCombination(), 5);
- int maxTurns = ui.readMaxTurns();
- player = new Player(ui.readName(), 0, ground, chest, maxTurns);
- }
Add Comment
Please, Sign In to add comment