$Any := (Points >= 0);
$ntop := (shape [4,3,3,3] OR [4,4,3,2] OR [5,3,3,2]);
$.1n. := (14 TO 16 Points) AND ($ntop);
$.2n. := (20 TO 22 Points) AND ($ntop);
$notBalanced :=  NOT ($ntop);
$openingHand := (12 TO 16 Points);
$.1s. := $openingHand AND (Spades > 4) AND NOT $.1n.;
$.1h. := $openingHand AND (Hearts > 4) AND NOT $.1n.;
$.2C. := $openingHand AND (Clubs > 4) AND ((Hearts ?= 4) OR (Spades ?= 4) OR (Clubs > 5));
$.1D. := $openingHand AND NOT ($.1n. OR $.1s. OR $.1h. OR $.2C.);
$.1C. := (Points > 16) AND NOT $.2n.;
$.P. := (Points < 12);
$.1C.1D. := (Points < 8);
$.1C.1D.1N. := $ntop AND (17 TO 19 Points);
$.1C.1D.1S. := (Spades > 4) AND NOT $ntop;
$.1C.1D.1H. := (Hearts > 4) AND NOT $ntop;
$.1C.1D.2D. := (Diamonds > 4) AND (Hearts < 5) AND (Spades < 5) AND NOT $ntop;
$.1C.1D.2C. := (Clubs > 4) AND (Hearts < 5) AND (Spades < 5) AND (Diamonds < 5) AND NOT $ntop;
$.1C.1D.2N. := (23 TO 24 Points) AND $ntop;
$.1N.2C. := (Points > 8) AND ((Hearts ?= 4) OR (Spades ?= 4));
$.1N.2C.2D. := (Spades < 4) AND (Hearts < 4);
$.1N.2C.2H. := (Hearts > 3);
$.1N.2C.2S. := (Spades > 3) AND (Hearts < 4);
$.1N.2D. := (Hearts > 4);
$.1N.2H. := (Spades > 4);
$.1N.2D.2H. := (Hearts < 4) OR (Points < 17);
$.1N.2D.2S. := (Spades < 4) OR (Points < 17);
$.1N.2D.3H. := (Hearts > 3) AND (Points ?= 17);
$.1N.2D.3S. := (Spades > 3) AND (Points ?= 17);
$.1N.2D.2H.2N. := (Points ?= 8) AND (Spades < 4) AND (shape [5,3,3,2] OR [5,4,2,2]);
$.1N.2D.2H.3N. := (9 TO 14 Points) AND (Spades < 4) AND (shape [5,3,3,2] OR [5,4,2,2]);
$.1N.2H.2S.2N. := (Points ?= 8) AND (Hearts < 4) AND (shape [5,3,3,2] OR [5,4,2,2]);
$.1N.2H.2S.3N. := (9 TO 14 Points) AND (Hearts < 4) AND (shape [5,3,3,2] OR [5,4,2,2]);
end
