Skip to content

A typelevel approach to the Tic-Tac-Toe Kata using some Dotty features

License

Notifications You must be signed in to change notification settings

memoizr/typelevel-tic-tac-toe-dotty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typelevel Tic-tac-toe

Who says that games should have a runtime? Here's a game that requires no runtime whatsoever, you play it by writing source code! If it compiles, you've made a legal move, if you can ask for a winner, you have one and you can find out who it is!

This is just a demonstration to see what you can do when you use something as powerful as Type projections and Union types. Of course the downside of it all is that Type projections will make any type system unsound! So take any of this with a grain of salt, and focus on the entertainment value of playing a game completely at compile time, without resorting to macros or anything like that.

Enjoy.

About

A typelevel approach to the Tic-Tac-Toe Kata using some Dotty features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages