list_moves_availables(); //don't take moves that will generate an ever used tower configuration $useful_moves = array(); foreach($availablesMoves as $move){ } }