Working version

Now everything seems to work. Crocodiles aren’t eating each other, but instead lock if can’t decide who will move. Deadlocks are prevented by some ad-hoc code (main.js, lines 272–273).