@Override
    public void run() {
        
        try {
            this.out  = new DataOutputStream(socket.getOutputStream());
            this.in = new BufferedReader(new InputStreamReader(socket.getInputStream(), "US-ASCII"));

            finishFlag = false;            
            while(!finishFlag) {              
                if(in.ready()) {
                    processRequest(readFromClient());
                } else {
                    Thread.sleep(100);
                }
                
                while(gameID != null) {
                    Thread.sleep(100);
                }
            }
        } catch(IOException | InterruptedException e) {
            System.out.println("Lost connection with " + nickname + " (" + socket.getInetAddress() + ")");
        } 
        close();
    }