diff --git a/Meteo_Engine.jar b/Meteo_Engine.jar index 645c57b..8ff2835 100644 Binary files a/Meteo_Engine.jar and b/Meteo_Engine.jar differ diff --git a/run b/run index 8917894..f217e26 100755 --- a/run +++ b/run @@ -1,3 +1,5 @@ -javac src/sig/*.java -d bin -java -cp bin sig/Meteo -jar cfe Meteo_Engine.jar sig.Meteo src/sig \ No newline at end of file +javac --release 8 src/sig/*.java -d bin +cd bin +jar cfe ../Meteo_Engine.jar sig.Meteo sig +cd .. +java -cp bin sig/Meteo \ No newline at end of file diff --git a/src/sig/Block.java b/src/sig/Block.java index 8ded849..e101ef8 100644 --- a/src/sig/Block.java +++ b/src/sig/Block.java @@ -2,8 +2,21 @@ package sig; public class Block{ BlockState state; - int x,y; //Relative to its block clump. + int x,y; //Relative to its block clump + final static BlockState[] STARTINGSTATES = {BlockState.BLUE, + BlockState.GREEN, + BlockState.ORANGE, + BlockState.PURPLE, + BlockState.RED, + BlockState.WHITE, + BlockState.YELLOW,}; public Block(int x,int y) { - + this.x=x; + this.y=y; + state = STARTINGSTATES[(int)(Math.random()*STARTINGSTATES.length)]; + } + @Override + public String toString() { + return "Block [state=" + state + ", x=" + x + ", y=" + y + "]"; } } \ No newline at end of file diff --git a/src/sig/BlockClump.java b/src/sig/BlockClump.java index 4c7b4e9..fd8d96c 100644 --- a/src/sig/BlockClump.java +++ b/src/sig/BlockClump.java @@ -6,7 +6,14 @@ public class BlockClump { List blocks; double x,y; //the lower-left origin of this block clump. Every block positions relative to this. double yspd; - public BlockClump(List blockList) { + public BlockClump(List blockList, double x, double y, double startspd) { this.blocks = blockList; + this.x=x; + this.y=y; + this.yspd=startspd; + } + @Override + public String toString() { + return "BlockClump [blocks=" + blocks + ", x=" + x + ", y=" + y + ", yspd=" + yspd + "]"; } } diff --git a/src/sig/Board.java b/src/sig/Board.java index abcfa39..d99627c 100644 --- a/src/sig/Board.java +++ b/src/sig/Board.java @@ -30,6 +30,7 @@ public class Board { } } - BlockClump defaultClump = new BlockClump(initialBlocks); + BlockClump defaultClump = new BlockClump(initialBlocks,0,0,0); + System.out.println(defaultClump); } }