Mit dem iPhone scannen, um zu installieren
Vorschau
For 2-4 players. Calculates the bets after a game of golf skins. Optionally send the results by text. Optionally adds the results to a reminder for settling at the end of the season.
Neue Funktionen
Version 1.3
Moved from the concept of holes to points to allow for more than holes to count, such as par 3s
Was er macht
73 Aktionen-
CommentSkins bet calculator Ver. 1.3 Jun 29, 20 (C) MCS
-
Ask for InputNo. Players? Must be between 2 and 4.
-
Set VariablePlayers
-
If
-
If
-
Show AlertError
-
Stop This Shortcut
-
Ask for InputEach Point is worth? Eg: $0.50
-
Set VariableBet
-
Ask for InputPlayer 1?
-
Set VariableP1
-
Ask for InputPoints won by …
-
Set VariableH1
-
Ask for InputPlayer 2?
-
Set VariableP2
-
Ask for InputPoints won by …?
-
Set VariableH2
-
If
-
Ask for InputPlayer 3?
-
Set VariableP3
-
Ask for InputPoints won by …?
-
Set VariableH3
-
If
-
If
-
Ask for InputPlayer 4?
-
Set VariableP4
-
Ask for InputPoints won by …?
-
Set VariableH4
-
If
-
Calculate
-
Set VariablePoints
-
Calculate
-
Set VariablePoints
-
Calculate
-
Set VariablePoints
-
If
-
Show Alert… Points detected!! Greater than 18 holes!!
-
If
-
Calculate
-
Set VariableRiskedPerhole
-
Calculate
-
Set VariableUpforgrabs
-
Calculate
-
Set VariableRiskedandwon
-
Calculate
-
Set VariableW1
-
Calculate
-
Set VariableRiskedandwon
-
Calculate
-
Set VariableW2
-
If
-
Calculate
-
Set VariableRiskedandwon
-
Calculate
-
Set VariableW3
-
If
-
If
-
Calculate
-
Set VariableRiskedandwon
-
Calculate
-
Set VariableW4
-
If
-
Show AlertResults
-
Choose from MenuShare results via text messages?
-
Choose from MenuYes
-
Send Message
-
Choose from MenuNo
-
Choose from MenuAdd results to Golf Bets reminders?
-
Choose from MenuYes
-
Add New Reminder
-
Choose from MenuNo
-
Show AlertResults
-
Stop This Shortcut
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#include 'actions/sharing'
#define color teal
#define glyph personWalkingCane
/*
Skins bet calculator
Ver. 1.3
Jun 29, 20
(C) MCS
*/
prompt("No. Players? Must be between 2 and 4. ", "Number")
@Players
if @Players <> 2 {
} else {
alert("Invalid no. of Players - {@Players}", "Error")
stop()
}
prompt("Each Point is worth? Eg: $0.50", "Number")
@Bet
prompt("Player 1?")
@P1
prompt("Points won by {@P1}", "Number")
@H1
prompt("Player 2?")
@P2
prompt("Points won by {@P2}?", "Number")
@H2
if @Players > 2 {
prompt("Player 3?")
@P3
prompt("Points won by {@P3}?", "Number")
@H3
} else {
}
if @Players > 3 {
prompt("Player 4?")
@P4
prompt("Points won by {@P4}?", "Number")
@H4
} else {
}
@Points = @H1 + @H2
@Points = @Points + @H3
@Points = @Points + @H4
if @Points > 18 {
alert("Are you sure you want to continue?", " {@Points} Points detected!! Greater than 18 holes!! ")
} else {
}
@RiskedPerhole = @Bet * @Players
@Upforgrabs = @Bet * @Points
@Riskedandwon = @RiskedPerhole * @H1
@W1 = @Riskedandwon - @Upforgrabs
@Riskedandwon = @RiskedPerhole * @H2
@W2 = @Riskedandwon - @Upforgrabs
if @Players > 2 {
@Riskedandwon = @RiskedPerhole * @H3
@W3 = @Riskedandwon - @Upforgrabs
} else {
}
if @Players > 3 {
@Riskedandwon = @RiskedPerhole * @H4
@W4 = @Riskedandwon - @Upforgrabs
} else {
}
alert("\nDate: {CurrentDate}\nPlayers: {@Players}. \nEach Point is worth: ${@Bet}\n\nPlayer. Points. Winnings. \n{@P1} {@H1} ${@W1} \n{@P2} {@H2} ${@W2}\n{@P3} {@H3} ${@W3} \n{@P4} {@H4} ${@W4}\n {@Points} Points\n\n(C) MCS 2020\n ", "Results")
menu "Share results via text messages?" {
item "Yes":
sendMessage(, "Skins Game Results\nDate: {CurrentDate}\nPlayers: {@Players}. \nEach Point is worth: ${@Bet}\n\nPlayer. Points. Winnings. \n{@P1} {@H1} ${@W1}\n{@P2} {@H2} ${@W2}\n{@P3} {@H3} ${@W3} \n{@P4} {@H4} ${@W4}\n {@Points} Points\n\n(C) MCS 2020\n")
item "No":
}
menu "Add results to Golf Bets reminders?" {
item "Yes":
rawAction("is.workflow.actions.addnewreminder", {
"WFCalendarItemCalendar": "Golf Bets",
"WFCalendarItemNotes": "Each Point is worth ${@Bet}\\n{@P1} {@H1} ${@W1} {@P2} {@H2} ${@W2}\\n{@P3} {@H3} ${@W3} {@P4} {@H4} ${@W4}\\n{@Points} Points",
"WFCalendarItemTitle": "{CurrentDate}"
})
item "No":
}
alert("\nDate: {CurrentDate}\nPlayers: {@Players}. \nEach Point is worth: ${@Bet}\nPlayer. Points. Winnings.\n{@P1} {@H1} ${@W1}\n{@P2} {@H2} ${@W2}\n{@P3} {@H3} ${@W3}\n{@P4} {@H4} ${@W4}\n {@Points}Points\n\n(C) MCS 2020\n ", "Results")
stop()
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Mehr von gramps
Das gefällt dir vielleicht auch
Werbung