Fix saving and loading

This commit is contained in:
Joscha 2016-09-19 06:03:19 +00:00
parent 4fc83cff57
commit 32e320b820

View file

@ -1,4 +1,5 @@
import sys import sys
import json
import random import random
class Markov: class Markov:
@ -29,6 +30,7 @@ class Markov:
before = random.choice(list(self.matrix)) before = random.choice(list(self.matrix))
selection = self.matrix[before] selection = self.matrix[before]
print(repr(before), repr(selection))
choice = random.randrange(sum(selection.values())) choice = random.randrange(sum(selection.values()))
counter = 0 counter = 0