๐Ÿ“ฆ sleepyfran / duets

๐Ÿ“„ GreetAudience.Command.fs ยท 24 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24namespace Duets.Cli.Components.Commands

open Duets.Cli.Components
open Duets.Cli.Components.Commands
open Duets.Cli.Text
open Duets.Simulation.Concerts.Live

[<RequireQualifiedAccess>]
module GreetAudienceCommand =
    /// Command which greets the audience in the concert.
    let rec create ongoingConcert =
        Concert.createCommand
            "greet audience"
            Command.greetAudienceDescription
            greetAudience
            (fun result points ->
                match result with
                | TooManyRepetitionsPenalized
                | TooManyRepetitionsNotDone ->
                    Concert.greetAudienceGreetedMoreThanOnceTip points
                | _ -> Concert.greetAudienceDone points
                |> showMessage)
            ongoingConcert