Set, the card game: Difference between revisions

Content added Content deleted
m (→‎{{header|Wren}}: Improved quit mechanism.)
Line 401: Line 401:


=={{header|Quackery}}==
=={{header|Quackery}}==

Why does <code>isset</code>, the word that tests if three cards constitute a set, use <code>+</code> and <code>mod</code>?

If we map any of the properties, say colour, onto the numbers 0, 1 and 2, then the sum of three colours mod 3 is 0 if and only iff all the colours are different or all the colours are the same. This can be confirmed exhaustively, or for the underlying mathematics see the first two paragraphs of the section "A Mathematical Perspective" (pages 7 and 8) in this paper:

::[https://web.math.princeton.edu/~charchan/SET.pdf SETs and Anti-SETs: The Math Behind the Game of SET, by Charlotte Chan]


<code>transpose</code> is defined at [[Matrix transposition#Quackery]].
<code>transpose</code> is defined at [[Matrix transposition#Quackery]].