SeaofWords : View Controller for Sea of Words - Ben-Stacey/COSC345 GitHub Wiki
SeaofWords
View Controller for Sea of Words
public class SeaofWords: UIViewController
Inheritance
UIViewController
Methods
Method that calls
- viewDidLoad
viewDidLoad()
Method that calls
- updateUI
- updateQuestions
public override func viewDidLoad()
didReceiveMemoryWarning()
public override func didReceiveMemoryWarning()
'quit()'
Action that allows users to quit the minigame on button press
@IBAction func quit(_ sender: UIButton){
self.dismiss(animated: true, completion: nil)
}
'answerPressed()'
Action that determines which button is pressed nd if the answer is the right answer Parameters : -_ sender: UIButton
@IBAction func answerPressed(_ sender: UIButton) {
}
'updateUI()'
The method that checks the language and current progress of the minigame and updates questions and possible answers accordingly
func updateUI(){
}
'updateQuestions'
The method that checks what the currently selected language is and displays elements from the question array associated with that language
func updateQuestion(){
}
'restartQuiz'
The method responsible for allowig the user to restart the quiz, clears current progressa and score by setting the variables score and questionNumber to 0 and calls the method updateQuestions()
func restartQuiz(){
}