How can I declare a variable of type GameMethod class in a subclass of UIViewController? I get compile error of "Class GameViewController has no initializers" when I add the statement: var gamemodel: GameModel. My GameModel class is stored in file GameModel.swift that is stored in same folder as GameViewController.swift.
import UIKit
class GameViewController: UIViewController {. //**compile error here
var gamemodel: GameModel
@IBAction func northButton(_ sender: UIButton) {
gamemodel.move(direction: .north)
}