#Assignment: Drawing Shapes Using Turtle Graphics
#
#Description: This program reads information from a file that gives directions for turtle graphics, unfortuneatley this specific one doesn't run like the others as it ingnores the numbers in the text file and only acts upon the letters
#
#Author: Elijah Andrew Andrushenko
#WSU ID: 011476324
#Completion Time: Tuesday: 8:00 AM to 10:30 AM and Wednesday 7:00 PM to 8:30 PM An overall 4 hours of work (estimated)
#In completing this prgram, I obtained help or worked with the following:
#Nobody, unless Adam Carter's Wednesday Lecture counts Tried to use google but I didn't find anything of much use and I tried using Osble but none of the questions I understood


#Import Turtle in this fashion for less writing
from turtle import *
#Open and read the movements.txt file
input_file = open ('movements.txt', 'r')
lines = input_file.readlines()

#Read line 1 and have all the possible outputs ready
if lines[0] == 'F\n':
    forward(100)
elif lines[0] == 'L\n':
    left(90)
elif lines[0] == 'R\n':
    right(90)
elif lines[0] == 'B\n':
    backward(100)
else:
    forward(0)
    
#Read line 2 and have all the possible outputs ready 
if lines[1] == 'F\n':
    forward(100)
elif lines[1] == 'L\n':
    left(90)
elif lines[1] == 'R\n':
    right(90)
elif lines[1] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 3 and have all the possible outputs ready 
if lines[2] == 'F\n':
    forward(100)
elif lines[2] == 'L\n':
    left(90)
elif lines[2] == 'R\n':
    right(90)
elif lines[2] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 4 and have all the possible outputs ready 
if lines[3] == 'F\n':
    forward(100)
elif lines[3] == 'L\n':
    left(90)
elif lines[3] == 'R\n':
    right(90)
elif lines[3] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 5 and have all the possible outputs ready 
if lines[4] == 'F\n':
    forward(100)
elif lines[4] == 'L\n':
    left(90)
elif lines[4] == 'R\n':
    right(90)
elif lines[4] == 'B\n':
    backward(100)
else:
    forward(0)
    
#Read line 6 and have all the possible outputs ready 
if lines[5] == 'F\n':
    forward(100)
elif lines[5] == 'L\n':
    left(90)
elif lines[5] == 'R\n':
    right(90)
elif lines[5] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 7 and have all the possible outputs ready 
if lines[6] == 'F\n':
    forward(100)
elif lines[6] == 'L\n':
    left(90)
elif lines[6] == 'R\n':
    right(90)
elif lines[6] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 8 and have all the possible outputs ready 
if lines[7] == 'F\n':
    forward(100)
elif lines[7] == 'L\n':
    left(90)
elif lines[7] == 'R\n':
    right(90)
elif lines[7] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 9 and have all the possible outputs ready 
if lines[8] == 'F\n':
    forward(100)
elif lines[8] == 'L\n':
    left(90)
elif lines[8] == 'R\n':
    right(90)
elif lines[8] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 10 and have all the possible outputs ready 
if lines[9] == 'F\n':
    forward(100)
elif lines[9] == 'L\n':
    left(90)
elif lines[9] == 'R\n':
    right(90)
elif lines[9] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 11 and have all the possible outputs ready 
if lines[10] == 'F\n':
    forward(100)
elif lines[10] == 'L\n':
    left(90)
elif lines[10] == 'R\n':
    right(90)
elif lines[10] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 12 and have all the possible outputs ready 
if lines[11] == 'F\n':
    forward(100)
elif lines[11] == 'L\n':
    left(90)
elif lines[11] == 'R\n':
    right(90)
elif lines[11] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 13 and have all the possible outputs ready 
if lines[12] == 'F\n':
    forward(100)
elif lines[12] == 'L\n':
    left(90)
elif lines[12] == 'R\n':
    right(90)
elif lines[12] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 14 and have all the possible outputs ready 
if lines[13] == 'F\n':
    forward(100)
