Cyclic games and an algorithm to find minimax cycle means in directed graphs