game working without winner recognition in javascript