Get the state of play last time
(self)
| 189 | pickle_file.close() |
| 190 | |
| 191 | def openlasttime(self): |
| 192 | """Get the state of play last time""" |
| 193 | try: |
| 194 | pickle_file = open("cricket1.dat", "r") |
| 195 | laststateofplay = cPickle.load(pickle_file) |
| 196 | |
| 197 | except: |
| 198 | #as unable to use the file just use 0 |
| 199 | laststateofplay = [0,0,0] |
| 200 | xold = laststateofplay[0] |
| 201 | |
| 202 | yold = laststateofplay[1] |
| 203 | |
| 204 | wold = laststateofplay[2] |
| 205 | |
| 206 | return xold, yold, wold |
| 207 | |
| 208 | class CricketGUI(Frame): |
| 209 | """GUI to enter the info for the cricket class""" |
no test coverage detected