From 120b5fa6e014839128c62d8d04edecba770ff53a Mon Sep 17 00:00:00 2001 From: Alan Davidson Date: Sat, 21 Sep 2024 13:00:15 -0400 Subject: [PATCH] and a situation for completing the relay --- src/Bids/Lebensohl.hs | 10 ++++++++++ src/Topics/Lebensohl.hs | 43 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/src/Bids/Lebensohl.hs b/src/Bids/Lebensohl.hs index 56d938d..0fde2e2 100644 --- a/src/Bids/Lebensohl.hs +++ b/src/Bids/Lebensohl.hs @@ -34,6 +34,7 @@ module Bids.Lebensohl( , b1No2S3C , b1No2S3D , b1No2S3H + , b1NoBM2N -- For when the opponents show both majors ) where @@ -223,3 +224,12 @@ b1No2S2N = do , b1No2S2N3C3H ] makeAlertableCall (T.Bid 2 T.Notrump) ("relay to " .+ T.Bid 3 T.Clubs) + + +-- Have a special one for when the opponents show both majors +b1NoBM2N :: Action +b1NoBM2N = do + alternatives [ b1No2S2N3CP + , b1No2S2N3C3D + ] + makeAlertableCall (T.Bid 2 T.Notrump) ("relay to " .+ T.Bid 3 T.Clubs) diff --git a/src/Topics/Lebensohl.hs b/src/Topics/Lebensohl.hs index 82246f9..3bceb2b 100644 --- a/src/Topics/Lebensohl.hs +++ b/src/Topics/Lebensohl.hs @@ -9,7 +9,7 @@ import qualified Bids.Lebensohl as Leb import qualified Bids.Meckwell as MW import qualified Bids.NaturalOneNotrumpDefense as Nat import CommonBids(setOpener) -import EDSL(alternatives) +import EDSL(alternatives, makePass) import Output(Description, (.+)) import Situation(situation, (<~)) import qualified Terminology as T @@ -177,7 +177,7 @@ signoff3 = let -- Again, don't bid a major when RHO has them both. 3D should be -- natural and not a cue bid, because you'd never want to have a -- Stayman-like bid when RHO has shown both majors. - , (Capp.b1No2D, alternatives [Leb.b1No2H2N, Leb.b1No2S2N], + , (Capp.b1No2D, Leb.b1NoBM2N, [Leb.b1No2D2N3CP, Leb.b1No2H2N3C3D]) , (Capp.b1No2H, Leb.b1No2H2N, [Leb.b1No2H2N3CP, Leb.b1No2H2N3C3D]) @@ -189,12 +189,48 @@ signoff3 = let <~ T.allVulnerabilities +completeRelay :: Situations +completeRelay = let + sit (overcall, relay) = let + action = do + setOpener T.South + Leb.b1N + _ <- overcall + relay + makePass -- TODO: prevent RHO from raising LHO's suit + explanation = + "We opened a strong " .+ Leb.b1N .+ ", and LHO interfered " .+ + "with the auction. Partner made a lebensohl bid, and we " .+ + "should complete the relay to see what they do next. Partner " .+ + "is captain of the auction, and knows where we're going." + in situation "relay" action Leb.b1N2N3C explanation + in + wrap $ return sit + <~ [ (Nat.b1No2D, Leb.b1No2D2N) + , (Nat.b1No2H, Leb.b1No2H2N) + , (Nat.b1No2S, Leb.b1No2S2N) + , (DONT.b1No2D, Leb.b1No2D2N) + , (DONT.b1No2H, Leb.b1NoBM2N) + , (DONT.b1No2S, Leb.b1No2S2N) + , (MW.b1No2D, Leb.b1No2D2N) + , (MW.b1No2H, Leb.b1No2H2N) + , (MW.b1No2S, Leb.b1No2S2N) + -- Again, don't bid a major when RHO has them both. 3D should be + -- natural and not a cue bid, because you'd never want to have a + -- Stayman-like bid when RHO has shown both majors. + , (Capp.b1No2D, Leb.b1NoBM2N) + , (Capp.b1No2H, Leb.b1No2H2N) + , (Capp.b1No2S, Leb.b1No2S2N) + ] + -- West should be an unpassed hand to interfere. + <~ [T.North, T.South, T.East] + <~ T.allVulnerabilities + -- TODO: -- jump to 3N -- relay to 3N (answer should be 2N planning to rebid 3N) -- cue bid for Stayman -- relay to cue bid (answer should be 2N planning to rebid the cue) --- complete the relay -- pass after relay and signoff -- pass or bid game after relay and invite @@ -208,4 +244,5 @@ topic = makeTopic , signoff2 , signoff3 , gameForce + , completeRelay ]