
# Example: 2134,8 PM, 20151215, 20:00, New York, knicks, cavaliers, , basketball
game(gameid, startdate, starttime, location, team1, team2, otherteams, gametype)

# Example: Cavaliers, LeBron
team(teamid, player)

# Example: basketball, numberoffouls
gametype(typeid, statallowed)

# If Tyler proposes a bet
# 171, Tyler'sid, 2134, LeBron > 24 points or LeBron < 4 fouls, true, false, 1000, 5:1
bet(betid, userid, gameid, predicatestring, proposerflag, allornothingflag, maximumamount, odds )

# So far the above assumes end-of-game statistics.
# Would we want bets to be stated at particular times during the game?
# If so, we need to get the appropriate information (e.g. points scored
# and at what time).
# The bet predicate could include a starttimewithingame, endtimewithingame.

# 2134, LeBron, points=30
# stats are a pair
result(gameid, playerid, stats)

# Tyler's id, 10000, 4532
account(userid, balance, committed)

# login password system

Functionality: 

1. Proposer enters a bet. 

2. Ability to search based on game and based on keywords of predicatestring.

3. Ability to take a bet
including partially unless allornothingflag is set to true.

4. Proposer can cancel the untaken  part of the bet.

5. At the end of the game, the predicates are evaluated based on results and
winners or losers of each bet are found and paid.

