From 808a3c58bb985fbce251888f3ae2dc953b197921 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Thu, 16 Sep 2021 07:24:40 +0000 Subject: [PATCH] setup framework for physics engine. --- Meteo_Engine.jar | Bin 1991 -> 3877 bytes run | 8 +++++--- src/sig/Block.java | 17 +++++++++++++++-- src/sig/BlockClump.java | 9 ++++++++- src/sig/Board.java | 3 ++- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Meteo_Engine.jar b/Meteo_Engine.jar index 645c57bcbca742bff6b5c8ccb25b5ae68d9a1bca..8ff283592acfd44343e3fc0866eb6e5d949668fa 100644 GIT binary patch literal 3877 zcma)92{cq~A0JC-8vBURV%J0%YY17gj%6B4)-t9c`!?1$6Onz(9--{Xl5ANbMkJA; zvF}9L3sJUj)cf}Gp6~t6_uO;OdG5K-f4Tqr`!7EPoPrVzprN4w+?R#v0}id@07`(4 zs)3S_rmmXE-dg~G0)T*1(;S>2|MM8)UxmS>6TgLZlyo)KRP_ynb=1~$-gRihg@g&T za3O)Nckj!Qun*!BAKiqtbS`M>5IhPgfdJKYP!w3=^iwT&@Lj*Zg#?^@c{63CXZ2={|4`2mp}W1xg(KE=tl{ zcUv2ge|Mh#&l5TrEXG+F?SOK3SJl&j;}yXVJ8jbXcDgPBaZtF6`Fg zT2H8e5A^Ue=Vw{3(Z`A846v`p&CMYPa^~1U8#ec;M&*R9N`4#xx z6@(z{xW;iFZQmtPT}1YK4XCA9j9t8L+Xslpt^@5iB?>&9VK%qn^8pvB9^uh~4|*HU z;>aab&LDpEgw{--`EcO8cXxUh`>bUe`WjvO4pp%w(}I!U;vU5T9w_bY<4%$R02tE! z?;$ROS9L}6BaC0;dKJbVU63sv(N!_tQoF!*Y*``Slab+ zo#$!Sai>)!0~@G>&qbGP>2Fb-!yz-E+_J};x(^cpn*s`sK9i@aKlXO1NlmY~#bYJsC9`9xErO4gCs}VfbyxOU z)F$>VzD5oI(R9!DyyoR^)4h8op~S0ADreS=y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W-&4_2(dttBqXM?@x@e5 zesVTArnEhL&iVQHhiaVj+5YU2mWJ=ClRjY{=R9@v!U|5E^gp-mSr7x0f$AJ&7nr1`pd_mvG{=eqWnuZp3FKJkoYLF^u!~dse7V5c z!}4gfR)(#^)z(MnypPPr4GS<{U_RM^LFIC?dV&nYyI=Pr}`(WBeU zvZvIPsa#yr{_M$0hlgu9%I0;yzGuF@VY=h4dt2nL==%MgTyx?4oFu;UuG5pZUb=Pg z^WmdQ%a=AOhnBEUzc4H1%+kgyvmRd9b;CC(K~Z%d_oB~XD@z09jBdX7P=9E%&Tmcp zshjfg`e)RC{A=4bQD*k~)Hl_$xBmqDx~pHVek0INYQShhlm|>`*@&CWUZuS%bqT)vt&iD&j9H{n~7x99vuS=dfbVe+75@@)eUB zE-YY>*RZ~G*qG(imy++yn__olLCQ9Tz*%gGKvy<_~7p({rZUC9Ego11@sHjCQ!9YbV0{jCqVY(0n zFS346IftCDQ1u@KMk7o=qSQmy56XSWNgY*xHZzibcwR)-56Te8i3XH35I_PL{&4$I nvj?&vp!9_tr>KVTv7#A*NNoY$tZX3LIDqgk(63v7N*NdcpAvQs 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); } }