Defined project structure

This commit is contained in:
id101010
2016-05-27 11:14:13 +02:00
parent 97207cac42
commit 7ffd3cdb12
2 changed files with 116 additions and 1 deletions

View File

@@ -1,5 +1,75 @@
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(){
}
}

View 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");
}
}