Simple games in JavaScript