When you are in a trick-taking game, the pointmap for precedence is usually reset each trick because of the lead changing. This is a lot of work to throw out and recreate the map, and is a lot of code to write each time.
There could be a way to (update (game points SCORE) ....) with only the new pieces that need to be reset.
So then in the initial portion of the game, we could say
(set (game points PRECEDENCE)
(((RANK : A) 14)
((RANK : K) 13)
((RANK : Q) 12)
((RANK : J) 11)
((RANK : TEN) 10)
((RANK : NINE) 9)
((RANK : EIGHT) 8)
((RANK : SEVEN) 7)
((RANK : SIX) 6)
((RANK : FIVE) 5)
((RANK : FOUR) 4)
((RANK : THREE) 3)
((RANK : TWO) 2)))
And in the later stage, it would be
(update (game points PRECEDENCE)
(((SUIT : (game str LEAD)) 100)))
When you are in a trick-taking game, the pointmap for precedence is usually reset each trick because of the lead changing. This is a lot of work to throw out and recreate the map, and is a lot of code to write each time.
There could be a way to (update (game points SCORE) ....) with only the new pieces that need to be reset.
So then in the initial portion of the game, we could say
(set (game points PRECEDENCE)
(((RANK : A) 14)
((RANK : K) 13)
((RANK : Q) 12)
((RANK : J) 11)
((RANK : TEN) 10)
((RANK : NINE) 9)
((RANK : EIGHT) 8)
((RANK : SEVEN) 7)
((RANK : SIX) 6)
((RANK : FIVE) 5)
((RANK : FOUR) 4)
((RANK : THREE) 3)
((RANK : TWO) 2)))
And in the later stage, it would be
(update (game points PRECEDENCE)
(((SUIT : (game str LEAD)) 100)))