Skip to content

Commit

Permalink
Merge pull request #3 from baurt/update-cli
Browse files Browse the repository at this point in the history
*add CI workflow
* too high message
  • Loading branch information
TillerBurr authored Sep 6, 2023
2 parents c1f0d52 + ae1c6d6 commit 5d5b36d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions project/src/{{package_name}}/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
)
CORRECT = re.compile("That's the right answer!")

INCORRECT_TOO_HIGH = re.compile("That's not the right answer; your answer is too high.")


def create_day_path(day: int) -> Path:
return Path(__file__).parent / f"day{day:02}"
Expand Down Expand Up @@ -72,6 +74,8 @@ def submit_answer(
r = post_solution(year=year, day=day, part=part, answer=answer)
if ALREADY_SOLVED.search(r):
print("❌❌ Already solved ❌❌")
elif INCORRECT_TOO_HIGH.search(r):
print("❌❌ Too High ❌❌")
elif CORRECT.search(r):
print("✅✅ Correct! ✅✅")
if part == 1:
Expand Down

0 comments on commit 5d5b36d

Please sign in to comment.