Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JFrame;
- public class GameController {
- GameModel model;
- public GameController(GameModel model) {
- this.model = model;
- }
- public void receiveAction(int x, int y) {
- model.makeMove(x, y);
- }
- public static void main(String[] args) {
- GameModel model = new GameModel();
- GameController controller = new GameController(model);
- GameGUIView view = new GameGUIView(model, controller);
- JFrame frame = new JFrame("Game");
- frame.setSize(300, 300);
- frame.add(view);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement