-
-
Save monkey-codes/e87c2f0d6c662ab362fb821d898b6649 to your computer and use it in GitHub Desktop.
Testing side effects on tic tac toe game
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "should handle won games" { | |
| either { | |
| val (_, context) = | |
| simulateGame { """ | |
| |x0 o1 __ | |
| |x6 o3 o5 | |
| |x2 __ x4""" } | |
| .bind() | |
| context shouldMatchScreen | |
| { | |
| """ | |
| | x o - | |
| | x o o | |
| | x - x | |
| |x Won | |
| |Ctrl-C to quit or enter for a new game: | |
| """ | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment