Mercurial > irccd
comparison plugins/tictactoe/tictactoe.md @ 632:e5d0f4289e04
Plugin tictactoe: brand new plugin, closes #393 @6h
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 13 Mar 2018 13:51:17 +0100 |
parents | |
children | ebe561276c33 |
comparison
equal
deleted
inserted
replaced
631:1fa9e5222e87 | 632:e5d0f4289e04 |
---|---|
1 --- | |
2 title: "Tictactoe plugin" | |
3 header: "Tictactoe plugin" | |
4 guide: yes | |
5 --- | |
6 | |
7 This plugin let you play tictactoe over IRC. | |
8 | |
9 Warning: this plugin is verbose. | |
10 | |
11 ## Installation | |
12 | |
13 The plugin **tictactoe** is distributed with irccd. To enable it add the following | |
14 to your `plugins` section: | |
15 | |
16 ```ini | |
17 [plugins] | |
18 tictactoe = "" | |
19 ``` | |
20 | |
21 ## Usage | |
22 | |
23 Execute **tictactoe** plugin with the target opponent nickname. Then each player | |
24 send a message in the form **x y** where x targets the column and y the row. | |
25 | |
26 To verify target opponent, this plugins first requests the names on the channel | |
27 to ensures a valid player. | |
28 | |
29 If one of the players leaves the channel (either by kick or part) the game is | |
30 aborted. | |
31 | |
32 ```nohighlight | |
33 markand: !tictactoe francis | |
34 irccd: a b c | |
35 irccd: 1 . . . | |
36 irccd: 2 . . . | |
37 irccd: 3 . . . | |
38 irccd: markand, it's your turn | |
39 ``` | |
40 | |
41 And then, placing tokens. | |
42 | |
43 ```nohighlight | |
44 20:27 < markand> a 1 | |
45 20:27 < irccd> a b c | |
46 20:27 < irccd> 1 x . . | |
47 20:27 < irccd> 2 . . . | |
48 20:27 < irccd> 3 . . . | |
49 20:27 < irccd> francis, it's your turn | |
50 20:27 <@francis> c 1 | |
51 20:27 < irccd> a b c | |
52 20:27 < irccd> 1 x . o | |
53 20:27 < irccd> 2 . . . | |
54 20:27 < irccd> 3 . . . | |
55 20:27 < irccd> markand, it's your turn | |
56 20:27 < markand> a 2 | |
57 20:27 < irccd> a b c | |
58 20:27 < irccd> 1 x . o | |
59 20:27 < irccd> 2 x . . | |
60 20:27 < irccd> 3 . . . | |
61 20:27 < irccd> francis, it's your turn | |
62 20:27 <@francis> c 3 | |
63 20:27 < irccd> a b c | |
64 20:27 < irccd> 1 x . o | |
65 20:27 < irccd> 2 x . . | |
66 20:27 < irccd> 3 . . o | |
67 20:27 < irccd> markand, it's your turn | |
68 20:27 < markand> a 3 | |
69 20:27 < irccd> a b c | |
70 20:27 < irccd> 1 x . o | |
71 20:27 < irccd> 2 x . . | |
72 20:27 < irccd> 3 x . o | |
73 20:27 < irccd> francis, it's your turn | |
74 20:27 < irccd> markand, congratulations, you won! | |
75 ``` | |
76 | |
77 ## Formats | |
78 | |
79 The **tictactoe** plugin supports the following formats in `[format.tictactoe]` | |
80 section: | |
81 | |
82 - **draw**: when the game ended with no winner, | |
83 - **invalid**: the opponent does not exist or is not valid, | |
84 - **running**: the game is already running, | |
85 - **turn**: message sent when current player change, | |
86 - **used**: the cell requested is already used, | |
87 - **win**: game ended with a winner. | |
88 | |
89 ### Keywords supported | |
90 | |
91 The following keywords are supported: | |
92 | |
93 | Format | Keywords | Notes | | |
94 |---------|--------------------------------------------|-------------| | |
95 | (any) | channel, command, nickname, plugin, server | all formats | | |
96 | invalid | origin | | | |
97 | running | origin | | |