public boolean act(Agent agent, Action action){
      boolean flag = (action != null);
      if( flag  ){
          String act = action.getCode();
          int DIGITS = SudokuLanguage.DIGITS;
          int index = language.getActionIndex(act);
          if( index < language.getActionsNumber() - 1 ){
              int row = index / (DIGITS * DIGITS);
              index -= row * DIGITS * DIGITS;
              int column = index / DIGITS;
              index -= column * DIGITS;
              int value = index + 1;
              if (board.set(row, column, value)) {
                  if (board.solved()) {
                      getAgent().die();
                      updateViews(SimpleView.DONE);
                  } else {
                      updateViews("");
                  }
              } else {
                  updateViews(SimpleView.ERROR + "[Invalid action " + act + "]");
              }
          }
      }
      return flag;
    }