Exemple #1
0
        /// <summary>
        /// Metodas patikrina ar filme vaidino T. Cruise ir N.Kidman.
        /// </summary>
        /// <param name="film"></param>
        /// <returns></returns>
        bool CruisAndKidmanIsOrNo(Irasas film)
        {
            string actorOne = "T. Cruise";

            if (film.First_actor == actorOne || film.Second_actor == actorOne)
            {
                return(true);
            }
            return(false);
        }
Exemple #2
0
 bool FilmCheck(FilmContainer filmContainer, Irasas filmToBeChecked)
 {
     for (int i = 0; i < filmContainer.Count; i++)
     {
         if (filmContainer.GetFilm(i).Equals(filmToBeChecked))
         {
             return(false);
         }
     }
     return(true);
 }
Exemple #3
0
 /// <summary>
 /// Pagal reikalavimus surikiuojamas rekomenduomu filmu/serialu sarasas
 /// </summary>
 public void SortRecomendations()
 {
     for (int i = 0; i < Count - 1; i++)
     {
         Irasas minValue      = Films[i];
         int    minValueIndex = i;
         for (int j = i + 1; j < Count; j++)
         {
             if (Films[j] <= minValue)
             {
                 minValue      = Films[j];
                 minValueIndex = j;
             }
         }
         Films[minValueIndex] = Films[i];
         Films[i]             = minValue;
     }
 }
Exemple #4
0
 public void AddFilm(Irasas film, int index)
 {
     Films[index] = film;
 }
Exemple #5
0
 public void AddFilm(Irasas film)
 {
     Films[Count++] = film;
 }