|
|
@ -561,7 +561,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
if (i+checkX<gameBoard.boardSize.x) { |
|
|
|
if (i+checkX<gameBoard.boardSize.x) { |
|
|
|
for (int k=0;k<gameBoard.getBlocks(i+checkX).size();k++){ |
|
|
|
for (int k=0;k<gameBoard.getBlocks(i+checkX).size();k++){ |
|
|
|
Block&b2=gameBoard.getBlocks(i+checkX)[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; |
|
|
|
found=true; |
|
|
|
tempMatchIDsX.push_back({(int)(i+checkX),k}); |
|
|
|
tempMatchIDsX.push_back({(int)(i+checkX),k}); |
|
|
|
checkX++; |
|
|
|
checkX++; |
|
|
@ -573,7 +573,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
if (c.landTime>0) { |
|
|
|
if (c.landTime>0) { |
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
Block&b2=c.getBlocks()[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; |
|
|
|
found=true; |
|
|
|
tempMatchIDsX.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
tempMatchIDsX.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
checkX++; |
|
|
|
checkX++; |
|
|
@ -593,7 +593,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
if (i+checkX>=0) { |
|
|
|
if (i+checkX>=0) { |
|
|
|
for (int k=0;k<gameBoard.getBlocks(i+checkX).size();k++){ |
|
|
|
for (int k=0;k<gameBoard.getBlocks(i+checkX).size();k++){ |
|
|
|
Block&b2=gameBoard.getBlocks(i+checkX)[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; |
|
|
|
found=true; |
|
|
|
tempMatchIDsX.push_back({(int)(i+checkX),k}); |
|
|
|
tempMatchIDsX.push_back({(int)(i+checkX),k}); |
|
|
|
checkX--; |
|
|
|
checkX--; |
|
|
@ -605,7 +605,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
if (c.landTime>0) { |
|
|
|
if (c.landTime>0) { |
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
Block&b2=c.getBlocks()[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; |
|
|
|
found=true; |
|
|
|
tempMatchIDsX.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
tempMatchIDsX.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
checkX--; |
|
|
|
checkX--; |
|
|
@ -625,7 +625,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
for (int k=0;k<gameBoard.getBlocks(i).size();k++){ |
|
|
|
for (int k=0;k<gameBoard.getBlocks(i).size();k++){ |
|
|
|
Block&b2=gameBoard.getBlocks(i)[k]; |
|
|
|
Block&b2=gameBoard.getBlocks(i)[k]; |
|
|
|
if (j==k)continue; |
|
|
|
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; |
|
|
|
found=true; |
|
|
|
checkY-=12; |
|
|
|
checkY-=12; |
|
|
|
tempMatchIDsY.push_back({i,k}); |
|
|
|
tempMatchIDsY.push_back({i,k}); |
|
|
@ -637,7 +637,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
if (c.landTime>0) { |
|
|
|
if (c.landTime>0) { |
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
Block&b2=c.getBlocks()[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; |
|
|
|
found=true; |
|
|
|
checkY-=12; |
|
|
|
checkY-=12; |
|
|
|
tempMatchIDsY.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
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++){ |
|
|
|
for (int k=0;k<gameBoard.getBlocks(i).size();k++){ |
|
|
|
Block&b2=gameBoard.getBlocks(i)[k]; |
|
|
|
Block&b2=gameBoard.getBlocks(i)[k]; |
|
|
|
if (j==k)continue; |
|
|
|
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; |
|
|
|
found=true; |
|
|
|
checkY+=12; |
|
|
|
checkY+=12; |
|
|
|
tempMatchIDsY.push_back({i,k}); |
|
|
|
tempMatchIDsY.push_back({i,k}); |
|
|
@ -668,7 +668,7 @@ void Meteos::matchGroundedBlocks(){ |
|
|
|
if (c.landTime>0) { |
|
|
|
if (c.landTime>0) { |
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
for (int l=0;l<c.getBlocks().size();l++){ |
|
|
|
Block&b2=c.getBlocks()[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; |
|
|
|
found=true; |
|
|
|
checkY+=12; |
|
|
|
checkY+=12; |
|
|
|
tempMatchIDsY.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|
tempMatchIDsY.push_back({(int)(b2.pos.x/12),l,k}); |
|
|
|