-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathUNFINISHED GAMES
45 lines (38 loc) · 913 Bytes
/
UNFINISHED GAMES
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
Sagrada
Alchemists
Red7
Decrypto
Love Letter
I would fight the dragon
Pentacolor
Ricochet Robots
Memory
Mahjong
Should be somewhat easy to support:
Isle of Sky
Carcassone
val coup = factory.game {
setup {
}
ecs {
// How to fix view with this approach? Make each thing viewable and use public-setting stuff?
val players = (0 until playerCount).map { playerIndex ->
entity {
it has hand
it has discard
it has resources(coins)
it has view { mapOf(...) }
it has actions(action) {
playerIndex(playerIndex)
}
}
}
val deck = entity {
it has cards
it has view { cards.size }
}
game has currentPlayer
game has stack
game has view("players" to players, "deck" to deck)
}
}