Win Logic in JavaScript