Add Controller class and integrate with Main
parent
fe3a5dec5b
commit
8dcbe0a5ca
|
@ -1,5 +1,14 @@
|
|||
package de.hs_mannheim.informatik.chess.controller;
|
||||
|
||||
public class Controller {
|
||||
import de.hs_mannheim.informatik.chess.gui.Gui;
|
||||
import de.hs_mannheim.informatik.chess.model.ChessEngine;
|
||||
|
||||
public class Controller {
|
||||
Gui gui;
|
||||
ChessEngine engine;
|
||||
|
||||
public Controller(Gui gui, ChessEngine engine) {
|
||||
this.gui = gui;
|
||||
this.engine = engine;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
package de.hs_mannheim.informatik.chess.main;
|
||||
import de.hs_mannheim.informatik.chess.gui.Gui;
|
||||
import de.hs_mannheim.informatik.chess.controller.Controller;
|
||||
import de.hs_mannheim.informatik.chess.model.ChessEngine;
|
||||
|
||||
|
||||
public class Main{
|
||||
|
||||
public static void main( String[] args ){
|
||||
new Gui();
|
||||
Gui gui = new Gui();
|
||||
ChessEngine engine = new ChessEngine();
|
||||
new Controller(gui, engine);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue