public void run() {

                String[] s = input.split(",");
                if (boardSquares[Integer.parseInt(s[1])][Integer.parseInt(s[2])].getIcon().equals(blue)) {

                    //find button
                    if (Integer.parseInt(s[0]) == 1) {
                        boardSquares[Integer.parseInt(s[1])][Integer.parseInt(s[2])].setIcon(terran);
                        boardSquares[Integer.parseInt(s[1])][Integer.parseInt(s[2])].setDisabledIcon(terran);
                        boardSquares[Integer.parseInt(s[1])][Integer.parseInt(s[2])].setEnabled(false);
                        turn.setIcon(zergTurn);

                    }
                    if (Integer.parseInt(s[0]) == 2) {
                        boardSquares[Integer.parseInt(s[1])][Integer.parseInt(s[2])].setIcon(zerg);
                        boardSquares[Integer.parseInt(s[1])][Integer.parseInt(s[2])].setDisabledIcon(zerg);
                        boardSquares[Integer.parseInt(s[1])][Integer.parseInt(s[2])].setEnabled(false);
                        turn.setIcon(terranTurn);

                    }

                    //change button by player
                    if (current == 1) {
                        current = 2;
                    } else {
                        current = 1;
                    }
                    if (s.length == 4) {

                        if (s[0].equals("1")) {
                            isPlaying = false;
                            jowinner.showMessageDialog(frame, "Terran Wins!");

                            try {
                                client.close();
                                System.exit(0);
                            } catch (IOException ex) {
                                ex.printStackTrace();
                            }

                        }
                        if (s[0].equals("2")) {
                            isPlaying = false;
                            jowinner.showMessageDialog(frame, "Zerg Wins!");
                            try {
                                client.close();
                                System.exit(0);

                            } catch (IOException ex) {
                                ex.printStackTrace();
                            }

                        }

                    }

                }

            }