Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.dvorkin;
- public class NimController {
- NimModel model;
- NimConsoleView consoleView;
- public NimController(NimModel model, NimConsoleView consoleView) {
- this.model = model;
- this.consoleView = consoleView;
- }
- public void run() {
- while (!model.isOver()) {
- int[] move = consoleView.interact();
- model.update(move[0], move[1]);
- }
- // consoleView.congratulate();
- }
- public static void main(String[] args) {
- NimModel model = new NimModel();
- NimConsoleView consoleView = new NimConsoleView(model);
- NimController controller = new NimController(model, consoleView);
- controller.run();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement