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); }
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]); } } }
public static void InsertMove(Move newMove) { MoveDB moveDB = new MoveDB(); moveDB.Insert(newMove); }