refactored into placePiece function in game.js
added win state - working.