Sheep and rams game, written in Javascript