Setup base classes. Jar export script.
This commit is contained in:
parent
ee672eeab7
commit
a3b9284e13
BIN
Meteo_Engine.jar
Normal file
BIN
Meteo_Engine.jar
Normal file
Binary file not shown.
1
run
1
run
@ -1,2 +1,3 @@
|
|||||||
javac src/sig/*.java -d bin
|
javac src/sig/*.java -d bin
|
||||||
java -cp bin sig/Meteo
|
java -cp bin sig/Meteo
|
||||||
|
jar cfe Meteo_Engine.jar sig.Meteo src/sig
|
@ -2,8 +2,8 @@ package sig;
|
|||||||
|
|
||||||
public class Block{
|
public class Block{
|
||||||
BlockState state;
|
BlockState state;
|
||||||
double x,y;
|
int x,y; //Relative to its block clump.
|
||||||
public Block() {
|
public Block(int x,int y) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -4,6 +4,8 @@ import java.util.List;
|
|||||||
|
|
||||||
public class BlockClump {
|
public class BlockClump {
|
||||||
List<Block> blocks;
|
List<Block> blocks;
|
||||||
|
double x,y; //the lower-left origin of this block clump. Every block positions relative to this.
|
||||||
|
double yspd;
|
||||||
public BlockClump(List<Block> blockList) {
|
public BlockClump(List<Block> blockList) {
|
||||||
this.blocks = blockList;
|
this.blocks = blockList;
|
||||||
}
|
}
|
||||||
|
12
src/sig/BlockState.java
Normal file
12
src/sig/BlockState.java
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package sig;
|
||||||
|
|
||||||
|
public enum BlockState {
|
||||||
|
RED,
|
||||||
|
BLUE,
|
||||||
|
GREEN,
|
||||||
|
YELLOW,
|
||||||
|
ORANGE,
|
||||||
|
PURPLE,
|
||||||
|
WHITE,
|
||||||
|
IGNITED
|
||||||
|
}
|
@ -1,14 +1,35 @@
|
|||||||
package sig;
|
package sig;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Board {
|
public class Board {
|
||||||
List<BlockClump> blockData;
|
List<BlockClump> blockData;
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
public Board(int width,int height) {
|
double gravity;
|
||||||
|
double launch_power;
|
||||||
|
double max_rise_spd;
|
||||||
|
double max_fall_spd;
|
||||||
|
double[] combo_power_bonus;
|
||||||
|
public Board(int width, int height, double gravity, double launch_power, double max_rise_spd, double max_fall_spd,
|
||||||
|
double[] combo_power_bonus) {
|
||||||
this.width = width;
|
this.width = width;
|
||||||
this.height = height;
|
this.height = height;
|
||||||
|
this.gravity = gravity;
|
||||||
|
this.launch_power = launch_power;
|
||||||
|
this.max_rise_spd = max_rise_spd;
|
||||||
|
this.max_fall_spd = max_fall_spd;
|
||||||
|
this.combo_power_bonus = combo_power_bonus;
|
||||||
this.blockData = new ArrayList<BlockClump>();
|
this.blockData = new ArrayList<BlockClump>();
|
||||||
|
|
||||||
|
List<Block> initialBlocks = new ArrayList<Block>();
|
||||||
|
for (int x=0;x<width;x++) {
|
||||||
|
for (int y=0;y<3;y++) {
|
||||||
|
initialBlocks.add(new Block(x,y));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BlockClump defaultClump = new BlockClump(initialBlocks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package sig;
|
|||||||
|
|
||||||
public class Meteo {
|
public class Meteo {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Board b = new Board(8,14);
|
double[] val = {0,0,};
|
||||||
|
Board b = new Board(8,14,0.05,1,4,1,val);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user