Rock paper scissors game in javascript