示例#1
0
        public static List <Move> GetAllMoves(int TableId)
        {
            MoveDB      moveDB = new MoveDB();
            List <Move> moves  = moveDB.GetMoves(TableId);

            if (moves == null)
            {
                throw new Exception("No moves exist");
            }
            return(moves);
        }
示例#2
0
        public static void ClearEmptyTables()
        {
            PokerTableDB      pokerTableDB = new PokerTableDB();
            MoveDB            moveDB       = new MoveDB();
            List <PokerTable> pokerTables  = pokerTableDB.GetEmptyTables();

            if (pokerTables != null)
            {
                foreach (PokerTable pokerTable in pokerTables)
                {
                    moveDB.DeleteMovesByTableId(pokerTable.Id);
                }

                for (int i = 0; i < pokerTables.Count; i++)
                {
                    DeleteTable(pokerTables[i]);
                }
            }
        }
示例#3
0
        public static void InsertMove(Move newMove)
        {
            MoveDB moveDB = new MoveDB();

            moveDB.Insert(newMove);
        }