server/engine/gameLogic/Player.js
// for each vertex, store buildings/knights of all players

for each vertex, store buildings/knights of all players
for each vertex store buildings / knights of all players
function storeVertexElements(vertexInfo, vertexData){
    if (!vertexInfo) return;
    var vertexData = vertexData || {};
    for (var i = 0; i<vertexInfo.length; i++){
        if (vertexInfo[i] && vertexInfo[i]['owner']){
            vertexData[vertexInfo[i].position] = {name: vertexInfo[i].owner.name, type: vertexInfo[i].level};
        }
    }
    return vertexData;
}
function storeVertexElements ( vertexInfo , vertexData ) { if ( ! vertexInfo ) return ; var vertexData = vertexData || { } ; for ( var i = 0 ; i < vertexInfo . length ; i ++ ) { if ( vertexInfo [ i ] && vertexInfo [ i ] [ 'owner' ] ) { vertexData [ vertexInfo [ i ] . position ] = { name : vertexInfo [ i ] . owner . name , type : vertexInfo [ i ] . level } ; } } return vertexData ; }
for each vertex, store buildings/knights of all players
for each vertex store buildings / knights of all players