@Override
    public void run(){

        while(this.subAlive){
            
          
            try { 
                pushSubAtributes();
            } catch (IOException ex){
                Logger.getLogger(SubmarineServer.class.getName()).log(Level.SEVERE, null, ex);
            }
            //scan the area around and recieve the list
            radar.scan(posX, posY, ocean.radarRange);
            radarCheck = radar.returnCoor();
            
            
            try {
                pushRadar();
            } catch (IOException ex) {
                Logger.getLogger(SubmarineServer.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            //if sub is too deap explodes
            if(this.depth <= 0){
                this.subAlive = false;
            }
 
            try {
                sleep(20);
            } catch (InterruptedException ex) {
                Logger.getLogger(SubmarineServer.class.getName()).log(Level.SEVERE, null, ex);
            }
        }    }