Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        public void AddContract(Contract contract, Table table, int boardNumber)
        {
            BoardResult boardResult = GetBoardResult(boardNumber);

            boardResult.AddContract(contract, table);
        }
Exemple #4
0
 public void AddBoardResult(BoardResult result)
 {
     BoardResults.Add(result);
 }