public Result GetResult(int boardNumber, int tableNumber) { BoardResult br = GetBoardResult(boardNumber); foreach (Result result in br.Results) { if (result.Table != null && result.Table.Number == tableNumber) { return(result); } } return(null); }
private BoardResult GetBoardResult(int boardNumber) { foreach (BoardResult b in BoardResults) { if (b.Board.Number == boardNumber) { return(b); } } // Does not exist yet, create board: Board board = new Board(boardNumber); BoardResult boardResult = new BoardResult(board); AddBoardResult(boardResult); return(boardResult); }
public void AddContract(Contract contract, Table table, int boardNumber) { BoardResult boardResult = GetBoardResult(boardNumber); boardResult.AddContract(contract, table); }
public void AddBoardResult(BoardResult result) { BoardResults.Add(result); }