@@ -810,3 +810,43 @@ describe('bluff clues', () => {
810
810
ExAsserts . cardHasInferences ( slot1 , [ 'p1' ] ) ;
811
811
} ) ;
812
812
} ) ;
813
+
814
+ describe ( 'guide principle' , ( ) => {
815
+ it ( `understands a bluff is not deferred by another bluff` , ( ) => {
816
+ const game = setup ( HGroup , [
817
+ [ 'xx' , 'xx' , 'xx' , 'xx' ] ,
818
+ [ 'b4' , 'p2' , 'b5' , 'b3' ] ,
819
+ [ 'y1' , 'g2' , 'b5' , 'b2' ] ,
820
+ [ 'g1' , 'y5' , 'b1' , 'g5' ]
821
+ ] , {
822
+ level : { min : 11 } ,
823
+ starting : PLAYER . BOB
824
+ } ) ;
825
+ takeTurn ( game , 'Bob clues red to Alice (slot 2)' ) ; // Could be a bluff
826
+ ExAsserts . cardHasInferences ( game . common . thoughts [ game . state . hands [ PLAYER . ALICE ] [ 1 ] . order ] , [ 'r1' , 'r2' ] ) ;
827
+
828
+ takeTurn ( game , 'Cathy clues purple to Bob' ) ; // Cathy did not play and clued another bluff or finesse.
829
+ ExAsserts . cardHasInferences ( game . common . thoughts [ game . state . hands [ PLAYER . ALICE ] [ 1 ] . order ] , [ 'r1' ] ) ;
830
+ } ) ;
831
+
832
+ it ( `understands a bluff is not deferred by a finesse` , ( ) => {
833
+ const game = setup ( HGroup , [
834
+ [ 'xx' , 'xx' , 'xx' , 'xx' ] ,
835
+ [ 'b4' , 'p2' , 'b5' , 'b3' ] ,
836
+ [ 'y1' , 'g2' , 'b5' , 'b2' ] ,
837
+ [ 'p1' , 'y5' , 'b1' , 'g5' ]
838
+ ] , {
839
+ level : { min : 11 } ,
840
+ starting : PLAYER . BOB
841
+ } ) ;
842
+ takeTurn ( game , 'Bob clues red to Alice (slot 2)' ) ; // Could be a bluff
843
+ ExAsserts . cardHasInferences ( game . common . thoughts [ game . state . hands [ PLAYER . ALICE ] [ 1 ] . order ] , [ 'r1' , 'r2' ] ) ;
844
+
845
+ // A bluff can be deferred to perform a finesse per
846
+ // https://hanabi.github.io/level-15#a-table-for-deferring-bluffs
847
+ // but the circumstances would need to preclude anyone else accidentally playing into it.
848
+ // For now, this is not allowed.
849
+ takeTurn ( game , 'Cathy clues purple to Bob' ) ; // Cathy did not play and clued another bluff or finesse.
850
+ ExAsserts . cardHasInferences ( game . common . thoughts [ game . state . hands [ PLAYER . ALICE ] [ 1 ] . order ] , [ 'r1' ] ) ;
851
+ } ) ;
852
+ } ) ;
0 commit comments