Skip to content

Commit

Permalink
Added main method and updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stephhuynh18 committed Aug 4, 2017
1 parent dfdd818 commit 4df16eb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
17 changes: 14 additions & 3 deletions DIID.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,17 @@ def convertToNum(self, direction):
else:
raise ValueError

def main():
startFileName = "test5.txt"
outputFileName = "test5out.txt"

moveFileName = "test6.txt"
outputMoveFileName = "test6out.txt"

solution = DIID(startFileName, outputFileName)
solution.move_all_rovers(moveFileName, outputMoveFileName)

main()

################################################################

Expand All @@ -345,14 +356,14 @@ def convertToNum(self, direction):
################################################################

#correct move input with one outside of boundaries
test5 = DIID("test5.txt", "test5out.txt")
test5.move_all_rovers("test6.txt", "test6out.txt")
#test5 = DIID("test5.txt", "test5out.txt")
#test5.move_all_rovers("test6.txt", "test6out.txt")

#incorrect move input
#test5.move_all_rovers("test7.txt", "test8out.txt")

#rover does not exist
test5.move_all_rovers("test8.txt", "test9out.txt")
#test5.move_all_rovers("test8.txt", "test9out.txt")


################################################################
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# DIIDChallenge
# DIIDChallenge

1. In the main method change the file names to any of the file names you would like to use.
2. Run by using the command line and going to directory of "DIID.py". Then run the command python DIID.py. Output should be in the specified file.

0 comments on commit 4df16eb

Please sign in to comment.