decktet 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/decktet/card.rb +143 -66
- data/lib/decktet/deck.rb +7 -0
- data/lib/decktet/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30b2bbdd13d0396e17a62d5ea97a1a4d7e8696825863e784e69ff3ee6ad09652
|
4
|
+
data.tar.gz: b8c7b03f1ce5a2de5a061ca52b5ed95d0fde4399c17f563b04b5a115958bedfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a747733cc9b70883e3bedd6fda65fcd78338571f0a67625fc2bdf9a00e0980587512f3dfd47e9151bc0240dcd6a43a21e2d720d9119a7254b1e3b9599b84a1d
|
7
|
+
data.tar.gz: 3b82f1f5e0a5ba83fea6893e8916a7a4ecdc6f71004aaf7dd1d0c7d798f9942e3b5d49335c6fb42d2755388a02d6ebc2114c2a0a3556a51684facce05617ea8f
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Decktet
|
2
2
|
|
3
|
+
[](https://rubygems.org/gems/decktet)
|
4
|
+
|
3
5
|
This gem provides a basic interface to the Decktet playing card system. Visit [decktet.com](https://www.decktet.com/) for an overview of the Decktet. More detailed information, including many games that can be played with this unique deck, can be found on [The Decktet Wiki](http://decktet.wikidot.com/). This gem is meant as a core library for manipulating the elements of the Decktet itself. As such, it does not include any game engine or other such advanced functionality.
|
4
6
|
|
5
7
|
## Getting Started
|
data/lib/decktet/card.rb
CHANGED
@@ -23,56 +23,100 @@ module Decktet
|
|
23
23
|
alias_method :knot?, :knots?
|
24
24
|
end
|
25
25
|
|
26
|
-
THE_EXCUSE
|
27
|
-
|
28
|
-
THE_ACE_OF_MOONS
|
29
|
-
THE_ACE_OF_SUNS
|
30
|
-
THE_ACE_OF_WAVES
|
31
|
-
THE_ACE_OF_LEAVES
|
32
|
-
THE_ACE_OF_WYRMS
|
33
|
-
THE_ACE_OF_KNOTS
|
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
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
26
|
+
THE_EXCUSE = Card.new('The EXCUSE')
|
27
|
+
|
28
|
+
THE_ACE_OF_MOONS = Card.new('The Ace of Moons', :ace, :moons)
|
29
|
+
THE_ACE_OF_SUNS = Card.new('The Ace of Suns', :ace, :suns)
|
30
|
+
THE_ACE_OF_WAVES = Card.new('The Ace of Waves', :ace, :waves)
|
31
|
+
THE_ACE_OF_LEAVES = Card.new('The Ace of Leaves', :ace, :leaves)
|
32
|
+
THE_ACE_OF_WYRMS = Card.new('The Ace of Wyrms', :ace, :wyrms)
|
33
|
+
THE_ACE_OF_KNOTS = Card.new('The Ace of Knots', :ace, :knots)
|
34
|
+
|
35
|
+
# Classic Decktet Cards
|
36
|
+
THE_AUTHOR = Card.new('The Author', 2, %i[moons knots], :personality)
|
37
|
+
THE_DESERT = Card.new('The Desert', 2, %i[suns wyrms], :location)
|
38
|
+
THE_ORIGIN = Card.new('The Origin', 2, %i[waves leaves], %i[location event])
|
39
|
+
THE_JOURNEY = Card.new('The Journey', 3, %i[moons waves], :event)
|
40
|
+
THE_PAINTER = Card.new('The Painter', 3, %i[suns knots], :personality)
|
41
|
+
THE_SAVAGE = Card.new('The Savage', 3, %i[leaves wyrms], :personality)
|
42
|
+
THE_MOUNTAIN = Card.new('The Mountain', 4, %i[moons suns], :location)
|
43
|
+
THE_SAILOR = Card.new('The Sailor', 4, %i[waves leaves], :personality)
|
44
|
+
THE_BATTLE = Card.new('The Battle', 4, %i[wyrms knots], :event)
|
45
|
+
THE_FOREST = Card.new('The Forest', 5, %i[moons leaves], :location)
|
46
|
+
THE_DISCOVERY = Card.new('The Discovery', 5, %i[suns waves], :event)
|
47
|
+
THE_SOLDIER = Card.new('The Soldier', 5, %i[wyrms knots], :personality)
|
48
|
+
THE_LUNATIC = Card.new('The Lunatic', 6, %i[moons waves], :personality)
|
49
|
+
THE_PENITENT = Card.new('The Penitent', 6, %i[suns wyrms], :personality)
|
50
|
+
THE_MARKET = Card.new('The Market', 6, %i[leaves knots], %i[location event])
|
51
|
+
THE_CHANCE_MEETING = Card.new('The Chance Meeting', 7, %i[moons leaves], :event)
|
52
|
+
THE_CASTLE = Card.new('The Castle', 7, %i[suns knots], :location)
|
53
|
+
THE_CAVE = Card.new('The Cave', 7, %i[waves wyrms], :location)
|
54
|
+
THE_DIPLOMAT = Card.new('The Diplomat', 8, %i[moons suns], :personality)
|
55
|
+
THE_MILL = Card.new('The Mill', 8, %i[waves leaves], :location)
|
56
|
+
THE_BETRAYAL = Card.new('The Betrayal', 8, %i[wyrms knots], :event)
|
57
|
+
THE_PACT = Card.new('The Pact', 9, %i[moons suns], :event)
|
58
|
+
THE_DARKNESS = Card.new('The Darkness', 9, %i[waves wyrms], :location)
|
59
|
+
THE_MERCHANT = Card.new('The Merchant', 9, %i[leaves knots], :personality)
|
60
|
+
|
61
|
+
THE_HARVEST = Card.new('The Harvest', :pawn, %i[moons suns leaves], :event)
|
62
|
+
THE_WATCHMAN = Card.new('The Watchman', :pawn, %i[moons wyrms knots], :personality)
|
63
|
+
THE_LIGHT_KEEPER = Card.new('The Light Keeper', :pawn, %i[suns waves knots], :personality)
|
64
|
+
THE_BORDERLAND = Card.new('The Borderland', :pawn, %i[waves leaves wyrms], :location)
|
65
|
+
|
66
|
+
THE_CONSUL = Card.new('The Consul', :court, %i[moons waves knots], :personality)
|
67
|
+
THE_RITE = Card.new('The Rite', :court, %i[moons leaves wyrms], :event)
|
68
|
+
THE_ISLAND = Card.new('The Island', :court, %i[suns waves wyrms], :location)
|
69
|
+
THE_WINDOW = Card.new('The Window', :court, %i[suns leaves knots], :location)
|
70
|
+
|
71
|
+
THE_HUNTRESS = Card.new('The Huntress', :crown, :moons, :personality)
|
72
|
+
THE_BARD = Card.new('The Bard', :crown, :suns, :personality)
|
73
|
+
THE_SEA = Card.new('The Sea', :crown, :waves, :location)
|
74
|
+
THE_END = Card.new('The End', :crown, :leaves, %i[location event])
|
75
|
+
THE_CALAMITY = Card.new('The Calamity', :crown, :wyrms, :event)
|
76
|
+
THE_WINDFALL = Card.new('The Windfall', :crown, :knots, :event)
|
77
|
+
|
78
|
+
# Capital Decktet cards
|
79
|
+
THE_SCULPTOR = Card.new('The Sculptor', 2, %i[moons knots], :personality)
|
80
|
+
THE_PILLORY = Card.new('The Pillory', 2, %i[suns wyrms], :location)
|
81
|
+
THE_MEMORY = Card.new('The Memory', 2, %i[waves leaves], %i[location event])
|
82
|
+
THE_BLIZZARD = Card.new('The Blizzard', 3, %i[moons waves], :event)
|
83
|
+
THE_AUDITOR = Card.new('The Auditor', 3, %i[suns knots], :personality)
|
84
|
+
THE_MOUNTEBANK = Card.new('The Mountebank', 3, %i[leaves wyrms], :personality)
|
85
|
+
THE_GATE = Card.new('The Gate', 4, %i[moons suns], :location)
|
86
|
+
THE_MILLER = Card.new('The Miller', 4, %i[waves leaves], :personality)
|
87
|
+
THE_ARREST = Card.new('The Arrest', 4, %i[wyrms knots], :event)
|
88
|
+
THE_GROVE = Card.new('The Grove', 5, %i[moons leaves], :location)
|
89
|
+
THE_APPOINTMENT = Card.new('The Appointment', 5, %i[suns waves], :event)
|
90
|
+
THE_ROGUE = Card.new('The Rogue', 5, %i[wyrms knots], :personality)
|
91
|
+
THE_NAVIGATOR = Card.new('The Navigator', 6, %i[moons waves], :personality)
|
92
|
+
THE_HERMIT = Card.new('The Hermit', 6, %i[suns wyrms], :personality)
|
93
|
+
THE_EXHIBITION = Card.new('The Exhibition', 6, %i[leaves knots], %i[location event])
|
94
|
+
THE_FORTUITOUS_LOSS = Card.new('The Fortuitous Loss', 7, %i[moons leaves], :event)
|
95
|
+
THE_FORGE = Card.new('The Forge', 7, %i[suns knots], :location)
|
96
|
+
THE_EYE = Card.new('The Eye', 7, %i[waves wyrms], :location)
|
97
|
+
THE_REGENT = Card.new('The Regent', 8, %i[moons suns], :personality)
|
98
|
+
THE_ABBEY = Card.new('The Abbey', 8, %i[waves leaves], :location)
|
99
|
+
THE_DEFENESTRATION = Card.new('The Defenestration', 8, %i[wyrms knots], :event)
|
100
|
+
THE_ERUPTION = Card.new('The Eruption', 9, %i[moons suns], :event)
|
101
|
+
THE_STRAND = Card.new('The Strand', 9, %i[waves wyrms], :location)
|
102
|
+
THE_FARRIER = Card.new('The Farrier', 9, %i[leaves knots], :personality)
|
103
|
+
|
104
|
+
THE_FESTIVAL = Card.new('The Festival', :pawn, %i[moons suns leaves], :event)
|
105
|
+
THE_NEMESIS = Card.new('The Nemesis', :pawn, %i[moons wyrms knots], :personality)
|
106
|
+
THE_CONFIDANT = Card.new('The Confidant', :pawn, %i[suns waves knots], :personality)
|
107
|
+
THE_STRANGER = Card.new('The Stranger', :court, %i[moons waves knots], :personality)
|
108
|
+
THE_DEPTHS = Card.new('The Depths', :pawn, %i[waves leaves wyrms], :location)
|
109
|
+
|
110
|
+
THE_REVERSAL = Card.new('The Reversal', :court, %i[moons leaves wyrms], :event)
|
111
|
+
THE_SANCTUARY = Card.new('The Sanctuary', :court, %i[suns waves wyrms], :location)
|
112
|
+
THE_DRY_DOCK = Card.new('The Dry Dock', :court, %i[suns leaves knots], :location)
|
113
|
+
|
114
|
+
THE_SILVER_CROWN = Card.new('The Silver Crown', :crown, :moons, :personality)
|
115
|
+
THE_AMBER_CROWN = Card.new('The Amber Crown', :crown, :suns, :personality)
|
116
|
+
THE_SAPPHIRE_CROWN = Card.new('The Sapphire Crown', :crown, :waves, :location)
|
117
|
+
THE_GARNET_CROWN = Card.new('The Garnet Crown', :crown, :leaves, %i[location event])
|
118
|
+
THE_EMERALD_CROWN = Card.new('The Emerald Crown', :crown, :wyrms, :event)
|
119
|
+
THE_GOLDEN_CROWN = Card.new('The Golden Crown', :crown, :knots, :event)
|
76
120
|
|
77
121
|
Card.class_eval { private_class_method :new }
|
78
122
|
|
@@ -92,20 +136,53 @@ module Decktet
|
|
92
136
|
THE_HUNTRESS, THE_BARD, THE_SEA, THE_END, THE_CALAMITY, THE_WINDFALL, # crowns
|
93
137
|
].freeze
|
94
138
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
139
|
+
CAPITAL_CARDS = [
|
140
|
+
THE_EXCUSE,
|
141
|
+
THE_ACE_OF_MOONS, THE_ACE_OF_SUNS, THE_ACE_OF_WAVES, THE_ACE_OF_LEAVES, THE_ACE_OF_WYRMS, THE_ACE_OF_KNOTS,
|
142
|
+
THE_SCULPTOR, THE_PILLORY, THE_MEMORY, # rank 2
|
143
|
+
THE_BLIZZARD, THE_AUDITOR, THE_MOUNTEBANK, # rank 3
|
144
|
+
THE_GATE, THE_MILLER, THE_ARREST, # rank 4
|
145
|
+
THE_GROVE, THE_APPOINTMENT, THE_ROGUE, # rank 5
|
146
|
+
THE_NAVIGATOR, THE_HERMIT, THE_EXHIBITION, # rank 6
|
147
|
+
THE_FORTUITOUS_LOSS, THE_FORGE, THE_EYE, # rank 7
|
148
|
+
THE_REGENT, THE_ABBEY, THE_DEFENESTRATION, # rank 8
|
149
|
+
THE_ERUPTION, THE_STRAND, THE_FARRIER, # rank 9
|
150
|
+
THE_FESTIVAL, THE_NEMESIS, THE_CONFIDANT, THE_DEPTHS, # pawns
|
151
|
+
THE_STRANGER, THE_REVERSAL, THE_SANCTUARY, THE_DRY_DOCK, # courts
|
152
|
+
THE_SILVER_CROWN, THE_AMBER_CROWN, THE_SAPPHIRE_CROWN, THE_GARNET_CROWN, THE_EMERALD_CROWN, THE_GOLDEN_CROWN
|
153
|
+
].freeze
|
154
|
+
|
155
|
+
ACES = CARDS.select(&:ace?).freeze
|
156
|
+
NUMBERS = CARDS.select(&:number?).freeze
|
157
|
+
PAWNS = CARDS.select(&:pawn?).freeze
|
158
|
+
COURTS = CARDS.select(&:court?).freeze
|
159
|
+
CROWNS = CARDS.select(&:crown?).freeze
|
160
|
+
|
161
|
+
MOONS = CARDS.select(&:moons?).freeze
|
162
|
+
SUNS = CARDS.select(&:suns?).freeze
|
163
|
+
WAVES = CARDS.select(&:waves?).freeze
|
164
|
+
LEAVES = CARDS.select(&:leaves?).freeze
|
165
|
+
WYRMS = CARDS.select(&:wyrms?).freeze
|
166
|
+
KNOTS = CARDS.select(&:knots?).freeze
|
167
|
+
|
168
|
+
LOCATIONS = CARDS.select(&:location?).freeze
|
169
|
+
PERSONALITIES = CARDS.select(&:personality?).freeze
|
170
|
+
EVENTS = CARDS.select(&:event?).freeze
|
171
|
+
|
172
|
+
CAPITAL_ACES = CAPITAL_CARDS.select(&:ace?).freeze
|
173
|
+
CAPITAL_NUMBERS = CAPITAL_CARDS.select(&:number?).freeze
|
174
|
+
CAPITAL_PAWNS = CAPITAL_CARDS.select(&:pawn?).freeze
|
175
|
+
CAPITAL_COURTS = CAPITAL_CARDS.select(&:court?).freeze
|
176
|
+
CAPITAL_CROWNS = CAPITAL_CARDS.select(&:crown?).freeze
|
177
|
+
|
178
|
+
CAPITAL_MOONS = CAPITAL_CARDS.select(&:moons?).freeze
|
179
|
+
CAPITAL_SUNS = CAPITAL_CARDS.select(&:suns?).freeze
|
180
|
+
CAPITAL_WAVES = CAPITAL_CARDS.select(&:waves?).freeze
|
181
|
+
CAPITAL_LEAVES = CAPITAL_CARDS.select(&:leaves?).freeze
|
182
|
+
CAPITAL_WYRMS = CAPITAL_CARDS.select(&:wyrms?).freeze
|
183
|
+
CAPITAL_KNOTS = CAPITAL_CARDS.select(&:knots?).freeze
|
184
|
+
|
185
|
+
CAPITAL_LOCATIONS = CAPITAL_CARDS.select(&:location?).freeze
|
186
|
+
CAPITAL_PERSONALITIES = CAPITAL_CARDS.select(&:personality?).freeze
|
187
|
+
CAPITAL_EVENTS = CAPITAL_CARDS.select(&:event?).freeze
|
111
188
|
end
|
data/lib/decktet/deck.rb
CHANGED
@@ -4,6 +4,13 @@ module Decktet
|
|
4
4
|
BASIC_DECK_WITH_EXCUSE = [THE_EXCUSE] + BASIC_DECK
|
5
5
|
EXTENDED_DECK = BASIC_DECK_WITH_EXCUSE + [PAWNS, COURTS].flatten
|
6
6
|
DOUBLE_DECK = BASIC_DECK + BASIC_DECK
|
7
|
+
|
8
|
+
BASIC_CAPITAL_DECK = [CAPITAL_ACES, CAPITAL_NUMBERS, CAPITAL_CROWNS].flatten
|
9
|
+
BASIC_CAPITAL_DECK_WITH_EXCUSE = [THE_EXCUSE] + BASIC_CAPITAL_DECK
|
10
|
+
EXTENDED_CAPITAL_DECK = BASIC_CAPITAL_DECK_WITH_EXCUSE + [CAPITAL_PAWNS, CAPITAL_COURTS].flatten
|
11
|
+
DOUBLE_CAPITAL_DECK = BASIC_CAPITAL_DECK + BASIC_CAPITAL_DECK
|
12
|
+
|
13
|
+
COMBINED_DOUBLE_DECK = BASIC_DECK + BASIC_CAPITAL_DECK
|
7
14
|
end
|
8
15
|
|
9
16
|
class Deck < Pile
|
data/lib/decktet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decktet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brody Fischer
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rspec
|
@@ -24,7 +23,6 @@ dependencies:
|
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '0'
|
27
|
-
description:
|
28
26
|
email:
|
29
27
|
- brodyf42@gmail.com
|
30
28
|
executables: []
|
@@ -48,7 +46,6 @@ homepage: https://github.com/brodyf42/decktet
|
|
48
46
|
licenses:
|
49
47
|
- MIT
|
50
48
|
metadata: {}
|
51
|
-
post_install_message:
|
52
49
|
rdoc_options: []
|
53
50
|
require_paths:
|
54
51
|
- lib
|
@@ -63,8 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
60
|
- !ruby/object:Gem::Version
|
64
61
|
version: '0'
|
65
62
|
requirements: []
|
66
|
-
rubygems_version: 3.
|
67
|
-
signing_key:
|
63
|
+
rubygems_version: 3.6.9
|
68
64
|
specification_version: 4
|
69
65
|
summary: This gem provides an interface to the versatile decktet playing card system.
|
70
66
|
test_files: []
|