function placePiece(piece){
        var x = piece.pos[0];
        var y = piece.pos[1];
        for(var i = 0; i < piece.type; i++ ){
            if (piece.orientation === 1){
                myBoard[x + i][y] = piece;
            } else{
                myBoard[x][y + i] = piece;
            }       
        }
    }
/**
     * Saves piece in the board according to the piece's position.
     * @param {Object} piece The piece object.
     */
Saves piece in the board according to the piece's position.
@param {Object} piece The piece object.
Saves piece in the board according to the piece ' s position . @param { Object } piece The piece object .
function placePiece(piece){
        var x = piece.pos[0];
        var y = piece.pos[1];
        for(var i = 0; i < piece.type; i++ ){
            if (piece.orientation === 1){
                myBoard[x + i][y] = piece;
            } else{
                myBoard[x][y + i] = piece;
            }       
        }
    }
function placePiece ( piece ) { var x = piece . pos [ 0 ] ; var y = piece . pos [ 1 ] ; for ( var i = 0 ; i < piece . type ; i ++ ) { if ( piece . orientation === 1 ) { myBoard [ x + i ] [ y ] = piece ; } else { myBoard [ x ] [ y + i ] = piece ; } } }
Saves piece in the board according to the piece's position.
Saves piece in the board according to the piece ' s position .