@Override
    public void update(GameContainer container, int delta) throws SlickException {
        Input input = container.getInput();
        HandleTanks htanks = new HandleTanks();
        HandleCoinsAndHealth hcoinshealth = new HandleCoinsAndHealth();
        MakeMap makeMap = new MakeMap();
        MoveAndShoot moveAndShoot = new MoveAndShoot();
        RunWithNoGUI mapPrint = new RunWithNoGUI();

        Play play = new Play();

        hcoinshealth.updateCoin(delta);
        // hcoinshealth.updateKillCoin(delta);
        hcoinshealth.detectCoinCollisions();
        hcoinshealth.updateLife(delta);
        hcoinshealth.detectLifeCollisions();
        hcoinshealth.detectKillCoinCollisions();
        try {
            String message = server.readSENDMessage();
            System.out.println("msg : " + message);
            if (message.length() > 6 && message.charAt(0) == 'G') {
//                new Play().makeMove("UP#");
                htanks.setNewTankPositions(message, SIZE);
                makeMap.updateBrickStatus(message, SIZE, mapWidth, mapLenght);
                play.makeMove(moveAndShoot.getTheNextMove());
                mapPrint.printMap(map);
            } else if (message.charAt(0) == 'C' && message.charAt(1) == ':') {
                hcoinshealth.handleCoins(message, SIZE);
                // play.makeMove(moveAndShoot.getTheNextMove());
                //hcoinshealth.updateCoin();
            } else if (message.charAt(0) == 'L' && message.charAt(1) == ':') {
                hcoinshealth.handleLives(message, SIZE);
                // play.makeMove(moveAndShoot.getTheNextMove());
            } else if (message.charAt(0) == 'C') {
                play.makeMove("SHOOT#");
            }

        } catch (IOException ex) {
            Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);
            System.out.println("readSendMessage error : "+ex);
        }
    }