Libraryless. Click here for Pure Java version (1700L/11K/37K).
1 | !752 |
2 | |
3 | static new L<S> randomBots; |
4 | |
5 | p {
|
6 | load("randomBots");
|
7 | } |
8 | |
9 | synchronized answer {
|
10 | if (!tb()) null; |
11 | |
12 | if "is * a random bot" |
13 | ret yn(randomBots.contains(m.fsi())); |
14 | |
15 | if "* is a random bot" {
|
16 | randomBots.add(m.fsi()); |
17 | save("randomBots");
|
18 | ret "OK"; |
19 | } |
20 | |
21 | if "* is not a random bot" {
|
22 | randomBots.remove(m.fsi()); |
23 | save("randomBots");
|
24 | ret "OK"; |
25 | } |
26 | |
27 | if "list random bots" |
28 | ret structure(randomBots); |
29 | } |
30 | |
31 | static synchronized boolean isRandomBot(S id) {
|
32 | ret randomBots.contains(formatSnippetID(id)); |
33 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1003005 |
| Snippet name: | Random Bots List |
| Eternal ID of this version: | #1003005/1 |
| Text MD5: | 36852965cfef76f5c3e7b4633a578625 |
| Transpilation MD5: | da20c0118283183b9779e7ca7c81b0bf |
| Author: | stefan |
| Category: | eleu / nl |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-04-17 21:39:18 |
| Source code size: | 576 bytes / 33 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 836 / 1288 |
| Referenced in: | [show references] |