]> Pileus Git - ~andy/rhawk/commitdiff
Fix tie games, finally, after 4 years
authorAndy Spencer <andy753421@gmail.com>
Thu, 28 Jan 2016 05:11:32 +0000 (05:11 +0000)
committerAndy Spencer <andy753421@gmail.com>
Thu, 28 Jan 2016 05:11:32 +0000 (05:11 +0000)
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()
            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
                        sp_say("Game over!")
                        winner = sp_scores[0] > sp_scores[1] ? 0 : 1
                        looser = !winner