danielkorzekwa/betting-exchange — Issue #1: Refactor Betex to introduce static typing and generics
Author: danielkorzekwa
Created: 2012-02-07 08:10:43+00:00
State: open

Example:

sealed trait Bet {
type MATCHING_BET <: Bet
def placeBet(bet: MATCHING_BET )
}

BackBet extends Bet {
type MATCHING_BET = LayBet
def placeBet(bet: MATCHING_BET )
}

BackBet extends Bet {
type MATCHING_BET = BackBet
def placeBet(bet: MATCHING_BET )
}

and the same in other places of Betex, e.g. UnmachedBackBets, UnmatchedLayBets,

and think about removing runner mapping from UnmatchedBets - make it runner unaware, it would simplify its design.