(direction)
| 13 | return m_direction |
| 14 | |
| 15 | def instance_direction_bottom_left(direction): # used when we need to get the bottom left corner of the cell. |
| 16 | if direction == 'N': |
| 17 | i_direction = (0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0) |
| 18 | elif direction == 'S': |
| 19 | i_direction = (-1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 1) |
| 20 | elif direction == 'W': |
| 21 | i_direction = (0, -1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0) |
| 22 | elif direction == 'E': |
| 23 | i_direction = (0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 1, 0) |
| 24 | elif direction == 'FN': |
| 25 | i_direction = (-1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0) |
| 26 | elif direction == 'FS': |
| 27 | i_direction = (0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 1) |
| 28 | elif direction == 'FW': |
| 29 | i_direction = (0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0) |
| 30 | elif direction == 'FE': |
| 31 | i_direction = (0, -1, -1, 0, 0, 0, 0, 0, 0, 1, 1, 0) |
| 32 | else: |
| 33 | raise ValueError('read_macro_direction_wrong') |
| 34 | return i_direction |
| 35 | |
| 36 | def my_range(start, end): |
| 37 | if start == end: |
no outgoing calls
no test coverage detected