Skip to content
Snippets Groups Projects
Commit 68b1cd6f authored by Scott Wong's avatar Scott Wong
Browse files

Added test situations

parent 870dffb4
No related branches found
No related tags found
No related merge requests found
......@@ -191,5 +191,52 @@ def find_target(piece_key):
dictTargets[piece_key] = ()
else:
# Xuan: does this 'variable' has any value? since it is out side its scope.
dictTargets[piece_key] = dictPieces[key]
dictTargets[piece_key] = dictPieces[targetPiece]
return
# Situation 1: If you plan the route ahead without knowing any other piece route,
# there will be a crash at tile N as both R and S try to take a straight line
# .-'-._.-'-._.-'-._.-'-._.-'-.
# | | | | | |
# .-'-._.-'-._.-'-._.-'-._.-'-._.-'-.
# | | p | | | s | |
# .-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-.
# | | | | | | | |
# .-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-.
# | | | | | | | | |
# .-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-.
# | | | | | N | | | | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'
# | | | | | | | | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'
# | | | | | | | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'
# | | R | | | S | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'
# | | | | | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'
# Situation 2 (B are blocks)
# I'm not sure if they will throw something this tricky at us
# but this should be solvable
# .-'-._.-'-._.-'-._.-'-._.-'-.
# | | | | | |
# .-'-._.-'-._.-'-._.-'-._.-'-._.-'-.
# | | | | | | |
# .-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-.
# | | | | | | | |
# .-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-.
# | B | B | B | B | B | B | B | |
# .-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-.
# | B | P | | | S | r | p | B | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'
# | B | B | B | B | B | B | B | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'
# | | | | | | | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'
# | | | | | | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'
# | | | | | |
# '-._.-'-._.-'-._.-'-._.-'-._.-'
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment