Skip to content

Commit

Permalink
Enhance handle identification's problem choice (cheran-senthil#111)
Browse files Browse the repository at this point in the history
Forcing the identifier problem to have a low rating so the problem can easily be solved after having a compile error
  • Loading branch information
kuroni authored and algmyr committed Aug 18, 2019
1 parent 3ac23e4 commit 0b9bd22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tle/cogs/handles.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ async def identify(self, ctx, handle: str):
return

invoker = str(ctx.author)
problem = random.choice(cf_common.cache2.problem_cache.problems)
problems = [prob for prob in cf_common.cache2.problem_cache.problems
if prob.rating <= 1200]
problem = random.choice(problems)
self.identify_map[invoker] = (users[0].handle, problem.name)
await ctx.send(f'`{invoker}`, submit a compile error to <{problem.url}> and then run `;handle report`')

Expand Down

0 comments on commit 0b9bd22

Please sign in to comment.