@@ -418,6 +418,24 @@ it('Snipe globally banned civ', () => {
418418 expect ( errors ) . toEqual ( [ ] ) ;
419419} ) ;
420420
421+ it ( 'Double Snipe' , ( ) => {
422+ let preset = new Preset ( "test" , Civilisation . ALL , [
423+ new Turn ( Player . HOST , Action . PICK , Exclusivity . GLOBAL ) ,
424+ new Turn ( Player . HOST , Action . PICK , Exclusivity . GLOBAL ) ,
425+ new Turn ( Player . HOST , Action . PICK , Exclusivity . GLOBAL ) ,
426+ new Turn ( Player . GUEST , Action . SNIPE , Exclusivity . GLOBAL ) ,
427+ new Turn ( Player . GUEST , Action . SNIPE , Exclusivity . GLOBAL ) ,
428+ ] ) ;
429+ const validator = new Validator ( prepareReadyStore ( preset , [
430+ new PlayerEvent ( Player . HOST , ActionType . PICK , Civilisation . AZTECS ) ,
431+ new PlayerEvent ( Player . HOST , ActionType . PICK , Civilisation . BRITONS ) ,
432+ new PlayerEvent ( Player . HOST , ActionType . PICK , Civilisation . CHINESE ) ,
433+ new PlayerEvent ( Player . GUEST , ActionType . SNIPE , Civilisation . BRITONS ) ,
434+ ] ) ) ;
435+ const errors : ValidationId [ ] = validator . validateAndApply ( DRAFT_ID , new PlayerEvent ( Player . GUEST , ActionType . SNIPE , Civilisation . CHINESE ) ) ;
436+ expect ( errors ) . toEqual ( [ ] ) ;
437+ } ) ;
438+
421439
422440const prepareStore = ( preset : Preset , events : DraftEvent [ ] = [ ] ) : DraftsStore => {
423441 const draft = new Draft ( NAME_HOST , NAME_GUEST , preset ) ;
0 commit comments