Skip to content

Instantly share code, notes, and snippets.

@monkey-codes
Created June 9, 2023 23:24
Show Gist options
  • Select an option

  • Save monkey-codes/e87c2f0d6c662ab362fb821d898b6649 to your computer and use it in GitHub Desktop.

Select an option

Save monkey-codes/e87c2f0d6c662ab362fb821d898b6649 to your computer and use it in GitHub Desktop.
Testing side effects on tic tac toe game
"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