Merge branch 'master' of hongabar.org:robotgame
3
.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
*~
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.py[co]
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.4 KiB |
BIN
resources/graphics/lever/down-up/lever0001.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
resources/graphics/lever/down-up/lever0002.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
resources/graphics/lever/down-up/lever0003.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
resources/graphics/lever/down-up/lever0004.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
resources/graphics/lever/down-up/lever0005.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
resources/graphics/lever/down-up/lever0006.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
resources/graphics/lever/down-up/lever0007.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
resources/graphics/lever/down-up/lever0008.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
resources/graphics/lever/down-up/lever0009.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
resources/graphics/lever/down-up/lever0010.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
resources/graphics/lever/left-right/lever0001.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
resources/graphics/lever/left-right/lever0002.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
resources/graphics/lever/left-right/lever0003.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
resources/graphics/lever/left-right/lever0004.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
resources/graphics/lever/left-right/lever0005.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
resources/graphics/lever/left-right/lever0006.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
resources/graphics/lever/left-right/lever0007.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
resources/graphics/lever/left-right/lever0008.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
resources/graphics/lever/left-right/lever0009.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
resources/graphics/lever/left-right/lever0010.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
resources/graphics/robot_idle/down/robot0004.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0005.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0006.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0007.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0008.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0009.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0010.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0011.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0012.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0013.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0014.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0015.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0016.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0017.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0018.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/down/robot0019.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0020.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0021.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0022.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0023.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0024.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0025.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0026.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/down/robot0027.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/graphics/robot_idle/down/robot0028.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
resources/graphics/robot_idle/right/robot0004.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
resources/graphics/robot_idle/right/robot0005.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
resources/graphics/robot_idle/right/robot0006.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/right/robot0007.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/right/robot0008.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0009.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0010.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0011.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0012.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0013.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0014.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0015.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0016.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0017.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/graphics/robot_idle/right/robot0018.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/right/robot0019.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
resources/graphics/robot_idle/right/robot0020.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
resources/graphics/robot_idle/right/robot0021.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
resources/graphics/robot_idle/right/robot0022.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/right/robot0023.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/right/robot0024.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/right/robot0025.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/right/robot0026.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/right/robot0027.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/right/robot0028.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
resources/graphics/robot_idle/up/robot0004.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0005.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0006.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0007.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0008.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0009.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0010.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0011.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0012.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0013.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0014.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0015.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0016.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0017.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0018.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0019.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/graphics/robot_idle/up/robot0020.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0021.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0022.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0023.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0024.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0025.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0026.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
resources/graphics/robot_idle/up/robot0027.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/graphics/robot_idle/up/robot0028.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 9.4 KiB |
@ -53,13 +53,9 @@ class Left(Direction):
|
||||
x, y = pos
|
||||
return x - 1, y
|
||||
|
||||
succ = {Up: Right,
|
||||
Right: Down,
|
||||
Down: Left,
|
||||
Left: Up}.__getitem__
|
||||
all_directions = set((Up, Left, Down, Right))
|
||||
|
||||
pred = {Right: Up,
|
||||
Down: Right,
|
||||
Left: Down,
|
||||
Up: Left}.__getitem__
|
||||
succ = lambda d: all_directions[(all_directions.index(d) + 1) % 4]
|
||||
pred = lambda d: all_directions[(all_directions.index(d) - 1) % 4]
|
||||
|
||||
isDirection = lambda obj: obj in (Up, Left, Down, Right)
|
||||
|