Add second remote
This commit is contained in:
parent
48c58b610c
commit
8cde891ba2
8 changed files with 51 additions and 11 deletions
|
|
@ -98,11 +98,16 @@ type NightLightTests() =
|
|||
|
||||
let livingRoomLightsToggledOn =
|
||||
interactions
|
||||
|> Seq.filter (function
|
||||
| Interaction.LivingRoomControllingRemoteInteraction RemotePressedRightButton -> true
|
||||
| _ -> false)
|
||||
|> Seq.length
|
||||
|> fun rightPresses -> rightPresses % 2 = 0
|
||||
|> Seq.choose (function
|
||||
| Interaction.LivingRoomControllingRemoteInteraction interaction -> Some interaction
|
||||
| _ -> None)
|
||||
|> Seq.fold
|
||||
(fun state interaction ->
|
||||
match interaction with
|
||||
| RemotePressedRightButton -> not state
|
||||
| LivingRoomRemotePressedOnButton -> true
|
||||
| LivingRoomRemotePressedOffButton -> false)
|
||||
true
|
||||
|
||||
let isExpectedOn light =
|
||||
match light with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue