carps 0.2.1
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.
- data/COPYING +674 -0
- data/GEM_DESCRIPTION +10 -0
- data/History.txt +4 -0
- data/Manifest.txt +156 -0
- data/PostInstall.txt +20 -0
- data/README.rdoc +141 -0
- data/Rakefile +28 -0
- data/bin/carps +123 -0
- data/bin/carps_init +29 -0
- data/bin/carps_ipc_test +44 -0
- data/bin/carps_mod_saver_test +71 -0
- data/bin/carps_mod_test +62 -0
- data/config/website.yml +2 -0
- data/features/character_sheet.feature +40 -0
- data/features/crash.feature +15 -0
- data/features/crypt.feature +22 -0
- data/features/dice.feature +173 -0
- data/features/dm.feature +36 -0
- data/features/dmll.feature +51 -0
- data/features/edit.feature +10 -0
- data/features/email.feature +29 -0
- data/features/interface.feature +17 -0
- data/features/ipc.feature +10 -0
- data/features/mailbox.feature +33 -0
- data/features/mod.feature +31 -0
- data/features/parser.feature +9 -0
- data/features/persistent_protocol.feature +14 -0
- data/features/player.feature +22 -0
- data/features/player_turn.feature +29 -0
- data/features/random.feature +15 -0
- data/features/rule.feature +19 -0
- data/features/safety.feature +13 -0
- data/features/sessions.feature +16 -0
- data/features/start_dm.feature +18 -0
- data/features/start_player.feature +8 -0
- data/features/step_definitions/common_steps.rb +170 -0
- data/features/steps/character_sheet.rb +89 -0
- data/features/steps/crash.rb +27 -0
- data/features/steps/crypt.rb +166 -0
- data/features/steps/dice.rb +91 -0
- data/features/steps/dm.rb +147 -0
- data/features/steps/dmll.rb +47 -0
- data/features/steps/edit.rb +7 -0
- data/features/steps/email.rb +108 -0
- data/features/steps/general.rb +5 -0
- data/features/steps/interface.rb +64 -0
- data/features/steps/ipc.rb +22 -0
- data/features/steps/mailbox.rb +126 -0
- data/features/steps/mod.rb +25 -0
- data/features/steps/parser.rb +23 -0
- data/features/steps/persistent_protocol.rb +29 -0
- data/features/steps/player.rb +82 -0
- data/features/steps/player_turn.rb +56 -0
- data/features/steps/random.rb +47 -0
- data/features/steps/rule.rb +53 -0
- data/features/steps/safety.rb +17 -0
- data/features/steps/sessions.rb +37 -0
- data/features/steps/start_dm.rb +46 -0
- data/features/steps/start_player.rb +65 -0
- data/features/steps/timeout.rb +32 -0
- data/features/steps/type_verification.rb +36 -0
- data/features/steps/wizard.rb +123 -0
- data/features/support/common.rb +29 -0
- data/features/support/env.rb +14 -0
- data/features/support/matchers.rb +11 -0
- data/features/timeout.feature +11 -0
- data/features/type_verification.feature +48 -0
- data/features/wizard.feature +50 -0
- data/lib/carps/crypt/accept_handshake.rb +40 -0
- data/lib/carps/crypt/default_messages.rb +29 -0
- data/lib/carps/crypt/handshake.rb +41 -0
- data/lib/carps/crypt/mailbox.rb +265 -0
- data/lib/carps/crypt/mailer.rb +220 -0
- data/lib/carps/crypt/peer.rb +123 -0
- data/lib/carps/crypt/public_key.rb +60 -0
- data/lib/carps/crypt.rb +23 -0
- data/lib/carps/email/config.rb +122 -0
- data/lib/carps/email/imap.rb +156 -0
- data/lib/carps/email/smtp.rb +119 -0
- data/lib/carps/email/string.rb +30 -0
- data/lib/carps/email.rb +21 -0
- data/lib/carps/mod/action.rb +36 -0
- data/lib/carps/mod/answers.rb +76 -0
- data/lib/carps/mod/client_turn.rb +88 -0
- data/lib/carps/mod/dice.rb +360 -0
- data/lib/carps/mod/dm/interface.rb +160 -0
- data/lib/carps/mod/dm/mod.rb +409 -0
- data/lib/carps/mod/dm/reporter.rb +112 -0
- data/lib/carps/mod/dm/resource.rb +88 -0
- data/lib/carps/mod/dm/room.rb +33 -0
- data/lib/carps/mod/interface.rb +73 -0
- data/lib/carps/mod/launch.rb +108 -0
- data/lib/carps/mod/mod.rb +52 -0
- data/lib/carps/mod/player/interface.rb +76 -0
- data/lib/carps/mod/player/mod.rb +109 -0
- data/lib/carps/mod/question.rb +63 -0
- data/lib/carps/mod/rule.rb +112 -0
- data/lib/carps/mod/sheet/character.rb +82 -0
- data/lib/carps/mod/sheet/editor.rb +97 -0
- data/lib/carps/mod/sheet/new_sheet.rb +71 -0
- data/lib/carps/mod/sheet/schema.rb +84 -0
- data/lib/carps/mod/sheet/type.rb +161 -0
- data/lib/carps/mod/sheet/verifier.rb +41 -0
- data/lib/carps/mod/status_report.rb +51 -0
- data/lib/carps/mod.rb +40 -0
- data/lib/carps/protocol/keyword.rb +104 -0
- data/lib/carps/protocol/message.rb +138 -0
- data/lib/carps/protocol.rb +19 -0
- data/lib/carps/service/client_parser.rb +34 -0
- data/lib/carps/service/dm/config.rb +76 -0
- data/lib/carps/service/dm/mailer.rb +70 -0
- data/lib/carps/service/dm/new_game.rb +101 -0
- data/lib/carps/service/dm/start.rb +47 -0
- data/lib/carps/service/game.rb +101 -0
- data/lib/carps/service/interface.rb +174 -0
- data/lib/carps/service/invite.rb +79 -0
- data/lib/carps/service/mod.rb +43 -0
- data/lib/carps/service/player/config.rb +78 -0
- data/lib/carps/service/player/mailer.rb +49 -0
- data/lib/carps/service/player/start.rb +60 -0
- data/lib/carps/service/server_parser.rb +33 -0
- data/lib/carps/service/session.rb +96 -0
- data/lib/carps/service/start/config.rb +71 -0
- data/lib/carps/service/start/interface.rb +101 -0
- data/lib/carps/service/start/mailer.rb +46 -0
- data/lib/carps/service.rb +35 -0
- data/lib/carps/test.rb +34 -0
- data/lib/carps/ui/colour.rb +28 -0
- data/lib/carps/ui/error.rb +39 -0
- data/lib/carps/ui/highlight.rb +32 -0
- data/lib/carps/ui/question.rb +63 -0
- data/lib/carps/ui/warn.rb +37 -0
- data/lib/carps/ui.rb +21 -0
- data/lib/carps/util/config.rb +162 -0
- data/lib/carps/util/editor.rb +147 -0
- data/lib/carps/util/error.rb +75 -0
- data/lib/carps/util/files.rb +48 -0
- data/lib/carps/util/init.rb +93 -0
- data/lib/carps/util/process.rb +150 -0
- data/lib/carps/util/timeout.rb +31 -0
- data/lib/carps/util/windows.rb +29 -0
- data/lib/carps/util.rb +24 -0
- data/lib/carps/wizard/dm.rb +41 -0
- data/lib/carps/wizard/player.rb +40 -0
- data/lib/carps/wizard/steps.rb +494 -0
- data/lib/carps/wizard/wizard.rb +126 -0
- data/lib/carps/wizard.rb +21 -0
- data/lib/carps.rb +45 -0
- data/permission +16 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/tasks/readme_site.rake +28 -0
- data/test/test_carps.rb +11 -0
- data/test/test_helper.rb +3 -0
- data/website/index.html +271 -0
- metadata +304 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Feature: character sheets
|
|
2
|
+
As a CARPS player,
|
|
3
|
+
In order to play an RPG,
|
|
4
|
+
You need a character,
|
|
5
|
+
So you need a character sheet.
|
|
6
|
+
|
|
7
|
+
Scenario: fill in character sheet
|
|
8
|
+
Given carps is initialized with test/client
|
|
9
|
+
Given a character sheet schema
|
|
10
|
+
Given a sheet editor
|
|
11
|
+
Then fill in the character sheet
|
|
12
|
+
|
|
13
|
+
Scenario: parsable character sheet
|
|
14
|
+
When an parsable sheet is provided
|
|
15
|
+
Then parse the sheet
|
|
16
|
+
|
|
17
|
+
Scenario: unparsable character sheet
|
|
18
|
+
When an unparsable sheet is provided
|
|
19
|
+
Then do not parse the sheet
|
|
20
|
+
|
|
21
|
+
Scenario: fill in the sheet again
|
|
22
|
+
Given carps is initialized with test/client
|
|
23
|
+
Given a character sheet schema
|
|
24
|
+
Given a sheet editor
|
|
25
|
+
Then fill in the character sheet
|
|
26
|
+
Then edit the character sheet again
|
|
27
|
+
|
|
28
|
+
Scenario: accept valid character sheet
|
|
29
|
+
Given carps is initialized with test/client
|
|
30
|
+
Given a character sheet schema
|
|
31
|
+
Given a sheet editor
|
|
32
|
+
When a valid sheet is provided
|
|
33
|
+
Then accept the valid sheet
|
|
34
|
+
|
|
35
|
+
Scenario: do not accept invalid character sheet
|
|
36
|
+
Given carps is initialized with test/client
|
|
37
|
+
Given a character sheet schema
|
|
38
|
+
Given a sheet editor
|
|
39
|
+
When an invalid sheet is provided
|
|
40
|
+
Then do not accept the invalid sheet
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Feature: crash
|
|
2
|
+
|
|
3
|
+
As a CARPS user,
|
|
4
|
+
If CARPS were to unfortunately crash,
|
|
5
|
+
Perhaps because its developer is a tool,
|
|
6
|
+
I expect a nice crash report that doesn't
|
|
7
|
+
mess up my screen.
|
|
8
|
+
|
|
9
|
+
Scenario: no crash
|
|
10
|
+
Given a proc that won't crash
|
|
11
|
+
Then the crash reporter won't report a crash
|
|
12
|
+
|
|
13
|
+
Scenario: crash
|
|
14
|
+
Given a proc that will crash
|
|
15
|
+
Then the crash reporter will report a crash
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Feature: cryptography
|
|
2
|
+
In order for CARPS peers to communicate without the risk of someone pretending to be a peer when he isn't
|
|
3
|
+
CARPS must
|
|
4
|
+
sign each message using strong public key cryptography
|
|
5
|
+
|
|
6
|
+
Scenario: handshake
|
|
7
|
+
Given two peers, Alice and Bob
|
|
8
|
+
Then Alice initiates a handshake request and Bob accepts
|
|
9
|
+
When the user presses enter, threading stops
|
|
10
|
+
|
|
11
|
+
Scenario: hacker
|
|
12
|
+
Given two peers, Alice and Bob
|
|
13
|
+
Then Alice initiates a handshake request and Bob accepts
|
|
14
|
+
Then a hacker pretending to be Alice sends a nefarious message to Bob
|
|
15
|
+
Then bob tries to receive the message
|
|
16
|
+
When the user presses enter, threading stops
|
|
17
|
+
|
|
18
|
+
Scenario: spoofer
|
|
19
|
+
Given two peers, Alice and Bob
|
|
20
|
+
Then Alice initiates a handshake request and Bob accepts
|
|
21
|
+
Then a spoofer pretending to be Bob tries to make a handshake with Alice
|
|
22
|
+
When the user presses enter, threading stops
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Feature: rules
|
|
2
|
+
As a CARPS mod writer,
|
|
3
|
+
in order to efficiently encode game rules,
|
|
4
|
+
I need a high level interface to non-determinism.
|
|
5
|
+
IE, show me the dice!
|
|
6
|
+
|
|
7
|
+
Scenario: one dice
|
|
8
|
+
Given a d3
|
|
9
|
+
Then show the odds
|
|
10
|
+
Then each of the odds must be 1 / 3
|
|
11
|
+
Then result 0 must be 1
|
|
12
|
+
Then result 1 must be 2
|
|
13
|
+
Then result 2 must be 3
|
|
14
|
+
|
|
15
|
+
Scenario: one dice and multiplication
|
|
16
|
+
Given a d3
|
|
17
|
+
Then multiply by 3
|
|
18
|
+
Then show the odds
|
|
19
|
+
Then each of the odds must be 1 / 3
|
|
20
|
+
Then result 0 must be 3
|
|
21
|
+
Then result 1 must be 6
|
|
22
|
+
Then result 2 must be 9
|
|
23
|
+
|
|
24
|
+
Scenario: one dice and addition
|
|
25
|
+
Given a d3
|
|
26
|
+
Then add 5
|
|
27
|
+
Then show the odds
|
|
28
|
+
Then each of the odds must be 1 / 3
|
|
29
|
+
Then result 0 must be 6
|
|
30
|
+
Then result 1 must be 7
|
|
31
|
+
Then result 2 must be 8
|
|
32
|
+
|
|
33
|
+
Scenario: one dice, fractional multiplication
|
|
34
|
+
Given a d6
|
|
35
|
+
Then multiply by 1 / 2
|
|
36
|
+
Then show the odds
|
|
37
|
+
Then result 0 must be 0
|
|
38
|
+
Then result 1 must be 1
|
|
39
|
+
Then result 2 must be 2
|
|
40
|
+
Then result 3 must be 3
|
|
41
|
+
Then odd 0 must be 1 / 6
|
|
42
|
+
Then odd 1 must be 1 / 3
|
|
43
|
+
Then odd 2 must be 1 / 3
|
|
44
|
+
Then odd 3 must be 1 / 6
|
|
45
|
+
|
|
46
|
+
Scenario: one dice, multiplication and addition
|
|
47
|
+
Given a d3
|
|
48
|
+
Then multiply by 3
|
|
49
|
+
Then add 5
|
|
50
|
+
Then show the odds
|
|
51
|
+
Then each of the odds must be 1 / 3
|
|
52
|
+
Then result 0 must be 8
|
|
53
|
+
Then result 1 must be 11
|
|
54
|
+
Then result 2 must be 14
|
|
55
|
+
|
|
56
|
+
Scenario: one dice and division
|
|
57
|
+
Given a d3
|
|
58
|
+
Then divide by 2
|
|
59
|
+
Then show the odds
|
|
60
|
+
Then odd 0 must be 1 / 3
|
|
61
|
+
Then odd 1 must be 2 / 3
|
|
62
|
+
Then result 0 must be 0
|
|
63
|
+
Then result 1 must be 1
|
|
64
|
+
|
|
65
|
+
Scenario: one dice and range analysis
|
|
66
|
+
Given a d3
|
|
67
|
+
Then if it's greater or equal to 1, and less than or equal to 2, the result is 0
|
|
68
|
+
Then show the odds
|
|
69
|
+
Then odd 0 must be 2 / 3
|
|
70
|
+
Then odd 1 must be 1 / 3
|
|
71
|
+
|
|
72
|
+
Scenario: two dice and addition
|
|
73
|
+
Given a d2
|
|
74
|
+
Then add a d3
|
|
75
|
+
Then show the odds
|
|
76
|
+
Then odd 0 must be 1 / 6
|
|
77
|
+
Then odd 1 must be 1 / 3
|
|
78
|
+
Then odd 2 must be 1 / 3
|
|
79
|
+
Then odd 3 must be 1 / 6
|
|
80
|
+
Then result 0 must be 2
|
|
81
|
+
Then result 1 must be 3
|
|
82
|
+
Then result 2 must be 4
|
|
83
|
+
Then result 3 must be 5
|
|
84
|
+
|
|
85
|
+
Scenario: two dice and subtraction
|
|
86
|
+
Given a d2
|
|
87
|
+
Then subtract a d3
|
|
88
|
+
Then show the odds
|
|
89
|
+
Then result 0 must be -2
|
|
90
|
+
Then result 1 must be -1
|
|
91
|
+
Then result 2 must be 0
|
|
92
|
+
Then result 3 must be 1
|
|
93
|
+
Then odd 0 must be 1 / 6
|
|
94
|
+
Then odd 1 must be 1 / 3
|
|
95
|
+
Then odd 2 must be 1 / 3
|
|
96
|
+
Then odd 3 must be 1 / 6
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Scenario: two dice and multiplication
|
|
100
|
+
Given a d3
|
|
101
|
+
Then multiply by a d2
|
|
102
|
+
Then show the odds
|
|
103
|
+
Then odd 0 must be 1 / 6
|
|
104
|
+
Then odd 1 must be 1 / 3
|
|
105
|
+
Then odd 2 must be 1 / 6
|
|
106
|
+
Then odd 3 must be 1 / 6
|
|
107
|
+
Then odd 4 must be 1 / 6
|
|
108
|
+
Then result 0 must be 1
|
|
109
|
+
Then result 1 must be 2
|
|
110
|
+
Then result 2 must be 3
|
|
111
|
+
Then result 3 must be 4
|
|
112
|
+
Then result 4 must be 6
|
|
113
|
+
|
|
114
|
+
Scenario: two dice and division
|
|
115
|
+
Given a d3
|
|
116
|
+
Then divide by a d2
|
|
117
|
+
Then show the odds
|
|
118
|
+
Then odd 0 must be 1 / 6
|
|
119
|
+
Then odd 1 must be 1 / 2
|
|
120
|
+
Then odd 2 must be 1 / 6
|
|
121
|
+
Then odd 3 must be 1 / 6
|
|
122
|
+
Then result 0 must be 0
|
|
123
|
+
Then result 1 must be 1
|
|
124
|
+
Then result 2 must be 2
|
|
125
|
+
Then result 3 must be 3
|
|
126
|
+
|
|
127
|
+
Scenario: two dice and range analysis
|
|
128
|
+
Given a d3
|
|
129
|
+
Then if it's greater or equal to 1, and less than or equal to 2, the result is a d4
|
|
130
|
+
Then show the odds
|
|
131
|
+
Then result 0 must be 1
|
|
132
|
+
Then result 1 must be 2
|
|
133
|
+
Then result 2 must be 3
|
|
134
|
+
Then result 3 must be 4
|
|
135
|
+
Then odd 0 must be 1 / 6
|
|
136
|
+
Then odd 1 must be 1 / 6
|
|
137
|
+
Then odd 2 must be 1 / 2
|
|
138
|
+
Then odd 3 must be 1 / 6
|
|
139
|
+
|
|
140
|
+
Scenario: two dice, uneven weights and range analysis
|
|
141
|
+
Given a d4
|
|
142
|
+
Then multiply by 2
|
|
143
|
+
Then if it's greater or equal to 2, and less than or equal to 2, the result is a d4
|
|
144
|
+
Then show the odds
|
|
145
|
+
Then result 0 must be 1
|
|
146
|
+
Then result 1 must be 2
|
|
147
|
+
Then result 2 must be 3
|
|
148
|
+
Then result 3 must be 4
|
|
149
|
+
Then result 4 must be 6
|
|
150
|
+
Then result 5 must be 8
|
|
151
|
+
Then odd 0 must be 1 / 16
|
|
152
|
+
Then odd 1 must be 1 / 16
|
|
153
|
+
Then odd 2 must be 1 / 16
|
|
154
|
+
Then odd 3 must be 5 / 16
|
|
155
|
+
Then odd 4 must be 1 / 4
|
|
156
|
+
Then odd 5 must be 1 / 4
|
|
157
|
+
|
|
158
|
+
Scenario: binary comparison
|
|
159
|
+
Given a d5
|
|
160
|
+
Then if it's greater than 3, the result is 4
|
|
161
|
+
Then show the odds
|
|
162
|
+
Then result 0 must be 1
|
|
163
|
+
Then result 1 must be 2
|
|
164
|
+
Then result 2 must be 3
|
|
165
|
+
Then result 3 must be 4
|
|
166
|
+
Then odd 0 must be 1 / 5
|
|
167
|
+
Then odd 1 must be 1 / 5
|
|
168
|
+
Then odd 2 must be 1 / 5
|
|
169
|
+
Then odd 3 must be 2 / 5
|
|
170
|
+
|
|
171
|
+
Scenario: roll dice
|
|
172
|
+
Given a d4
|
|
173
|
+
Then roll the dice
|
data/features/dm.feature
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Feature: High-level DM interface
|
|
2
|
+
|
|
3
|
+
Scenario: produce report
|
|
4
|
+
Given carps is initialized with test/server
|
|
5
|
+
Given a DM mod
|
|
6
|
+
Given a character sheet schema
|
|
7
|
+
When barry joins the mod
|
|
8
|
+
Then check barry's sheet
|
|
9
|
+
Then set barry's status conditionally
|
|
10
|
+
Then preview player turns
|
|
11
|
+
|
|
12
|
+
Scenario: create npc
|
|
13
|
+
Given carps is initialized with test/server
|
|
14
|
+
Given a DM mod
|
|
15
|
+
Given a character sheet schema
|
|
16
|
+
Then create an NPC called paul of type orange
|
|
17
|
+
When barry joins the mod
|
|
18
|
+
Then check barry's sheet
|
|
19
|
+
Then report the strength of the NPC paul to barry
|
|
20
|
+
Then preview player turns
|
|
21
|
+
|
|
22
|
+
Scenario: test inputs
|
|
23
|
+
Given carps is initialized with test/server
|
|
24
|
+
Given a DM mod
|
|
25
|
+
Given a character sheet schema
|
|
26
|
+
When barry joins the mod
|
|
27
|
+
Given a DM interface
|
|
28
|
+
Then test all inputs to interface
|
|
29
|
+
|
|
30
|
+
Scenario: user interaction
|
|
31
|
+
Given carps is initialized with test/server
|
|
32
|
+
Given a DM mod
|
|
33
|
+
Given a character sheet schema
|
|
34
|
+
When barry joins the mod
|
|
35
|
+
Given a DM interface
|
|
36
|
+
Then present a user interface to the DM
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Feature: Low-level DM interface components
|
|
2
|
+
The DM requires a powerful interface
|
|
3
|
+
To communicate with the players
|
|
4
|
+
|
|
5
|
+
Scenario: produce reports
|
|
6
|
+
Given carps is initialized with test/server
|
|
7
|
+
Given a resource manager
|
|
8
|
+
Given a reporter
|
|
9
|
+
Then the reporter is registered with the resource manager
|
|
10
|
+
Given barry are in the cave
|
|
11
|
+
Then take turns for barry
|
|
12
|
+
|
|
13
|
+
Scenario: produce customized report
|
|
14
|
+
Given carps is initialized with test/server
|
|
15
|
+
Given a resource manager
|
|
16
|
+
Given a reporter
|
|
17
|
+
Then the reporter is registered with the resource manager
|
|
18
|
+
Given carps is initialized with test/server
|
|
19
|
+
Given barry are in the cave
|
|
20
|
+
Then customize report for barry
|
|
21
|
+
Then take turns for barry
|
|
22
|
+
|
|
23
|
+
Scenario: change rooms
|
|
24
|
+
Given carps is initialized with test/server
|
|
25
|
+
Given a resource manager
|
|
26
|
+
Given a reporter
|
|
27
|
+
Then the reporter is registered with the resource manager
|
|
28
|
+
Given barry are in the cave
|
|
29
|
+
Then take turns for barry
|
|
30
|
+
Given barry are in the ship
|
|
31
|
+
Then take turns for barry
|
|
32
|
+
|
|
33
|
+
Scenario: different rooms
|
|
34
|
+
Given carps is initialized with test/server
|
|
35
|
+
Given a resource manager
|
|
36
|
+
Given a reporter
|
|
37
|
+
Then the reporter is registered with the resource manager
|
|
38
|
+
Given barry are in the cave
|
|
39
|
+
Given paul are in the ship
|
|
40
|
+
Then take turns for barry paul
|
|
41
|
+
|
|
42
|
+
Scenario: individual question
|
|
43
|
+
Given a reporter
|
|
44
|
+
Then ask barry: do you like paul?
|
|
45
|
+
Then ask paul: does barry smell?
|
|
46
|
+
Then take turns for barry paul
|
|
47
|
+
|
|
48
|
+
Scenario: create NPC
|
|
49
|
+
Given carps is initialized with test/server
|
|
50
|
+
Given a resource manager
|
|
51
|
+
Then create an NPC of type human
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Feature: email
|
|
2
|
+
In order for CARPS peers to communicate over the network in a distributed fashion
|
|
3
|
+
CARPS should be able to
|
|
4
|
+
Send and receive emails
|
|
5
|
+
|
|
6
|
+
Scenario: send email
|
|
7
|
+
Given carps is initialized with test/client
|
|
8
|
+
Given default IMAP settings
|
|
9
|
+
Given default SMTP settings
|
|
10
|
+
Given the email account
|
|
11
|
+
Then an email is sent
|
|
12
|
+
|
|
13
|
+
Scenario: receive email
|
|
14
|
+
Given carps is initialized with test/client
|
|
15
|
+
Given default IMAP settings
|
|
16
|
+
Given default SMTP settings
|
|
17
|
+
Given the email account
|
|
18
|
+
Then an email is received
|
|
19
|
+
|
|
20
|
+
Scenario: SMTP security
|
|
21
|
+
Given carps is initialized with test/client
|
|
22
|
+
Given default SMTP settings
|
|
23
|
+
Then attempt connections with various SMTP security settings
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Scenario: IMAP security
|
|
27
|
+
Given carps is initialized with test/client
|
|
28
|
+
Given default IMAP settings
|
|
29
|
+
Then attempt connections with various IMAP security settings
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Feature: user interface
|
|
2
|
+
In order for people to use carps
|
|
3
|
+
Well
|
|
4
|
+
They have to be able to use it
|
|
5
|
+
|
|
6
|
+
Scenario: user interface
|
|
7
|
+
Given a cheesey interface
|
|
8
|
+
Then present the cheesey interface to the user
|
|
9
|
+
|
|
10
|
+
# This is important because it lets me know when a interface is broken
|
|
11
|
+
# Also, it corrects the problem
|
|
12
|
+
# Further, it's best to tell the user rather than silently drop it
|
|
13
|
+
# in case they think it is supposed to have the option and are surprised
|
|
14
|
+
# when it doesn't
|
|
15
|
+
Scenario: broken interface
|
|
16
|
+
Given a broken interface created by a drunk
|
|
17
|
+
Then present the interface, reporting the mistake to the user
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Feature: Interprocess Communication
|
|
2
|
+
In order to launch mods
|
|
3
|
+
CARPS should be able to
|
|
4
|
+
fork subprograms and communicate with them
|
|
5
|
+
|
|
6
|
+
Scenario: fork subprogram in another shell
|
|
7
|
+
Given carps is initialized with test/client
|
|
8
|
+
Given an object to be mutated
|
|
9
|
+
When the Process.launch method is called with the name of a ruby subprogram, which I should see in another window
|
|
10
|
+
Then I should see 'It works' from the server side
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Feature: mailbox
|
|
2
|
+
As a CARPS user,
|
|
3
|
+
I need a way to reliably send and receive emails.
|
|
4
|
+
|
|
5
|
+
Scenario: mail persistence
|
|
6
|
+
Given carps is initialized with test/client
|
|
7
|
+
Then .mail is cleaned
|
|
8
|
+
Given a session manager
|
|
9
|
+
Given a testing mailbox
|
|
10
|
+
Then send mail with session 1 to the mailbox
|
|
11
|
+
When the user presses enter, continue
|
|
12
|
+
Given a testing mailbox
|
|
13
|
+
Then receive mail with session 1
|
|
14
|
+
|
|
15
|
+
Scenario: no session
|
|
16
|
+
Given carps is initialized with test/client
|
|
17
|
+
Then .mail is cleaned
|
|
18
|
+
Given a session manager
|
|
19
|
+
Given a testing mailbox
|
|
20
|
+
Then send mail with session 1 to the mailbox
|
|
21
|
+
Then receive mail with session 1
|
|
22
|
+
|
|
23
|
+
Scenario: session
|
|
24
|
+
Given carps is initialized with test/client
|
|
25
|
+
Then .mail is cleaned
|
|
26
|
+
Given a session manager
|
|
27
|
+
Given a testing mailbox
|
|
28
|
+
Then send mail with session 1 to the mailbox
|
|
29
|
+
Then send mail with session 2 to the mailbox
|
|
30
|
+
Then set session to 2
|
|
31
|
+
Then receive mail with session 2
|
|
32
|
+
Then check that the mail with session 1 has not been received
|
|
33
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Feature: mods
|
|
2
|
+
In order to play or host a game
|
|
3
|
+
A mod needs to be executed
|
|
4
|
+
|
|
5
|
+
Scenario: resume dm mod
|
|
6
|
+
Given carps is initialized with test/server
|
|
7
|
+
Given a session manager
|
|
8
|
+
Given a dm game config, for mod test
|
|
9
|
+
Then resume the mod
|
|
10
|
+
|
|
11
|
+
Scenario: save and load dm mod
|
|
12
|
+
Given carps is initialized with test/server
|
|
13
|
+
Given a session manager
|
|
14
|
+
Given a dm game config, for mod saver
|
|
15
|
+
Then resume the mod
|
|
16
|
+
Then load the DM mod
|
|
17
|
+
Then resume the mod
|
|
18
|
+
|
|
19
|
+
Scenario: save and load player mod
|
|
20
|
+
Given carps is initialized with test/client
|
|
21
|
+
Given a session manager
|
|
22
|
+
Given a player game config, for mod saver
|
|
23
|
+
Then resume the mod
|
|
24
|
+
Then load the Player mod
|
|
25
|
+
Then resume the mod
|
|
26
|
+
|
|
27
|
+
Scenario: resume player mod
|
|
28
|
+
Given carps is initialized with test/client
|
|
29
|
+
Given a session manager
|
|
30
|
+
Given a player game config, for mod test
|
|
31
|
+
Then resume the mod
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Feature: persistent protocol
|
|
2
|
+
In order to continue playing carps,
|
|
3
|
+
between runs of the program,
|
|
4
|
+
without odd glitches occuring,
|
|
5
|
+
there must be persistency at the protocol level.
|
|
6
|
+
|
|
7
|
+
Scenario: persistent message
|
|
8
|
+
Given carps is initialized with test/client
|
|
9
|
+
Given a persistent message
|
|
10
|
+
Then save the message, noting the file name
|
|
11
|
+
Then make sure the file exists
|
|
12
|
+
Then delete the message
|
|
13
|
+
Then make sure the file was deleted
|
|
14
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Feature: Player interface
|
|
2
|
+
In order to play carps
|
|
3
|
+
the player needs to be able
|
|
4
|
+
to interact with a mod
|
|
5
|
+
|
|
6
|
+
Scenario: player user interaction
|
|
7
|
+
Given a character sheet schema
|
|
8
|
+
Given carps is initialized with test/client
|
|
9
|
+
Given a player test mailer
|
|
10
|
+
Given a player mod
|
|
11
|
+
When the player receives turn information
|
|
12
|
+
Given a player interface
|
|
13
|
+
Then present a user interface to the player
|
|
14
|
+
|
|
15
|
+
Scenario: test inputs
|
|
16
|
+
Given a character sheet schema
|
|
17
|
+
Given carps is initialized with test/client
|
|
18
|
+
Given a player test mailer
|
|
19
|
+
Given a player mod
|
|
20
|
+
When the player receives turn information
|
|
21
|
+
Given a player interface
|
|
22
|
+
Then test all inputs to the player's interface
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Feature: client turns
|
|
2
|
+
In order for people to play a game
|
|
3
|
+
The players must be able to
|
|
4
|
+
Answer questions set by the Dungeon Master
|
|
5
|
+
|
|
6
|
+
Scenario: answer question
|
|
7
|
+
Given a question
|
|
8
|
+
Then the question should be asked
|
|
9
|
+
|
|
10
|
+
Scenario: read report
|
|
11
|
+
Given a status report
|
|
12
|
+
Then the status report should be printed
|
|
13
|
+
|
|
14
|
+
Scenario: take turn
|
|
15
|
+
Given a status report and a number of questions
|
|
16
|
+
Then all the questions should be asked
|
|
17
|
+
|
|
18
|
+
Scenario: parse answers
|
|
19
|
+
Given answers from a player's turn
|
|
20
|
+
Given a parser for the answers
|
|
21
|
+
Then emit the message
|
|
22
|
+
Then parse the message
|
|
23
|
+
|
|
24
|
+
Scenario: parse turn
|
|
25
|
+
Given a status report and a number of questions
|
|
26
|
+
When a turn is sent
|
|
27
|
+
Given a parser for the turn
|
|
28
|
+
Then emit the message
|
|
29
|
+
Then parse the message
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Feature: dice
|
|
2
|
+
In order to play an RPG
|
|
3
|
+
You have to whittle some dice
|
|
4
|
+
|
|
5
|
+
Scenario: random integer
|
|
6
|
+
Given 1000 random integers between 12 and 15
|
|
7
|
+
Then ensure each of the random numbers are between 12 and 15
|
|
8
|
+
|
|
9
|
+
Scenario: random float
|
|
10
|
+
Given 1000 random floats between 35 and 40
|
|
11
|
+
Then ensure each of the random numbers are between 35 and 40
|
|
12
|
+
|
|
13
|
+
Scenario: probabalistic interface
|
|
14
|
+
Given an interface to dice rolling
|
|
15
|
+
Then launch the probabalistic interface
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Feature: rules
|
|
2
|
+
As a CARPS mod writer,
|
|
3
|
+
attempting to encode a game into a CARPS mod,
|
|
4
|
+
in order to manipulate character sheets in accordance
|
|
5
|
+
with the game manuals,
|
|
6
|
+
I require a high level interface for writing rules.
|
|
7
|
+
|
|
8
|
+
Scenario: show odds for rule on a character sheet
|
|
9
|
+
Given a character sheet schema
|
|
10
|
+
When a valid sheet is provided
|
|
11
|
+
Given a rule which operates on a character sheet
|
|
12
|
+
Then show the odds for the rule
|
|
13
|
+
|
|
14
|
+
Scenario: apply rule on a character sheet
|
|
15
|
+
Given a character sheet schema
|
|
16
|
+
When a valid sheet is provided
|
|
17
|
+
Given a rule which operates on a character sheet
|
|
18
|
+
Then apply the rule
|
|
19
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Feature: safety
|
|
2
|
+
As a CARPS user,
|
|
3
|
+
you essentially run untrusted programs,
|
|
4
|
+
in response to emails,
|
|
5
|
+
it's probably a good idea to use $SAFE.
|
|
6
|
+
|
|
7
|
+
# This doesn't work, probably bug in cucumber
|
|
8
|
+
|
|
9
|
+
Scenario: Perform operations under SAFE
|
|
10
|
+
# Given $SAFE is 1
|
|
11
|
+
# Then allow checking a file, given by user input, exists
|
|
12
|
+
# Then disallow eval in response to user input
|
|
13
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Feature: sessions
|
|
2
|
+
As a CARPS player,
|
|
3
|
+
whose going to play more than one game,
|
|
4
|
+
across a period of weeks,
|
|
5
|
+
it's desirable for the system to have sessions support,
|
|
6
|
+
because that means that while playing one game,
|
|
7
|
+
I won't receive a message
|
|
8
|
+
intended for a different game.
|
|
9
|
+
|
|
10
|
+
Scenario: accept message for this session
|
|
11
|
+
Given a session manager
|
|
12
|
+
Then accept a message meant for this session
|
|
13
|
+
|
|
14
|
+
Scenario: deny message intended for another session
|
|
15
|
+
Given a session manager
|
|
16
|
+
Then deny a message intended for another session
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Feature: start a game
|
|
2
|
+
In order to play carps, the dm must start a game
|
|
3
|
+
|
|
4
|
+
Scenario: start new game
|
|
5
|
+
Given carps is initialized with test/server
|
|
6
|
+
Given a session manager
|
|
7
|
+
Then host a new game called rot with resource campaign and mod fruit
|
|
8
|
+
Then save the game as rot.yaml
|
|
9
|
+
|
|
10
|
+
Scenario: resume game
|
|
11
|
+
Given carps is initialized with test/server
|
|
12
|
+
Given a session manager
|
|
13
|
+
Then the dm resumes a previous game called rot.yaml
|
|
14
|
+
|
|
15
|
+
Scenario: DM start game interface
|
|
16
|
+
Given a session manager
|
|
17
|
+
Given carps is initialized with test/server
|
|
18
|
+
Then present the start game interface to the dm
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Feature: player initialization
|
|
2
|
+
|
|
3
|
+
Scenario: player start game interface
|
|
4
|
+
Given carps is initialized with test/client
|
|
5
|
+
Given a session manager
|
|
6
|
+
Given a mailer stub for the player start interface
|
|
7
|
+
When an invite is sent to the player
|
|
8
|
+
Then present the start game interface to the player
|