unified stdin/file solving
This commit is contained in:
parent
5f3384d4f2
commit
b5443cb424
@ -1,6 +0,0 @@
|
||||
import sys
|
||||
|
||||
from maze import parse_maze
|
||||
|
||||
m = parse_maze(open(sys.argv[1], 'r').read())
|
||||
print m.solve()
|
@ -2,5 +2,8 @@ import sys
|
||||
|
||||
from maze import parse_maze
|
||||
|
||||
if len(sys.argv) == 2:
|
||||
m = parse_maze(open(sys.argv[1], 'r').read())
|
||||
else:
|
||||
m = parse_maze(sys.stdin.read())
|
||||
print m.solve()
|
||||
|
Loading…
Reference in New Issue
Block a user