๐Ÿ“ฆ sleepyfran / duets

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

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

[<RequireQualifiedAccess>]
module TuneInstrumentCommand =
    /// Command which allows the player to tune their instrument mid-concert.
    let rec create ongoingConcert =
        Concert.createCommand
            "tune instrument"
            Command.tuneInstrumentDescription
            tuneInstrument
            (fun result points ->
                match result with
                | Done -> Concert.tuneInstrumentDone points
                | _ -> Concert.tooMuchTuning
                |> showMessage)
            ongoingConcert