Example #1
0
        public string buildClue()
        {
            Song songForClue = null;

            //The same singer sang the song
            this.Clue = "The same singer sang the song <song_name> ";
            //Build Clue by Artist skill
            //the firsttt clue
            //with skills
            songForClue = db.GetSongbyjoin(songForQuiestion.Artist_id, User_email);
            if (songForClue != null)
            {
                this.Clue = this.Clue.Replace("<song_name>", songForClue.Song_name);
                return(this.Clue);
            }

            //without skills
            songForClue = db.GetRandomSongByArtistID(this.songForQuiestion.Artist_id);

            if (songForClue != null)
            {
                this.Clue = this.Clue.Replace("<song_name>", songForClue.Song_name);
                return(this.Clue);
            }

            return(this.Clue);
        }
Example #2
0
        public string buildClue()
        {
            Song songForClue = null;


            //The place is the same place that the artist Moses was born
            this.Clue = "The place is the same place that the artist <artist_name> was born";

            songForClue = db.GetSongbyjoin(ar_id, User_email);
            if (songForClue != null)
            {
                this.Clue = this.Clue.Replace("<artist_name>", songForClue.Artist_name);
                return(this.Clue);
            }
            //without skills
            string artistNameByPopAndLoc = db.getArtistNameByPopAndLoc(ar_id, User_email, loc);

            if (artistNameByPopAndLoc != "")
            {
                this.Clue = this.Clue.Replace("<artist_name>", artistNameByPopAndLoc);
                return(this.Clue);
            }

            else if (loc != "")
            {
                Clue      = "The first letter is X";
                this.Clue = this.Clue.Replace("X", loc[0].ToString());
                return(this.Clue);
            }
            else
            {
                Clue = "NO LOCATION Found";
                return(Clue);
            }
        }