Halite Home

Why adding one simple if-else, make my bot to not compile?


#1

Inside one of the functions, I needed my bot to take, randomly, two seperate paths. So i added this in the first line of the function;
if (random.choice((0,1)) == 0):
..............
else:
..............
but my bot doesn't compile.
It gets stuck on:
python Mybot.py
python RandomBot.py

My debugging shows that the problem is this new addition to my code. But I think it is perfectly valid.
I dont know what is the problem here!


#2

Have you mixed spaces and indents ?


#3

No. I have double checked identations.


#4

If you email your code to halite@halite.io, we can take a look.


#5

I figured out the mistake. Thank you for your concern