ShareShortcuts

Skins

For 2-4 players

gramps
„Skins“ forken

Hast du auf Basis dieses Kurzbefehls etwas Neues erstellt? Teile ihn als Fork: Er wird zu deinem eigenen Kurzbefehl, den du selbst verwaltest, und beide Seiten verlinken aufeinander, damit gramps die Anerkennung erhält.

  1. 1Lade den Kurzbefehl und ändere ihn in der Kurzbefehle-App. Gib ihm einen eigenen Namen.
  2. 2Teile ihn in der Kurzbefehle-App und kopiere den iCloud-Link.
  3. 3Komm hierher zurück, füge den Link ein und beschreibe, was sich geändert hat, z. B. „Einen Schritt hinzugefügt, der Apple Intelligence nutzt, um den Text zu personalisieren.“
Downloads
59K
Gesichert
0
Aktionen
73
Kategorie
Fun
Version
1.3
Sprache
EN

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

Versionsverlauf
1.3 29. Jun 2020

Moved from the concept of holes to points to allow for more than holes to count, such as par 3s

1.2 13. Jun 2020

Minor bug fix

1.1 13. Jun 2020

Now with 2-4 players

1.0 6. Jun 2020

First release

Was er macht

73 Aktionen
  1. Comment
    Skins bet calculator Ver. 1.3 Jun 29, 20 (C) MCS
  2. Ask for Input
    No. Players? Must be between 2 and 4.
  3. Set Variable
    Players
  4. If
  5. If
  6. Show Alert
    Error
  7. Stop This Shortcut
  8. Ask for Input
    Each Point is worth? Eg: $0.50
  9. Set Variable
    Bet
  10. Ask for Input
    Player 1?
  11. Set Variable
    P1
  12. Ask for Input
    Points won by …
  13. Set Variable
    H1
  14. Ask for Input
    Player 2?
  15. Set Variable
    P2
  16. Ask for Input
    Points won by …?
  17. Set Variable
    H2
  18. If
  19. Ask for Input
    Player 3?
  20. Set Variable
    P3
  21. Ask for Input
    Points won by …?
  22. Set Variable
    H3
  23. If
  24. If
  25. Ask for Input
    Player 4?
  26. Set Variable
    P4
  27. Ask for Input
    Points won by …?
  28. Set Variable
    H4
  29. If
  30. Calculate
  31. Set Variable
    Points
  32. Calculate
  33. Set Variable
    Points
  34. Calculate
  35. Set Variable
    Points
  36. If
  37. Show Alert
    … Points detected!! Greater than 18 holes!!
  38. If
  39. Calculate
  40. Set Variable
    RiskedPerhole
  41. Calculate
  42. Set Variable
    Upforgrabs
  43. Calculate
  44. Set Variable
    Riskedandwon
  45. Calculate
  46. Set Variable
    W1
  47. Calculate
  48. Set Variable
    Riskedandwon
  49. Calculate
  50. Set Variable
    W2
  51. If
  52. Calculate
  53. Set Variable
    Riskedandwon
  54. Calculate
  55. Set Variable
    W3
  56. If
  57. If
  58. Calculate
  59. Set Variable
    Riskedandwon
  60. Calculate
  61. Set Variable
    W4
  62. If
  63. Show Alert
    Results
  64. Choose from Menu
    Share results via text messages?
  65. Choose from Menu
    Yes
  66. Send Message
  67. Choose from Menu
    No
  68. Choose from Menu
    Add results to Golf Bets reminders?
  69. Choose from Menu
    Yes
  70. Add New Reminder
  71. Choose from Menu
    No
  72. Show Alert
    Results
  73. Stop This Shortcut

Als Code ansehen
Beta

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

Alle anzeigen

Das gefällt dir vielleicht auch

Alle anzeigen
Werbung