When I execute this code it just simply uses all of values that it takes without any filtering. What is going on?
Second 'if' is supposed to ignore numbers that are bigger then 'start_limit'. In one of situations:
ship['length'] = 4
The variable 'place' is a list with two integers, each can be 0-9. So basically this part of function should filter only values of variable 'place' with integer 0-6 at index 1.
dice = 0 # debug start_limit = 10 - ship['length'] if dice == 0: for place in pc_list_of_available_places: # filters places within the board if place <= start_limit: