From 6a270300b71833b1ca782a84ccc31750ff2e082a Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Thu, 10 Sep 2020 11:42:17 +0900 Subject: [PATCH] Add N and E difficulty detection. --- DivaBot/DivaBot.jar | Bin 1543211 -> 1543278 bytes DivaBot/calibration_data.txt | 8 ++++---- DivaBot/src/sig/MyRobot.java | 8 +++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/DivaBot/DivaBot.jar b/DivaBot/DivaBot.jar index 12746e79b602d08e19ac52f77ad654f2b6f144fc..60dd79e0449e8d53f4adf95c5d392831fef8977c 100644 GIT binary patch delta 3695 zcmZ9P2{csy`^V?bFf-X=43~+7vPSl;>=`wvQ7BuAM9CHgg~>K#$u?X?6v+}X!tl)+ z`X&-(NwOyr$&wKH-|76n=Xbu}d(Qj5?(_LPpY1;9x#zi$GtYg?JjX>gL$TozSS%Jn za7f`=MiLxSfqn2jO#+Z%!5lcq!gWBM1qN^w#?zlb9+Jf@wwC~lu4rct7CU&OP%NIr zgKR9i3%M;KxgD6j7~nie?Nt>vN!9HbJ>F89{jg*q+2zWY4bS8YbDuXBlzQf?JtM6K z9Nr4O%8`A}j3<$N?yNGe#`r%qwL)d)6gzipql0sfSGgQcP`QC&wp3t)sVfeYtC9Gp zf$fwMW0T}ddbs{^pI5;*2U~gT`94otR3u;PcCHszY_}hms~6B1r+R)D@`@;2q8R5l zn2ScK>#z~pNCQO=bPpdZtH@l{P=Sg#j`6XH|Glar#wa@|TK7A5ulCivULKI4VYfQ-Y*^z-T7`ajPM^2x*4mEOqUUy9TAx>{>CHHu zdj8D`Mp?8dS zcwBL7&&T+rX5(6ZN-EH3x=^V0JHu!v>AktD4QIOb4VgSWQb8Y&c^i5@I>|*W1c#Z_ z6Nx){K~OJIdz~wX_GS`y#ZirCa-~+#sX6|;Nj;a-bNTPC^>=4ACm+`eJGFYQ>x`OC z4>>Jagv5VHa;I(yG)C%=KU?Q-j4@q8)SMa`pq0n5g`8S#OX429!j5@Hd|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zh_R8wl1nF%FE)R$nd+9(-JE}GawjC}ndroKAmn+ilUV(4&xjcJ^BgN++m=nPDDEYN zt!|wT?1FH;RAc(2Sa54{17B5ml<~XSHXoDBn4~wZPIF7v&zh6l#8Z;K>2De?NT#p< zK{<}Z8kCa1{aRuO-6Fi25qqgU+OjGlQ)}NGR=cUK`TJC8;v*qb;6g+qu`koWjb z2LB=cFPDx>y~&DZ#p-QmMF-k^dBRic6Uw^h75J~3wD2nhgfJoNnyS{5&m=deD|ZcB zQY*W(r9M`_h-j8@Nz~Acl;hsu-|s1P!7BwgmN`Ol`O2VySIL` zh`1+`V4yy*J7wdc{I8l=&Pe*Q9Eq$%fMR4PTaeYpU2PgtU*4$Ut4U`2UT-ecU32s6 zwv-vv6VI!z8~;*tIQ#44l&Zk6f9kiv6xGp1vB_i6r3JV)6~k#s^J<zu#S@?D#B`hNo?9;;Rc6PM(idFP>y5f;4P-{_nbV?j zbkcOcK$&#>(Gr=1i)QO`j-?Yv?=}@M7SwuW%Sb6sYu`OC1*aU1#h>m^hJN@QHS-M@;Oo@s;9hnD z4J(~leEj>j?VB{7G32hr?V^Z3oXr35nuqHVMNR}FgEu=%N&=ek1dy~Jw*VJm7B35$ zLoL8v1{bGfZz~p9tgzT%vBTnk#R&@uiwhPvEFPM-6|ciA`~W0PN2AFz8ho($VF|zz zq|Iocj>f^QH0efE)(2+ZhdKLT3BeMEB|>|cgZ9P$ji95+SP-ZX0wEAv5{wb(1QRcy#3WEoy2Mry|KCYP zAol&gH!DJY%-9@=BN>#1rx;R91|?YeYXQi=7C=Kz$)F;ue**xGG{B`5+$~;cGzMgY znv&r@ut8(VAdc0b1AwRF6gkbeN77hHTP7K@RJ1 I5dNb72PgbGu>b%7 diff --git a/DivaBot/calibration_data.txt b/DivaBot/calibration_data.txt index e031c48..38f461e 100644 --- a/DivaBot/calibration_data.txt +++ b/DivaBot/calibration_data.txt @@ -1,4 +1,4 @@ -530 -260 -1573 -845 +517 +265 +1485 +808 diff --git a/DivaBot/src/sig/MyRobot.java b/DivaBot/src/sig/MyRobot.java index 10d51fe..670627a 100644 --- a/DivaBot/src/sig/MyRobot.java +++ b/DivaBot/src/sig/MyRobot.java @@ -397,7 +397,7 @@ public class MyRobot{ } private void GetCurrentDifficulty() { - Color c = new Color(MYROBOT.createScreenCapture(new Rectangle(653,459,10,10)).getRGB(5, 5)); + Color c = new Color(MYROBOT.createScreenCapture(new Rectangle(320,274,10,10)).getRGB(0, 0)); //return c.getRed()==43 && c.getGreen()==88 && c.getBlue()==213; if (c.getRed()>100 && c.getRed()<200 && c.getBlue()>200 && c.getBlue()<255 && c.getGreen()<50) { difficulty="EXEX"; @@ -407,6 +407,12 @@ public class MyRobot{ } else if (c.getRed()>175 && c.getRed()<225 && c.getBlue()<50 && c.getGreen()<175 && c.getGreen()>135) { difficulty="H"; + } else + if (c.getRed()>0 && c.getRed()<50 && c.getBlue()<50 && c.getGreen()<255 && c.getGreen()>190) { + difficulty="N"; + } else + if (c.getRed()>0 && c.getRed()<50 && c.getBlue()>170 && c.getBlue()<230 && c.getGreen()<190 && c.getGreen()>150) { + difficulty="E"; } } private void GetCurrentSong() throws IOException {