def guardarPartida(self): g = Guardar() try: self.setTableroActual() g.guardarValores(self.matriz, self.tableroActual, self.nombre, self.ui.lbl_level.text(), self.tm.toString()) if g.crearArchivo() == True: print "se creo archivo" else: print "cancelo o ocurrio algun error :(" except AttributeError: print "no ha empezado a jugar..." QtGui.QMessageBox.about(self, "Mensaje", "Aun no has empezado a jugar... intentalo :)")
def cargarPartida(self): g = Guardar() if g.leerArchivo() == True: self.tableroActual = g.matriz self.matriz = g.matriz self.nombre = g.nombre self.ui.lbl_jugador.setText(g.nombre) self.ui.lbl_level.setText(g.nivel) self.setTableroEnPantalla() self.activarTeclado() self.setCeldasBlanco() self.initCrono() else: return