private void OnMouseUpAsButton() { if (mine) { Playfield.UncoverMines(); Debug.Log("Game Over"); } else { int x = (int)transform.position.x; int y = (int)transform.position.y; LoadTexture(Playfield.CountAdjacentMines(x, y)); Playfield.FloodFillUncover(x, y, new bool[Playfield.w, Playfield.h]); if (Playfield.IsFinished()) { Debug.Log("You Win"); } } }