This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dk.tennis.compare | |
import dk.atp.api.AtpWorldTourApi._ | |
import SurfaceEnum._ | |
import dk.tennisprob.TennisProbCalc.MatchTypeEnum._ | |
/** | |
* Calculates probability of winning a tennis match by player A against player B. For instance Roger Federer vs Novak Djokovic | |
* | |
*/ | |
trait TennisPlayerCompare { | |
/** | |
* Calculates probability of winning a tennis match by player A against player B. | |
* | |
* @param fullNamePlayerA e.g. Roger Federer | |
* @param fullNamePlayerB e.g. Novak Djokovic | |
* @param surface Clay, grass or hard. | |
* @param matchType Three or five set match. | |
* @param year Probability is calculated for the last day of a year. | |
* | |
* @return Probability between 0 and 1. | |
*/ | |
def matchProb(fullNamePlayerA: String, fullNamePlayerB: String, surface: SurfaceEnum, matchType: MatchTypeEnum, year:Int): Double | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment