diff --git a/.gitignore b/.gitignore index bf7dd284920b0f6c33aa475c5c86481c712a4488..f3b14b2032fa6fc563276fa1dc680a69c29b9c0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ ### https://raw.github.com/github/gitignore/9d7ff09c7d38dce9ef03e7ea4dc908a622546757/Python.gitignore # Project-specific files -/conf.json +/conf*.json /problems/* !/problems/.gitkeep /solutions/* diff --git a/roles/host.py b/roles/host.py index 6f4b9a107029e86f9ca52c1c2fee58ef76feff89..05d928b6fdd71198cf5fc570ce507a70f533e631 100644 --- a/roles/host.py +++ b/roles/host.py @@ -84,6 +84,7 @@ class Host(object): if problem_key in self.problems: self.problems[problem_key].put_solution(solution) + print(solution['solution']) return {'status': 'registered'} else: return {'status': 'error'} diff --git a/solvers/hsgw b/solvers/hsgw index b306364dc696270165a9c67921720e4c6acf6866..0098cc9c1932bd192f6a5fe066d9aea7960e5400 160000 --- a/solvers/hsgw +++ b/solvers/hsgw @@ -1 +1 @@ -Subproject commit b306364dc696270165a9c67921720e4c6acf6866 +Subproject commit 0098cc9c1932bd192f6a5fe066d9aea7960e5400 diff --git a/utils/data.py b/utils/data.py index 811fad1855aa1e651c33826cb50f95c5c5db6046..a371b6db9bb23268a38c0a4ca5bd97fa6821499f 100644 --- a/utils/data.py +++ b/utils/data.py @@ -11,6 +11,7 @@ class Problem(object): self.name = '' self.size = (0, 0) self.block_num = 0 + self.problem = '' self.status = 'Ready' self.solutions = dict() @@ -23,6 +24,7 @@ class Problem(object): def _load_problem(self, path): with open(path, 'r') as fp: + q_text = fp.read() q_lines = fp.readlines() board_size = [0, 0] @@ -40,6 +42,7 @@ class Problem(object): self.size = board_size self.block_num = block_num self.name = name + self.problem = q_text self.status = 'Ready' def get_dict(self): @@ -48,6 +51,7 @@ class Problem(object): 'size': self.size, 'size_str': self.size_str, 'block_num': self.block_num, + 'problem': self.problem, 'status': self.status }