From 038ca8f252240d6583a48fdcc7d7dcdc5fc33ec5 Mon Sep 17 00:00:00 2001 From: Walther Neuper Date: Sat, 12 Dec 2009 12:56:17 +0000 Subject: _generate_calcs --> get_next_calc --- diff --git a/ReckonPrimer.activity/learner.py b/ReckonPrimer.activity/learner.py index 15ce440..a678574 100644 --- a/ReckonPrimer.activity/learner.py +++ b/ReckonPrimer.activity/learner.py @@ -7,7 +7,6 @@ class Learner: self._display = display self._coach = coach self._ex = None - self._calcs = None # TODO rm after _generate_calcs --> get_next_calc self._key = None self._curr_in = None # TODO rm ??? pass @@ -25,11 +24,8 @@ class Learner: #print('in Session.notify: msg=,data=', msg, data) if msg == 'setting-done': # from Coach self._ex = data - self._calcs = data._generate_calcs() # TODO rm self._key = data.get_topic() - (self._calcs).reverse() # TODO rm - _calc = (self._calcs).pop() - #print('in Session.notify: calc=', _calc) + _calc = self._ex.get_next_calc() _lines, self._input = data.format(_calc) self._display.display_calc(_lines) self._curr_in = self._input.pop() #need _curr_in in notify @@ -45,7 +41,7 @@ class Learner: except IndexError: # start new calc self._display.show_progress() try: # get_next_calc - _calc = (self._calcs).pop() + _calc = self._ex.get_next_calc() print('in Session.notify: calc=', _calc) _lines, self._input = self._ex.format(_calc) self._display.display_calc(_lines) -- cgit v0.9.1