Preview:
    func flagTapped(_ number: Int){
        
        if number == correctAnswer{
            scoreTitle = "Correct!"
            totalScores += 2
        }else{
            scoreTitle = "Wrong!"
        }
        questionTries += 1
        if questionTries < 8{
            showingScore = true
        }else{
            gameOver = true
        }
    }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter