コード例 #1
0
 def it_doesnt_convert_legacy_plus_ids_if_piece_count_is_greater_than_legacy_plus_id(
     self, sokoban_plus
 ):
     sokoban_plus = SokobanPlusFactory(
         pieces_count=SokobanPlus._LEGACY_DEFAULT_PLUS_ID,
         boxorder="1 5 42 {0} 23".
         format(SokobanPlus._LEGACY_DEFAULT_PLUS_ID),
         goalorder="1 5 42 {0} 23".
         format(SokobanPlus._LEGACY_DEFAULT_PLUS_ID)
     )
     sokoban_plus.is_enabled = True
     assert sokoban_plus.boxorder == "1 5 42 {0} 23".format(
         SokobanPlus._LEGACY_DEFAULT_PLUS_ID
     )
     assert sokoban_plus.goalorder == "1 5 42 {0} 23".format(
         SokobanPlus._LEGACY_DEFAULT_PLUS_ID
     )
コード例 #2
0
 def it_converts_legacy_plus_ids_silently_if_piece_count_is_smaller_than_legacy_plus_id(
     self
 ):
     sokoban_plus = SokobanPlusFactory(
         pieces_count=10,
         boxorder="1 5 42 {0} 23".
         format(SokobanPlus._LEGACY_DEFAULT_PLUS_ID),
         goalorder="1 5 42 {0} 23".
         format(SokobanPlus._LEGACY_DEFAULT_PLUS_ID)
     )
     sokoban_plus.is_enabled = True
     assert sokoban_plus.boxorder == "1 5 42 {0} 23".format(
         SokobanPlus.DEFAULT_PLUS_ID
     )
     assert sokoban_plus.goalorder == "1 5 42 {0} 23".format(
         SokobanPlus.DEFAULT_PLUS_ID
     )