elif lines[13] == 'L\n':
    left(90)
elif lines[13] == 'R\n':
    right(90)
elif lines[13] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 15 and have all the possible outputs ready 
if lines[14] == 'F\n':
    forward(100)
elif lines[14] == 'L\n':
    left(90)
elif lines[14] == 'R\n':
    right(90)
elif lines[14] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 16 and have all the possible outputs ready 
if lines[15] == 'F\n':
    forward(100)
elif lines[15] == 'L\n':
    left(90)
elif lines[15] == 'R\n':
    right(90)
elif lines[15] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 17 and have all the possible outputs ready 
if lines[16] == 'F\n':
    forward(100)
elif lines[16] == 'L\n':
    left(90)
elif lines[16] == 'R\n':
    right(90)
elif lines[16] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 18 and have all the possible outputs ready 
if lines[17] == 'F\n':
    forward(100)
elif lines[17] == 'L\n':
    left(90)
elif lines[17] == 'R\n':
    right(90)
elif lines[17] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 19 and have all the possible outputs ready 
if lines[18] == 'F\n':
    forward(100)
elif lines[18] == 'L\n':
    left(90)
elif lines[18] == 'R\n':
    right(90)
elif lines[18] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 20 and have all the possible outputs ready 
if lines[19] == 'F\n':
    forward(100)
elif lines[19] == 'L\n':
    left(90)
elif lines[19] == 'R\n':
    right(90)
elif lines[19] == 'B\n':
    backward(100)
else:
    forward(0)
    
#Read line 21 and have all the possible outputs ready 
if lines[20] == 'F\n':
    forward(100)
elif lines[20] == 'L\n':
    left(90)
elif lines[20] == 'R\n':
    right(90)
elif lines[20] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 22 and have all the possible outputs ready 
if lines[21] == 'F\n':
    forward(100)
elif lines[21] == 'L\n':
    left(90)
elif lines[21] == 'R\n':
    right(90)
elif lines[21] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 23 and have all the possible outputs ready 
if lines[22] == 'F\n':
    forward(100)
elif lines[22] == 'L\n':
    left(90)
elif lines[22] == 'R\n':
    right(90)
elif lines[22] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 24 and have all the possible outputs ready 
if lines[23] == 'F\n':
    forward(100)
elif lines[23] == 'L\n':
    left(90)
elif lines[23] == 'R\n':
    right(90)
elif lines[23] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 25 and have all the possible outputs ready 
if lines[24] == 'F\n':
    forward(100)
elif lines[24] == 'L\n':
    left(90)
elif lines[24] == 'R\n':
    right(90)
elif lines[24] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 26 and have all the possible outputs ready 
if lines[25] == 'F\n':
    forward(100)
elif lines[25] == 'L\n':
    left(90)
elif lines[25] == 'R\n':
    right(90)
elif lines[25] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 27 and have all the possible outputs ready 
if lines[26] == 'F\n':
    forward(100)
elif lines[26] == 'L\n':
    left(90)
elif lines[26] == 'R\n':
    right(90)
elif lines[26] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 28 and have all the possible outputs ready 
if lines[27] == 'F\n':
    forward(100)
elif lines[27] == 'L\n':
    left(90)
elif lines[27] == 'R\n':
    right(90)
elif lines[27] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 29 and have all the possible outputs ready 
if lines[28] == 'F\n':
    forward(100)
elif lines[28] == 'L\n':
    left(90)
elif lines[28] == 'R\n':
    right(90)
elif lines[28] == 'B\n':
    backward(100)
else:
    forward(0)

#Read line 30 and have all the possible outputs ready 
if lines[29] == 'F\n':
    forward(100)
elif lines[29] == 'L\n':
    left(90)
elif lines[29] == 'R\n':
    right(90)
elif lines[29] == 'B\n':
    backward(100)
else:
    forward(0)

#close the program
input_file.close()




