Rock paper scissors in javascript