Andrew Plotkin | 6 Dec 07:41

Re: UI API changes

Discussion around the office is leaning towards:

> A new "ui" namespace for translation tokens.

"yes" on that.

> - Being able to mark more than one seat at a time
> - Multiple kinds of marks (e.g., "attacker" and "defender" in a Cosmic 
> Encounter turn. Or "winner" at the end of a game.)

"yes" on both of those too. However, not an unlimited number of kinds of 
marks. While infinite flexibility would be cool, we're thinking of having 
just a small handful of marks -- types 1, 2, 3, and 4 -- also to be known 
as "the arrow", "the pointy arrow", "the wide arrow", and "the other 
arrow". Or something like that.

Maybe they should be named by strings rather than integers, to provide 
some feeble semantics for their use, but then they'd have to be "turn", 
"win", "steve", and "herman". Since your-turn and you-won are the only two 
semantic roles generalizable across a majority of games. (That I can think 
of.)

(There will be a separate indicator which marks the seat you're sitting 
in. Since that ought to be obvious at a glance. This will be handled by 
the client, not the UI code.)

For the actual API, I expect to use a single polymorphic function:

seatmark()
     all marks off
seatmark(seatid)
     mark the given seat with mark 1 (and unmark other seats)
seatmark(array)
     mark the seats as given in the associative array (which maps seat IDs
     to integers; 0 or undefined means no mark, 1-4 means the so-numbered
     mark)

--Z

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*
I'm still thinking about what to put in this space.

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Gmane