public void send(DataOutputStream outputStream)throws Exception{

        //send tanks
        Tank s;
        //outputStream.writeUTF("$tank$");
        outputStream.writeInt(tanks.size());
        for(Map.Entry<Integer, Tank> entry : tanks.entrySet()){
            s = entry.getValue();
            outputStream.writeInt(entry.getKey()); //it's a id of the tank which we send
            outputStream.writeInt(s.id_tank);
            outputStream.writeInt(s.id_armor);
            outputStream.writeInt(s.id_engine);
            outputStream.writeInt(s.id_first_weapon);
            outputStream.writeInt(s.id_second_weapon);
            outputStream.flush();
        }
        outputStream.flush();

        //send armor
        //outputStream.writeUTF("$armor$");
        outputStream.writeInt(armorsID.size());
        for(Integer entry : armorsID){
            outputStream.writeInt(entry);
        }
        outputStream.flush();

        //send engine
        //outputStream.writeUTF("$engine$");
        outputStream.writeInt(enginesID.size());
        for(Integer entry : enginesID){
            outputStream.writeInt(entry);
        }
        outputStream.flush();

        //send first weapon
        //outputStream.writeUTF("$first_weapon$");
        outputStream.writeInt(firstWeaponID.size());
        for(Integer entry : firstWeaponID){
            outputStream.writeInt(entry);
        }
        outputStream.flush();

        //send second weapon
        //outputStream.writeUTF("$second_weapon$");
        outputStream.writeInt(secondWeaponID.size());
        for(Integer entry : secondWeaponID){
            outputStream.writeInt(entry);
        }
        outputStream.flush();
    }