Module Expr Str ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias alias ClassDef bases body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr attr TupleLoad Num Num attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Call NameLoad Str decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad Call NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr Str attr TupleLoad Num Num attr Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad Call NameLoad attr Str attr Assign AttributeStore NameLoad attr Call NameLoad TupleLoad NameLoad NameLoad NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign AttributeStore NameLoad attr Call NameLoad TupleLoad Str Str NameLoad Assign AttributeStore NameLoad attr Call NameLoad TupleLoad Str Str NameLoad Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num NameLoad Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad TupleLoad Num TupleLoad Num Num TupleLoad Num TupleLoad Num Num TupleLoad Num TupleLoad Num Num TupleLoad Num TupleLoad Num Num TupleLoad Num TupleLoad Num Num TupleLoad Num TupleLoad Num Num TupleLoad Num TupleLoad Num Num TupleLoad Num TupleLoad Num Num For NameStore NameLoad body Expr Yield TupleLoad AttributeLoad NameLoad attr TupleLoad Num Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad Num Num Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assert CompareIn AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assert CompareIn AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assert CompareIn AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assert CompareNotIn AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad Num Num Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad TupleLoad Num Num Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assert CompareGt AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad TupleLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad Num Num Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr attr NameLoad attr Assign NameStore Call NameLoad keyword NameLoad Expr Call NameLoad NameLoad Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad Call NameLoad attr NameLoad attr Assign NameStore Call NameLoad keyword NameLoad Expr Call NameLoad NameLoad Call NameLoad decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad Call NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad Call NameLoad attr Str attr Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad Call NameLoad attr Str attr Assign AttributeStore AttributeLoad NameLoad attr attr Lambda arguments args defaults NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Lambda arguments args defaults NameLoad Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad TupleLoad Num Num Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Call NameLoad Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Call NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
Module for testing moving
 hamcrest assert_that equal_to is_ mockito mock pyherc.data Model Portal add_portal add_character get_characters get_character pyherc.data.constants Direction pyherc.data.model ESCAPED_DUNGEON pyherc.ports is_move_legal move set_action_factory pyherc.rules.moving.action EscapeAction pyherc.test.builders ActionFactoryBuilder CharacterBuilder LevelBuilder pyherc.test.helpers EventListener pyherc.test.matchers has_marked_for_redrawing is_illegal is_legal EventType mockito verify mock TestEventDispatching N/A N/A N/A 
    Tests for event dispatching relating to moving
     __init__ N/A N/A self N/A N/A N/A 
        Default constructor
         N/A N/A N/A N/A super __init__ N/A N/A self model None N/A N/A self character None N/A N/A self level None N/A N/A self listener None N/A N/A self actions None N/A setup N/A N/A self N/A N/A N/A 
        Setup test case
         N/A N/A self model N/A Model N/A N/A self character N/A N/A N/A N/A N/A N/A N/A CharacterBuilder with_model N/A self model with_location N/A 1 1 build N/A N/A N/A self model dungeon N/A N/A N/A N/A N/A LevelBuilder with_character N/A self character build N/A N/A self listener N/A mock N/A N/A N/A N/A self model register_event_listener N/A self listener N/A N/A set_action_factory N/A N/A N/A N/A N/A ActionFactoryBuilder with_move_factory build N/A test_event_is_relayed N/A N/A self N/A N/A N/A 
        Test that moving will create an event and send it forward
         N/A N/A move character N/A self character direction N/A Direction east N/A N/A N/A N/A verify N/A self listener receive_event N/A EventType move N/A N/A TestMoving N/A N/A N/A 
    Tests for moving
     __init__ N/A N/A self N/A N/A N/A 
        Default constructor
         N/A N/A N/A N/A super __init__ N/A N/A self actions None N/A N/A self character None N/A N/A self level1 None N/A N/A self level2 None N/A N/A self portal1 None N/A N/A self portal2 None N/A N/A self model None N/A setup N/A N/A self N/A N/A N/A 
        Setup the test case
         N/A N/A self character N/A N/A N/A CharacterBuilder build N/A N/A self level1 N/A N/A N/A N/A N/A N/A N/A LevelBuilder with_floor_tile floor with_wall_at N/A 1 0 build N/A N/A self level2 N/A N/A N/A N/A N/A LevelBuilder with_floor_tile floor build N/A N/A self portal1 N/A Portal N/A None None None N/A N/A N/A self portal1 icon 1 N/A N/A self portal2 N/A Portal N/A stairs stairs None N/A N/A self portal2 N/A Portal N/A stairs stairs None N/A N/A add_portal N/A self level1 N/A 5 5 N/A self portal1 N/A N/A add_portal N/A self level2 N/A 10 10 N/A self portal2 N/A self portal1 N/A N/A add_character N/A self level1 N/A 5 5 N/A self character N/A N/A set_action_factory N/A N/A N/A N/A N/A ActionFactoryBuilder with_move_factory build N/A test_moving_when_stairs_are_blocked N/A N/A self N/A N/A N/A 
        Moving should be possible, even if stairs other end is blocked
         N/A blocker N/A N/A N/A CharacterBuilder build N/A N/A add_character N/A self level2 N/A 10 10 blocker N/A N/A move character N/A self character direction N/A Direction enter N/A N/A assert_that N/A blocker level N/A is_ N/A equal_to N/A self level2 N/A N/A assert_that N/A N/A self character level N/A is_ N/A equal_to N/A self level2 N/A check_move_result N/A N/A self start direction expected_location N/A N/A N/A 
        Test that taking single step is possible
         N/A N/A N/A self character location start N/A N/A move character N/A self character direction direction N/A N/A assert_that N/A N/A self character location N/A is_ N/A equal_to expected_location N/A test_simple_move N/A N/A self N/A N/A N/A 
        Test that taking single step is possible
         N/A test_data N/A N/A 1 N/A 5 4 N/A 2 N/A 6 4 N/A 3 N/A 6 5 N/A 4 N/A 6 6 N/A 5 N/A 5 6 N/A 6 N/A 4 6 N/A 7 N/A 4 5 N/A 8 N/A 4 4 N/A row test_data N/A N/A N/A N/A N/A self check_move_result N/A 5 5 N/A row N/A 0 N/A row N/A 1 N/A test_walking_to_walls N/A N/A self N/A N/A N/A 
        Test that it is not possible to walk through walls
         N/A N/A N/A self character location N/A 1 1 N/A N/A move character N/A self character direction N/A Direction north N/A N/A assert_that N/A N/A self character location N/A is_ N/A equal_to N/A 1 1 N/A test_entering_portal N/A N/A self N/A N/A N/A 
        Test that character can change level via portal
         N/A N/A move character N/A self character direction N/A Direction enter N/A N/A assert_that N/A N/A self character level N/A is_ N/A equal_to N/A self level2 N/A N/A assert_that N/A N/A self character location N/A is_ N/A equal_to N/A 10 10 N/A test_entering_portal_adds_character_to_creatures N/A N/A self N/A N/A N/A 
        Test that entering portal will add character to the creatures list
         N/A N/A N/A N/A self character level N/A self level1 N/A N/A N/A self character N/A get_characters N/A self level1 N/A N/A move character N/A self character direction N/A Direction enter N/A N/A N/A N/A self character level N/A self level2 N/A N/A N/A self character N/A get_characters N/A self level2 N/A test_entering_portal_removes_character_from_old_level N/A N/A self N/A N/A N/A 
        Test that entering portal will remove character from level
         N/A N/A N/A N/A self character level N/A self level1 N/A N/A N/A self character N/A get_characters N/A self level1 N/A N/A move character N/A self character direction N/A Direction enter N/A N/A N/A self character N/A get_characters N/A self level1 N/A test_entering_non_existent_portal N/A N/A self N/A N/A N/A 
        Test that character can not walk through floor
         N/A N/A N/A self character location N/A 6 3 N/A N/A move character N/A self character direction N/A Direction enter N/A N/A assert_that N/A N/A self character location N/A is_ N/A equal_to N/A 6 3 N/A N/A assert_that N/A N/A self character level N/A is_ N/A equal_to N/A self level1 N/A test_moving_uses_time N/A N/A self N/A N/A N/A 
        Test that moving around uses time
         N/A tick N/A N/A self character tick N/A N/A move character N/A self character direction N/A Direction east N/A N/A N/A N/A self character tick tick N/A test_taking_escape_stairs_ends_game N/A N/A self N/A N/A N/A 
        Test that player taking escape stairs will create escape
         N/A portal3 N/A Portal N/A None None None N/A N/A portal3 exits_dungeon True N/A N/A add_portal N/A self level1 N/A 2 2 portal3 N/A N/A N/A self character location N/A 2 2 N/A N/A move character N/A self character direction N/A Direction enter N/A model N/A N/A self character model N/A N/A assert_that N/A model end_condition N/A is_ N/A equal_to ESCAPED_DUNGEON N/A N/A TestEscapeAction N/A N/A N/A 
    Tests for escape action
     __init__ N/A N/A self N/A N/A N/A 
        Default constructor
         N/A N/A N/A N/A super __init__ N/A test_player_character_can_escape N/A N/A self N/A N/A N/A 
        Test that escape action for player character is legal
         N/A model N/A mock N/A character N/A N/A N/A N/A N/A N/A N/A CharacterBuilder as_player_character with_model model build N/A action N/A EscapeAction character character N/A N/A assert_that action N/A is_legal N/A test_non_player_character_can_not_escape N/A N/A self N/A N/A N/A 
        Non player characters should not be able to escape
         N/A model N/A mock N/A character N/A N/A N/A N/A N/A CharacterBuilder with_model model build N/A action N/A EscapeAction character character N/A N/A assert_that action N/A is_illegal N/A N/A TestSwitchingPlaces N/A N/A N/A 
    Sometimes characters can switch places with each other
     __init__ N/A N/A self N/A N/A N/A 
        Default constructor
         N/A N/A N/A N/A super __init__ N/A N/A self level None N/A N/A self monster_1 None N/A N/A self monster_2 None N/A N/A self actions None N/A setup N/A N/A self N/A N/A N/A 
        Test setup
         N/A N/A self level N/A N/A N/A LevelBuilder build N/A N/A self monster_1 N/A N/A N/A N/A N/A CharacterBuilder with_name Pete build N/A N/A self monster_2 N/A N/A N/A N/A N/A CharacterBuilder with_name Uglak build N/A N/A N/A self monster_1 artificial_intelligence N/A N/A N/A N/A None N/A N/A N/A self monster_2 artificial_intelligence N/A N/A N/A N/A None N/A N/A add_character N/A self level N/A 5 5 N/A self monster_1 N/A N/A add_character N/A self level N/A 6 5 N/A self monster_2 N/A N/A set_action_factory N/A N/A N/A N/A N/A ActionFactoryBuilder with_move_factory build N/A test_switch_places N/A N/A self N/A N/A N/A 
        Two monsters can switch places
         N/A N/A move N/A self monster_1 N/A Direction east N/A N/A assert_that N/A N/A self monster_1 location N/A is_ N/A equal_to N/A 6 5 N/A N/A assert_that N/A N/A self monster_2 location N/A is_ N/A equal_to N/A 5 5 N/A test_system_consistency N/A N/A self N/A N/A N/A 
        Switching places should leave system in consistent state
         N/A N/A move N/A self monster_1 N/A Direction east N/A N/A assert_that N/A get_character N/A self level N/A 6 5 N/A is_ N/A equal_to N/A self monster_1 N/A N/A assert_that N/A get_character N/A self level N/A 5 5 N/A is_ N/A equal_to N/A self monster_2 N/A N/A