fix illegal flags
This commit is contained in:
parent
9fde49a8bb
commit
6fc162760d
@ -170,6 +170,9 @@ public class Controller {
|
|||||||
Button tileAsButton = (Button) tileClicked;
|
Button tileAsButton = (Button) tileClicked;
|
||||||
ImageView tileGraphic = (ImageView) tileAsButton.getGraphic();
|
ImageView tileGraphic = (ImageView) tileAsButton.getGraphic();
|
||||||
Image tileGraphicImage = tileGraphic.getImage();
|
Image tileGraphicImage = tileGraphic.getImage();
|
||||||
|
if (!tileGraphicImage.getUrl().contains("blank.png") && !tileGraphicImage.getUrl().contains("flagged.png")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
boolean flagged = tileGraphicImage.getUrl().contains("flagged.png");
|
boolean flagged = tileGraphicImage.getUrl().contains("flagged.png");
|
||||||
if (flagged) {
|
if (flagged) {
|
||||||
bombCount++;
|
bombCount++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user