public override int calculateScore(IRecommendationsGetters dbPackingClass, BookGeneralData book, CurrentUser user)
        {
            if (ModuleInfo.Active)
            {
                LinkedList <BookGeneralData> books = dbPackingClass.getBooksWithGeneralDataWithin05hour(user);
                int recentlySearched = 0;
                foreach (BookGeneralData b in books)
                {
                    if (b.id == book.id)
                    {
                        recentlySearched++;
                    }
                }

                int recentlySearchedCategs     = 0;
                LinkedList <string> bookCategs = dbPackingClass.getBookCategories(book);
                foreach (BookWithAuthorsAndCategories b in books)
                {
                    LinkedList <string> secondBookCategs = dbPackingClass.getBookCategories(b);
                    foreach (string categ in bookCategs)
                    {
                        if (secondBookCategs.Contains(categ))
                        {
                            recentlySearchedCategs++;
                        }
                    }
                }
                makeConsoleLog(ModuleInfo.MainMultiplicator * (recentlySearched * ModuleInfo.getMultiplicatorAt("recentlySearched") + recentlySearchedCategs * ModuleInfo.getMultiplicatorAt("categories")));
                return(ModuleInfo.MainMultiplicator * (recentlySearched * ModuleInfo.getMultiplicatorAt("recentlySearched") + recentlySearchedCategs * ModuleInfo.getMultiplicatorAt("categories")));
            }
            return(0);
        }
        public static int countSameCategoriesBooks(BookGeneralData book, LinkedList <BookGeneralData> boughtBooks, IRecommendationsGetters dbPackingClass)
        {
            int totalSimilarCategsCount        = 0;
            LinkedList <string> thisBookCategs = dbPackingClass.getBookCategories(book);

            foreach (Book boughtBook in boughtBooks)
            {
                int categsCount = 0;
                LinkedList <string> bookCategs = dbPackingClass.getBookCategories(boughtBook);
                foreach (string thisBookCateg in thisBookCategs)
                {
                    if (bookCategs.Contains(thisBookCateg))
                    {
                        categsCount++;
                    }
                }
                totalSimilarCategsCount += categsCount;
            }

            return(totalSimilarCategsCount);
        }
 public override int calculateScore(IRecommendationsGetters dbPackingClass, BookGeneralData book, CurrentUser user)
 {
     if (ModuleInfo.Active)
     {
         LinkedList <string> likedCategs = dbPackingClass.getLikedCategories(user);
         LinkedList <string> bookcategs  = dbPackingClass.getBookCategories(book);
         int categsCount = 0;
         foreach (string categ in bookcategs)
         {
             if (likedCategs.Contains(categ))
             {
                 categsCount++;
             }
         }
         makeConsoleLog(categsCount * ModuleInfo.MainMultiplicator);
         return(categsCount * ModuleInfo.MainMultiplicator);
     }
     return(0);
 }