Made a function to determine max turns