Look for "Div I."
b) If Div I extract conference, schedule and roster checks
c) If not Div I maintains stub
3) Extract scoreboard info for each date in the season
4) For each game in the schedule
a) Expand and verify team info
b) Verify game on schedule and build game database, track locations, start times, neutral court, tournament, as well as score.
c) Add line score for player.
d) Add line score for team
5) Profit
1) Load all NCAA Schools -- http://data.ncaa.com/jsonp/schools (skipping where name == null) 2) For each school load http://www.ncaa.com/schools/$school$/basketball-men a) Extract
package com.fijimf.deepfij
import org.joda.time.{DateMidnight, DateTime}
case class Team(id:Long, name:String)
case class Game(id:Long, date:DateTime, homeTeam:Team, awayTeam:Team, result:Option[Result])
case class Result(homeScore:Int, awayScore:Int)
case class Schedule(games:Map[DateMidnight, List[Game]], teams:List[Team])
case class Bettor(id:Long, name:String, offers:List[Offer], bets:List[Bet], balance:Double, availableBalance:Double)
case class Offer(id:Long, game:Game, team:Team, doubleSpread:Int)
case class Bet(game:Game, homeBettor:Bettor, awayBettor:Bettor, doubleSpread:Int)
case class Book(schedule:Schedule, bettors:List[Bettor], bets:List[Bet]) {
def addBettor(p:Bettor):Book = ???
def addTeam(t:Team):Book = ???
def addGame(g:Game):Book = ???
def offerBet(o:Offer): Book = ???
def processResult(gameId:Long, result:Result)= ???
def sweepOffers(timestamp:DateTime) = ???
}