create do.js to implement the game rules