Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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