ShareShortcuts

Skins

For 2-4 players

gramps
Fazer fork de “Skins”

Criou algo novo a partir deste atalho? Compartilhe como uma derivação: ela se torna um atalho seu, que você gerencia, e as duas páginas têm links entre si para que gramps receba o crédito.

  1. 1Obtenha o atalho e altere-o no app Atalhos. Dê a ele um nome próprio.
  2. 2Compartilhe pelo app Atalhos e copie o link do iCloud.
  3. 3Volte aqui, cole o link e descreva o que mudou, por exemplo: “Adicionei uma etapa que usa a Apple Intelligence para personalizar o texto.”
Downloads
59K
Salvo
0
Ações
73
Categoria
Fun
Versão
1.3
Idioma
EN

Pré-visualização

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.

Novidades

Versão 1.3

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

Histórico de versões
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

O que ele faz

73 ações
  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 as ações deste atalho escritas em Cherri, uma linguagem de programação para o app Atalhos. Ótimo para aprender como ele 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 no Cherri Playground Descompilado com cherri 2.3.0 (GPL-2.0). Pode precisar de pequenos ajustes antes de compilar.

Avaliações e comentários

Escrever uma avaliação
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ainda não há avaliações. Seja o primeiro a compartilhar o que você pensa!

Publicidade

Mais de gramps

Ver tudo

Você também pode gostar

Ver tudo
Publicidade