solve update
This commit is contained in:
parent
37671dd4d6
commit
4324b91d85
6
play.py
6
play.py
@ -52,16 +52,18 @@ def main_loop():
|
|||||||
print("Word was: {}".format(word))
|
print("Word was: {}".format(word))
|
||||||
|
|
||||||
|
|
||||||
def test():
|
def do_test():
|
||||||
assert build_letter_hint('yummy', 'slily') == '----Y'
|
assert build_letter_hint('yummy', 'slily') == '----Y'
|
||||||
assert build_letter_hint('yummy', 'slyly') == 'y---Y'
|
assert build_letter_hint('yummy', 'slyly') == 'y---Y'
|
||||||
assert build_letter_hint('yymyy', 'slyyy') == 'y--YY'
|
assert build_letter_hint('yymyy', 'slyyy') == 'y--YY'
|
||||||
assert build_letter_hint('ymmyy', 'slyyy') == 'y--YY'
|
assert build_letter_hint('ymmyy', 'slyyy') == 'y--YY'
|
||||||
assert build_letter_hint('mmmyy', 'slyyy') == '---YY'
|
assert build_letter_hint('mmmyy', 'slyyy') == '---YY'
|
||||||
|
assert build_letter_hint('cabby', 'abbey') == '-aBbY'
|
||||||
|
assert build_letter_hint('abbey', 'cabby') == 'abB-Y'
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
test()
|
do_test()
|
||||||
main_loop()
|
main_loop()
|
||||||
|
|
||||||
|
|
||||||
|
2
solve.py
2
solve.py
@ -161,6 +161,8 @@ def do_test():
|
|||||||
assert [w for w in round_words('', ['---yy'], ['y----'], dictionary=['slyyy'])] == ['slyyy']
|
assert [w for w in round_words('', ['---yy'], ['y----'], dictionary=['slyyy'])] == ['slyyy']
|
||||||
assert [w for w in round_words('', ['---yy'], ['-----'], dictionary=['slyyy'])] == ['slyyy']
|
assert [w for w in round_words('', ['---yy'], ['-----'], dictionary=['slyyy'])] == ['slyyy']
|
||||||
assert [w for w in round_words('', ['-y---'], ['--y--'], dictionary=['sysys'])] == ['sysys']
|
assert [w for w in round_words('', ['-y---'], ['--y--'], dictionary=['sysys'])] == ['sysys']
|
||||||
|
assert [w for w in round_words('', ['--b-y'], ['ab---'], dictionary=['cabby'])] == ['cabby']
|
||||||
|
assert [w for w in round_words('', ['--b-y'], ['-a-b-'], dictionary=['abbey'])] == ['abbey']
|
||||||
assert [w for w in round_words('nu', ['-o-ns'], ['-----'], dictionary=['towns'])] == ['towns'] # nouns
|
assert [w for w in round_words('nu', ['-o-ns'], ['-----'], dictionary=['towns'])] == ['towns'] # nouns
|
||||||
assert [w for w in round_words('fos', ['-l---'], ['---s-'], dictionary=['slung'])] == ['slung'] # typed basil floss
|
assert [w for w in round_words('fos', ['-l---'], ['---s-'], dictionary=['slung'])] == ['slung'] # typed basil floss
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user