When a card is selected from the middle of a collection, like in
(any ((current player) iloc HAND) 'C ....)
it is expensive. The cards are stored in lists, and removing from the middle of a list is O(n).
Maybe I can replace this with a doubly-linked list, and pass around nodes instead of cards, so that the removal is O(1)???
What are the consequences of keeping nodes when doing other operations? This might be tricky...
When a card is selected from the middle of a collection, like in
(any ((current player) iloc HAND) 'C ....)
it is expensive. The cards are stored in lists, and removing from the middle of a list is O(n).
Maybe I can replace this with a doubly-linked list, and pass around nodes instead of cards, so that the removal is O(1)???
What are the consequences of keeping nodes when doing other operations? This might be tricky...