コード例 #1
0
  private int calculateInternalScore(OutPutScreen outPutScreen) {

    int internalScore = 0;

    if (outPutScreen.isNoRenforcement()
        && !outPutScreen.isJtrForSideOne()
        && !outPutScreen.isJtrForSideTwo()) {
      return internalScore;
    } else {

      if (outPutScreen.isInternalBothSide()) {
        internalScore = internalScore + 2;
      }
      if (outPutScreen.isJtrForSideOne()) {
        internalScore = internalScore + 2;
      }
      if (outPutScreen.isJtrForSideTwo()) {
        internalScore = internalScore + 2;
      }
      if (outPutScreen.isInternalReinforcement()) {
        internalScore = internalScore + 1;
      }
      if (outPutScreen.isIntAndExtEachSide()) {
        internalScore = internalScore + 1;
      }
      if (outPutScreen.isExtAndInternalEachSide()) {
        internalScore = internalScore + 1;
      }
    }

    return internalScore;
  }
コード例 #2
0
  private int setPriority(OutPutScreen outPutScreen) {
    if (outPutScreen.isNoRenforcement()
        && !outPutScreen.isJtrForSideOne()
        && !outPutScreen.isJtrForSideTwo()) {
      return 0;
    } else {

      if (outPutScreen.isInternalBothSide()) {
        return 3;
      }
      if (outPutScreen.isJtrForSideOne()) {
        return 2;
      }
      if (outPutScreen.isJtrForSideTwo()) {
        return 2;
      }
      if (outPutScreen.isInternalReinforcement()) {
        return 1;
      }
      if (outPutScreen.isIntAndExtEachSide()) {
        return 5;
      }
      if (outPutScreen.isExtAndInternalEachSide()) {
        return 6;
      }

      if (outPutScreen.isExternalBothSide()) {

        return 4;
      }
      if (outPutScreen.isExternalReinforcement()) {
        return 2;
      }
      if (outPutScreen.isExtAndInternalEachSide()) {
        return 6;
      }
      if (outPutScreen.isIntAndExtEachSide()) {
        return 5;
      }
    }
    return 7;
  }
コード例 #3
0
  private int calculateExternalScore(OutPutScreen outPutScreen) {

    int externalScore = 0;
    if (outPutScreen.isNoRenforcement()) {
      return externalScore;
    } else {
      if (outPutScreen.isExternalBothSide()) {

        externalScore = externalScore + 2;
      }
      if (outPutScreen.isExternalReinforcement()) {
        externalScore = externalScore + 1;
      }
      if (outPutScreen.isExtAndInternalEachSide()) {
        externalScore = externalScore + 1;
      }
      if (outPutScreen.isIntAndExtEachSide()) {
        externalScore = externalScore + 1;
      }
    }
    return externalScore;
  }