30s penalties (2014 ruleset)
This commit is contained in:
parent
8b39896a38
commit
36c8ea6cc7
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.woozle.penaltytimer"
|
||||
android:versionCode="6"
|
||||
android:versionName="1.3">
|
||||
android:versionCode="8"
|
||||
android:versionName="1.5">
|
||||
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4" />
|
||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||
<application android:label="@string/app_name" android:description="@string/description" android:icon="@drawable/ic_launcher">
|
||||
|
|
2
Makefile
2
Makefile
|
@ -5,7 +5,7 @@ SDK = /opt/android-sdk
|
|||
|
||||
ZIPALIGN = $(SDK)/tools/zipalign
|
||||
|
||||
default: release-install
|
||||
default: debug-install
|
||||
|
||||
install: debug-install
|
||||
debug-install: bin/PenaltyTimer-debug.apk
|
||||
|
|
|
@ -32,11 +32,11 @@ public class JammerButton extends TimerButton
|
|||
penalized = true;
|
||||
|
||||
if (peer.penalized) {
|
||||
// 7.4.1 -- Add a minute
|
||||
// 6.4.1 -- Add penaltyTime
|
||||
} else {
|
||||
// 7.4 -- Take a minute away from the other side
|
||||
// 6.4 -- Take penaltyTime away from the other side
|
||||
// if it goes negative, that's our time.
|
||||
long orem = peer.remaining() - 60000;
|
||||
long orem = peer.remaining() - (penaltyTime * 1000);
|
||||
|
||||
if (orem < 0) {
|
||||
set(-orem);
|
||||
|
|
|
@ -15,6 +15,9 @@ import java.util.*;
|
|||
public class TimerButton
|
||||
implements OnClickListener, OnLongClickListener
|
||||
{
|
||||
final int penaltyTime = 30;
|
||||
final int maxPenalties = 7;
|
||||
|
||||
Button b;
|
||||
Timer updateTimer;
|
||||
public long startTime = 0;
|
||||
|
@ -134,7 +137,7 @@ public class TimerButton
|
|||
}
|
||||
|
||||
public void onClick(View v) {
|
||||
set((remaining() + 60000) % (60 * 8 * 1000));
|
||||
set((remaining() + penaltyTime * 1000) % (penaltyTime * (maxPenalties + 1) * 1000));
|
||||
start();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue