]> Pileus Git - ~andy/rhawk/blobdiff - spades.awk
Fix tie games, finally, after 4 years
[~andy/rhawk] / spades.awk
index a377ed5c415b6e6a6ac9a1e5c351e580e8f8b249..3f357d2da6b8e5d88269ccb6bbe9ab01a7dda734 100644 (file)
@@ -379,8 +379,8 @@ function sp_play(card,      winner, pi)
            sp_tricks[2] + sp_tricks[3] == 13) {
                sp_say("Round over!")
                sp_score()
-               if (sp_scores[0] >= sp_playto || sp_scores[1] >= sp_playto &&
-                   sp_scores[0]              != sp_scores[1]) {
+               if ((sp_scores[0] >= sp_playto || sp_scores[1] >= sp_playto) &&
+                   (sp_scores[0]              != sp_scores[1])) {
                        sp_say("Game over!")
                        winner = sp_scores[0] > sp_scores[1] ? 0 : 1
                        looser = !winner