-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcards_spec.txt
70 lines (52 loc) · 2.29 KB
/
cards_spec.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# basic operations
* create group of cards
- private group: "owner" sees one side of the cards, others see the other side
* flipping card(s)
* shuffle group
* rotate cards
* action privileges?
* reset? (get all cards and put back in deck)
## done
* create group of cards
- group types:
* stack
* normal (side-by-side)
* overlapped
* add card(s) to group
* move group position
* move card(s) to another group
* move card(s) inside group
* deck is a predefined (hidden)stack
* game starts with all the cards available
* player can join game in progress
* player view points/ orientation?
--
TODO
--
New API (v 1.1):
Assumptions:
* target group defines the state of the moved card
* every change to a group the server sends a new id
* commands with the wrong group id are refused
create group -> (source group id, source card idx, new position)
all <- (actor, source group old id, source group new id, target group new id, card image*)
move card -> (source group id, source card idx, target group id, target card idx)
all <- (actor, source group old id, source group new id, source card idx, target group old id, target group new id, target group card idx**, card image*)
reposition group -> (source group id, new position)
all <- (actor, source group old id, source group new id, new position)
restyle group -> (source group id, new style)
all <- (actor, source group old id, source group new id, new style)
shuffle group -> (group id)
all <- (actor, source group old id, source group new id, [card image, ...]*)
set ownership -> (source group id, owner***)
all <- (actor, source group old id, source group new id, owner, [card image, ...]*)
* if (target) group has owner, only visible to him. The rest will receive a generic "back of the card" image.
** if target group has owner, only visible to him.
*** a player, no one or everyone.
Examples:
* hidden deck = create group, no owner
* dealing card = create group (source deck) + set owner to player + move more cards
* discard (visible) = create group (from player owned group) + set owner to public
* discard (hidden) = create group (from player owned group) + set owner to no one
Open questions:
* do stacks have special properties i.e. can only push and pop from the top