| ▲ | ferd 2 hours ago | |
Shameless plug: a code walkthru modeling the rules of chess, ment as an exercise/teaching functional programming (in Clojure): https://neuroning.com/boardgames-exercise/notebooks/walkthro... The implementation makes it really easy to add new piece types or rules. For example, here's the full logic for rooks (sans castling): | ||