Working with 7.4.1

This commit is contained in:
Neale Pickett 2012-04-05 20:33:45 -06:00
parent d677328594
commit 8e8ea4c913
1 changed files with 11 additions and 7 deletions

View File

@ -27,24 +27,28 @@ public class JammerButton extends TimerButton
}
public void onClick(View v) {
if (! paused) {
long orem = peer.remaining();
if (! paused && peer.running) {
penalized = true;
if (peer.penalized) {
// 7.4.1 -- Add a minute
} else {
// 7.4 -- Take a minute away from the other side
// if it goes negative, that's our time.
long orem = peer.remaining() - 60000;
if ((! running) && (! penalized) && (orem > 0)) {
orem -= 60000;
if (orem < 0) {
set(-orem);
start();
peer.set(0);
peer.stop();
peer.penalized = true;
} else {
peer.set(orem);
}
} else {
super.onClick(v);
return;
}
}
super.onClick(v);
}
public void pause() {