forked from s4nchez/card_games
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cards_spec.txt
61 lines (46 loc) · 1.22 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
# 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
---
API
Current state
* sent by client on load
only player who sent the command receives a representation of the game
Transfer card between groups
* sent by client when card is dropped
parameters:
- player
- source group
- target group (optional - creates new group)
- target index
- card id
- card position (if new group?)
validations:
- fails if card id is in source group
- fails if target group doesn't exist
- handles index > number of of cards on target group
all players receive a representation of the command
Group style change
Reposition group
Shuffle group