public void endTurn(String player) {
        if(state != GameState.IN_PROGRESS){
            return;
        }
        if(!currentPlayer.getName().equals(player)){
            logger.debug("Current player is:" + currentPlayer.getName() + " so " + player +" can't do anyting now.");
            return;
        }
        if( !currentPlayer.isDead() && (!currentPlayer.isMoved() && !currentPlayer.isSearched())){
            //can't skip turns in some special rooms
            if( map.getTile(currentPlayer.getPosition()).getEffects().size() > 0){
                 for(Effect e : map.getTile(currentPlayer.getPosition()).getEffects()){
                     if(e instanceof BottomlessPit){
                        addMessage(new ChatMessage("This place is too dangerous to wait here.", "Game"));
                         return;
                     }
                 }
            }
            logger.debug("Player " + currentPlayer.getName() + " ended his turn without doing anything.");
            addMessage(new ChatMessage("You wait and do nothing.", "Game"));
            currentPlayer.setMoved(true);
//            logger.debug("Player " + currentPlayer.getName() + " can't end his turn yet.");
//            addMessage(new ChatMessage("You cannot end your turn without moving or searching.", "Game"));
            return;
        }
        resetTurnVariables();
        newTurn();
    }