|
|
|
@ -561,7 +561,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
|
if (i+checkX<gameBoard.boardSize.x) { |
|
|
|
|
for (int k=0;k<gameBoard.getBlocks(i+checkX).size();k++){ |
|
|
|
|
Block&b2=gameBoard.getBlocks(i+checkX)[k]; |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==b.pos.x+checkX*12&&b2.pos.y==checkY) { |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==b.pos.x+checkX*12&&std::abs(b2.pos.y-checkY)<0.2) { |
|
|
|
|
found=true; |
|
|
|
|
tempMatchIDsX.push_back({(int)(i+checkX),k}); |
|
|
|
|
checkX++; |
|
|
|
@ -573,7 +573,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
|
if (c.landTime>0) { |
|
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
|
Block&b2=c.getBlocks()[l]; |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==b.pos.x+checkX*12&&c.getBlockPosition(b2).y==checkY){ |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==b.pos.x+checkX*12&&std::abs(c.getBlockPosition(b2).y-checkY)<0.2){ |
|
|
|
|
found=true; |
|
|
|
|
tempMatchIDsX.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
|
checkX++; |
|
|
|
@ -593,7 +593,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
|
if (i+checkX>=0) { |
|
|
|
|
for (int k=0;k<gameBoard.getBlocks(i+checkX).size();k++){ |
|
|
|
|
Block&b2=gameBoard.getBlocks(i+checkX)[k]; |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==b.pos.x+checkX*12&&b2.pos.y==checkY) { |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==b.pos.x+checkX*12&&std::abs(b2.pos.y-checkY)<0.2) { |
|
|
|
|
found=true; |
|
|
|
|
tempMatchIDsX.push_back({(int)(i+checkX),k}); |
|
|
|
|
checkX--; |
|
|
|
@ -605,7 +605,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
|
if (c.landTime>0) { |
|
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
|
Block&b2=c.getBlocks()[l]; |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==b.pos.x+checkX*12&&c.getBlockPosition(b2).y==checkY){ |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==b.pos.x+checkX*12&&std::abs(c.getBlockPosition(b2).y-checkY)<0.2){ |
|
|
|
|
found=true; |
|
|
|
|
tempMatchIDsX.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
|
checkX--; |
|
|
|
@ -625,7 +625,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
|
for (int k=0;k<gameBoard.getBlocks(i).size();k++){ |
|
|
|
|
Block&b2=gameBoard.getBlocks(i)[k]; |
|
|
|
|
if (j==k)continue; |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==checkX&&b2.pos.y==checkY) { |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==checkX&&std::abs(b2.pos.y-checkY)<0.2) { |
|
|
|
|
found=true; |
|
|
|
|
checkY-=12; |
|
|
|
|
tempMatchIDsY.push_back({i,k}); |
|
|
|
@ -637,7 +637,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
|
if (c.landTime>0) { |
|
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
|
Block&b2=c.getBlocks()[l]; |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&c.getBlockPosition(b2).x==checkX&&c.getBlockPosition(b2).y==checkY){ |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&c.getBlockPosition(b2).x==checkX&&std::abs(c.getBlockPosition(b2).y-checkY)<0.2){ |
|
|
|
|
found=true; |
|
|
|
|
checkY-=12; |
|
|
|
|
tempMatchIDsY.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
@ -656,7 +656,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
|
for (int k=0;k<gameBoard.getBlocks(i).size();k++){ |
|
|
|
|
Block&b2=gameBoard.getBlocks(i)[k]; |
|
|
|
|
if (j==k)continue; |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==checkX&&b2.pos.y==checkY) { |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==checkX&&std::abs(b2.pos.y-checkY)<0.2) { |
|
|
|
|
found=true; |
|
|
|
|
checkY+=12; |
|
|
|
|
tempMatchIDsY.push_back({i,k}); |
|
|
|
@ -668,7 +668,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
|
if (c.landTime>0) { |
|
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
|
Block&b2=c.getBlocks()[l]; |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&c.getBlockPosition(b2).x==checkX&&c.getBlockPosition(b2).y==checkY){ |
|
|
|
|
if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&c.getBlockPosition(b2).x==checkX&&std::abs(c.getBlockPosition(b2).y-checkY)<0.2){ |
|
|
|
|
found=true; |
|
|
|
|
checkY+=12; |
|
|
|
|
tempMatchIDsY.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
|