coding-horror / basic-computer-games

An updated version of the classic "Basic Computer Games" book, with well-written examples in a variety of common MEMORY SAFE, SCRIPTING programming languages. See https://coding-horror.github.io/basic-computer-games/
The Unlicense
10.84k stars 1.33k forks source link

Fix bug in win?/3 #881

Closed codeanpeace closed 1 year ago

codeanpeace commented 1 year ago

Unfortunately found a bug in the previous version. It makes an incorrect assumption that the first card’s value is less than that of the second card. The new version uses Enum.sort/1 to not rely on that assumption being true.

coding-horror commented 1 year ago

Appreciated!! 🤗