def find_position(x,y,block_list):
    """ Finds and returns the position(in the block array) of the block clicked by the mouse. """
    i=0
    for block in block_list:
        if x>block.x and x<block.x + 20 and y>block.y and y<block.y + 20:
            break
        i+=1
    return i