Skip to content
Snippets Groups Projects
challenge.md 1.04 KiB
Newer Older
  • Learn to ignore specific revisions
  • !!! info ""
    :construction: Section under Construction :construction:
    
    This section explain all the functionnalities in the challenge part
    
    ## Quiz
    
    ## Mission
    
    ## Duel
    
    ### On launch  
    
      In order to find a valid reference period we search for a period which is defined by the duel duration.  
      We check the most recent period first if it's complete and then we go farther and farther in the time if the ones before got missing values.  
      We also define a threshold for a maximum old period (6 months for the moment). If the thresold is reached and no valid period was found, we alert the user that he can't lunch the duel and have to wait before he can retry this process.
    
    ### On going  
    
      Every time the user go into the duel mode, we are checking if the duel is finished.
      if (actualDate - startDate) > duelDuration, the duel is done.
    
    ### On finish  
    
      Once the state of the duel is set to DONE, we save the user result and determine if he wins (userComsumption < threshold of the reference period) or if he loses. Then the user sees his earned badge.