public static Score[] getHighscores(){
     Score[] scores = new Score[Config.HIGHSCORES_COUNT];

     try {
         if (Pang.game.haveToBeOffline) {throw (new java.net.ConnectException());}
         Socket socket = new Socket(Config.HOST_NAME, Config.PORT_NUMBER);
         OutputStream os = socket.getOutputStream();
         PrintWriter pw = new PrintWriter(os, true);

         pw.println(CNetProtocol.GIVEMEHIGHSCORES);


         InputStream is = socket.getInputStream();
         BufferedReader br = new BufferedReader(new InputStreamReader(is));
         String answer = br.readLine();
         // System.out.println(answer);

         if(answer.equals(SNetProtocol.HIGHSCORES)){
             System.out.println(SNetProtocol.HIGHSCORES);

             for(int i=0;i<Config.HIGHSCORES_COUNT;i++){
              scores[i] = new Score(br.readLine(), Integer.parseInt(br.readLine()));
             }

         }else if (answer.equals(SNetProtocol.NOSUCHFILE))
             System.out.println(SNetProtocol.NOSUCHFILE);

         else
             System.out.println("Unidentified response.");
         socket.close();
     } catch (ConnectException e){
         System.out.println("Connection exception: " + e);
         ScoresHandler sh = new ScoresHandler();
         scores = sh.getScores();
         if(scores == null){
              scores = new Score[Config.HIGHSCORES_COUNT];
             for(int i=0;i<Config.HIGHSCORES_COUNT;i++)
                 scores[i] = new Score("___", 0);
         }
     } catch (Exception e) {
         System.err.println("Client exception: " + e);
     }
     return scores;
 }