Defined project structure
This commit is contained in:
@@ -1,5 +1,75 @@
|
|||||||
package ch.bfh.sevennotseven;
|
package ch.bfh.sevennotseven;
|
||||||
|
|
||||||
public class Game {
|
import java.awt.Point;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Game {
|
||||||
|
|
||||||
|
private int[][] field;
|
||||||
|
|
||||||
|
|
||||||
|
public Game(){
|
||||||
|
this(7);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Game (int size) {
|
||||||
|
field = new int[size][size];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isGameOver(){
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getScore(){
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLevel(){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getNextBlocks(){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getField(){
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canMove(Point src, Point dst){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean doMove(Point src, Point dst){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Point> getPath(Point src, Point dst){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean doUndo(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean doFreeMove(Point src, Point dst){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAvailFreeMoves(){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAvailUndo(){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
45
src/ch/bfh/sevennotseven/Window.java
Normal file
45
src/ch/bfh/sevennotseven/Window.java
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package ch.bfh.sevennotseven;
|
||||||
|
|
||||||
|
import java.awt.Frame;
|
||||||
|
import java.awt.GraphicsConfiguration;
|
||||||
|
import java.awt.HeadlessException;
|
||||||
|
import java.awt.event.WindowAdapter;
|
||||||
|
import java.awt.event.WindowEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author aaron
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class Window extends Frame {
|
||||||
|
|
||||||
|
private Game game;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param title
|
||||||
|
* @throws HeadlessException
|
||||||
|
*/
|
||||||
|
public Window(String title) throws HeadlessException {
|
||||||
|
super(title);
|
||||||
|
this.setVisible(true);
|
||||||
|
this.addWindowListener(new WindowAdapter(){
|
||||||
|
@Override
|
||||||
|
public void windowClosing(WindowEvent e){
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
game = new Game();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param args
|
||||||
|
*/
|
||||||
|
public static void main(String[] args) {
|
||||||
|
new Window("Test");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user