@Override
    public void run() 
    {
        //start();
        Packet p_in;
        while(true)
        {
            p_in = null;
            try {
               p_in = (Packet) in.readObject();
            } catch (IOException ex) {
                System.out.print("ERR1");
                Logger.getLogger(ClientThread.class.getName()).log(Level.SEVERE, null, ex);
            } catch (ClassNotFoundException ex) {
                System.out.print("ERR2");
                Logger.getLogger(ClientThread.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            
            switch(p_in.getOp())
            {
                case 0:
                    System.out.println("new");
                    newGame(p_in);
                    break;
                case 1:
                    System.out.println("join");
                    joinGame(p_in);
                    break;
                case 2:
                    System.out.println("next");
                    nextRound(p_in);
                    break;
                case 3:
                    System.out.println("save");
                    saveGame(p_in);
                    break;
                case 4:
                    System.out.println("load");
                    loadGame(p_in);
                    break;
                case 5:
                    System.out.println("end");
                    endGame(p_in);
                    break;
                default:
                    notifyThis("Chyba: neznamy pozadavek");
                    break;
            }
        }
        
    }