public void ButtonPressed(int b) { if (b >= 1 && b <= 9 && match.secondsLeft > 0) // More checks later { if (cursorX >= 0 && cursorX < size && cursorY >= 0 && cursorY < size) { soundH = cursorX; soundV = cursorY; soundD = b + 10 * myTeam; owner.AskToSetDigit(b + 10 * myTeam, cursorX, cursorY); } } else if (b == 0) // Back { //owner.AskToDisconnect(); owner.BackButtonPressed(); } }