[+] Implement regular math expressions

This commit is contained in:
Hykilpikonna
2021-01-27 20:20:41 -05:00
parent ed86c83d82
commit 2b0109468c
4 changed files with 36 additions and 37 deletions
@@ -102,6 +102,11 @@ class AlarmActivationViewController: EndEditingOnReturn
// Initialize alarm
switch wvm
{
case "Math 1", "Math 2", "Math 3":
let q = MathExpProblem(size: Int(wvm[5...5])!)
puzzleQuestionLabel.text = "Solve: \(q.prob.replacingOccurrences(of: "**", with: "^"))"
puzzleAnswers = [q.ans]
puzzleView.show()
case "Factor":
initFactorProblem()
puzzleView.show()