kellyelton/OCTGN — Issue #106: A way to "link" cards to each others on the table
Author: db0
Created: 2012-02-09 06:23:27+00:00
State: open

Repost from the old bugtracker: https://www.skylabsonline.com/forum/discussion/comment/458

(Small complaint: Why can I not copy & paste from the skylabs forum? Had to open page source and do it from there)

I like the function that draws arrows on the table and given that this is possible, I’d like to suggest something similar but much more useful in the right hands. I would like to have a similar “drawing” function that stays persistent on the table and basically links two cards with each other.
The way this could be implemented would be to simply create a global dictionary which stores these connections as they are created in the game with the starting card (of the mouse draw) as the key and the end card as the value. Then anyone polling the say shared.links[“cardA”] will get the corresponding value: “cardB”.
The link could be visually displayed with a thin semi-transparent dotted line between the cards to avoid clutter.
This function will be useful for card games which simulate locations and movement, where for example you will be able to track which character-cards are on which location-cards by having the character-card as the key, and the location-card as the value.
Such a shared dictionary should of course be mofifyable by each player’s python scripts if possible.