ShareShortcuts

Skins

For 2-4 players

gramps
Bifurcar “Skins”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que gramps reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
59K
Guardado
0
Acciones
73
Categoría
Fun
Versión
1.3
Idioma
EN

Vista previa

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.

Novedades

Versión 1.3

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

Historial de versiones
1.3 29 de jun. de 2020

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

1.2 13 de jun. de 2020

Minor bug fix

1.1 13 de jun. de 2020

Now with 2-4 players

1.0 6 de jun. de 2020

First release

Qué hace

73 acciones
  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

Ver como código
Beta

Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.

#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()
Abrir en Cherri Playground Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

Más de gramps

Ver todo

También te puede gustar

Ver todo
Publicidad