Guest User

Untitled

a guest
Jul 17th, 2019
62
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Rule
  2. _____ ooooo
  3. _____ oiiio
  4. __@__ -> oicio
  5. _____ oiiio
  6. _____ ooooo
  7.  
  8.  
  9. */
  10. bool Seed_rs1_r1_given_keycode64() { /* @ */
  11. return true; // #TODO check the actual condition
  12. }
  13. bool Seed_rs1_r1_given_keycode95() { /* _ */
  14. return true; // #TODO check the actual condition
  15. }
  16. int Seed_rs1_r1_vote_keycode64() { /* @ */
  17. int myvotes = 1;
  18. _nvotes_0 += myvotes;
  19. if (random_between(0, _nvotes_0) < myvotes) { _winsn_0 = _cursn; }
  20. }
  21. int Seed_rs1_r1_vote_keycode95() { /* _ */
  22. int myvotes = 1;
  23. _nvotes_1 += myvotes;
  24. if (random_between(0, _nvotes_1) < myvotes) { _winsn_1 = _cursn; }
  25. }
  26. bool Seed_rs1_r1_check_keycode64() { /* @ */
  27. return _nvotes_0 > 0;
  28. }
  29. bool Seed_rs1_r1_check_keycode95() { /* _ */
  30. return _nvotes_1 > 0;
  31. }
  32. void Seed_rs1_r1_change_keycode99() { /* c */
  33. ew(_cursn, ew(_winsn));
  34. }
  35. void Seed_rs1_r1_change_keycode105() { /* i */
  36. ew(_cursn, ew(_winsn));
  37. }
  38. void Seed_rs1_r1_change_keycode111() { /* o */
  39. ew(_cursn, ew(_winsn));
  40. }
  41. bool Seed_rs1_r1_given() {
  42. _cursn = 0;
  43. if (!Seed_rs1_r1_given_keycode64()) return false;
  44. _cursn = 1;
  45. if (!Seed_rs1_r1_given_keycode95()) return false;
  46. _cursn = 2;
  47. if (!Seed_rs1_r1_given_keycode95()) return false;
  48. _cursn = 3;
  49. if (!Seed_rs1_r1_given_keycode95()) return false;
  50. _cursn = 4;
  51. if (!Seed_rs1_r1_given_keycode95()) return false;
  52. _cursn = 5;
  53. if (!Seed_rs1_r1_given_keycode95()) return false;
  54. _cursn = 6;
  55. if (!Seed_rs1_r1_given_keycode95()) return false;
  56. _cursn = 7;
  57. if (!Seed_rs1_r1_given_keycode95()) return false;
  58. _cursn = 8;
  59. if (!Seed_rs1_r1_given_keycode95()) return false;
  60. _cursn = 9;
  61. if (!Seed_rs1_r1_given_keycode95()) return false;
  62. _cursn = 10;
  63. if (!Seed_rs1_r1_given_keycode95()) return false;
  64. _cursn = 11;
  65. if (!Seed_rs1_r1_given_keycode95()) return false;
  66. _cursn = 12;
  67. if (!Seed_rs1_r1_given_keycode95()) return false;
  68. _cursn = 13;
  69. if (!Seed_rs1_r1_given_keycode95()) return false;
  70. _cursn = 14;
  71. if (!Seed_rs1_r1_given_keycode95()) return false;
  72. _cursn = 15;
  73. if (!Seed_rs1_r1_given_keycode95()) return false;
  74. _cursn = 16;
  75. if (!Seed_rs1_r1_given_keycode95()) return false;
  76. _cursn = 17;
  77. if (!Seed_rs1_r1_given_keycode95()) return false;
  78. _cursn = 18;
  79. if (!Seed_rs1_r1_given_keycode95()) return false;
  80. _cursn = 19;
  81. if (!Seed_rs1_r1_given_keycode95()) return false;
  82. _cursn = 20;
  83. if (!Seed_rs1_r1_given_keycode95()) return false;
  84. _cursn = 25;
  85. if (!Seed_rs1_r1_given_keycode95()) return false;
  86. _cursn = 26;
  87. if (!Seed_rs1_r1_given_keycode95()) return false;
  88. _cursn = 27;
  89. if (!Seed_rs1_r1_given_keycode95()) return false;
  90. _cursn = 28;
  91. if (!Seed_rs1_r1_given_keycode95()) return false;
  92. return true;
  93. }
  94. void Seed_rs1_r1_vote() {
  95. _nvotes_0 = 0;
  96. _winsn_0 = 63; // Sitenum.maxof
  97. _nvotes_1 = 0;
  98. _winsn_1 = 63; // Sitenum.maxof
  99. _cursn = 0;
  100. Seed_rs1_r1_vote_keycode64(); /* @ */
  101. _cursn = 1;
  102. Seed_rs1_r1_vote_keycode95(); /* _ */
  103. _cursn = 2;
  104. Seed_rs1_r1_vote_keycode95(); /* _ */
  105. _cursn = 3;
  106. Seed_rs1_r1_vote_keycode95(); /* _ */
  107. _cursn = 4;
  108. Seed_rs1_r1_vote_keycode95(); /* _ */
  109. _cursn = 5;
  110. Seed_rs1_r1_vote_keycode95(); /* _ */
  111. _cursn = 6;
  112. Seed_rs1_r1_vote_keycode95(); /* _ */
  113. _cursn = 7;
  114. Seed_rs1_r1_vote_keycode95(); /* _ */
  115. _cursn = 8;
  116. Seed_rs1_r1_vote_keycode95(); /* _ */
  117. _cursn = 9;
  118. Seed_rs1_r1_vote_keycode95(); /* _ */
  119. _cursn = 10;
  120. Seed_rs1_r1_vote_keycode95(); /* _ */
  121. _cursn = 11;
  122. Seed_rs1_r1_vote_keycode95(); /* _ */
  123. _cursn = 12;
  124. Seed_rs1_r1_vote_keycode95(); /* _ */
  125. _cursn = 13;
  126. Seed_rs1_r1_vote_keycode95(); /* _ */
  127. _cursn = 14;
  128. Seed_rs1_r1_vote_keycode95(); /* _ */
  129. _cursn = 15;
  130. Seed_rs1_r1_vote_keycode95(); /* _ */
  131. _cursn = 16;
  132. Seed_rs1_r1_vote_keycode95(); /* _ */
  133. _cursn = 17;
  134. Seed_rs1_r1_vote_keycode95(); /* _ */
  135. _cursn = 18;
  136. Seed_rs1_r1_vote_keycode95(); /* _ */
  137. _cursn = 19;
  138. Seed_rs1_r1_vote_keycode95(); /* _ */
  139. _cursn = 20;
  140. Seed_rs1_r1_vote_keycode95(); /* _ */
  141. _cursn = 25;
  142. Seed_rs1_r1_vote_keycode95(); /* _ */
  143. _cursn = 26;
  144. Seed_rs1_r1_vote_keycode95(); /* _ */
  145. _cursn = 27;
  146. Seed_rs1_r1_vote_keycode95(); /* _ */
  147. _cursn = 28;
  148. Seed_rs1_r1_vote_keycode95(); /* _ */
  149. }
  150. bool Seed_rs1_r1_check() {
  151. _nvotes = _nvotes_0;
  152. if (!Seed_rs1_r1_check_keycode64()) return false; /* @ */
  153. _nvotes = _nvotes_1;
  154. if (!Seed_rs1_r1_check_keycode95()) return false; /* _ */
  155. return true;
  156. }
  157. void Seed_rs1_r1_change() {
  158. _cursn = 0;
  159. _winsn = _winsn_0;
  160. Seed_rs1_r1_change_keycode99(); /* @ -> c */
  161. _cursn = 1;
  162. _winsn = _winsn_1;
  163. Seed_rs1_r1_change_keycode105(); /* _ -> i */
  164. _cursn = 2;
  165. _winsn = _winsn_1;
  166. Seed_rs1_r1_change_keycode105(); /* _ -> i */
  167. _cursn = 3;
  168. _winsn = _winsn_1;
  169. Seed_rs1_r1_change_keycode105(); /* _ -> i */
  170. _cursn = 4;
  171. _winsn = _winsn_1;
  172. Seed_rs1_r1_change_keycode105(); /* _ -> i */
  173. _cursn = 5;
  174. _winsn = _winsn_1;
  175. Seed_rs1_r1_change_keycode105(); /* _ -> i */
  176. _cursn = 6;
  177. _winsn = _winsn_1;
  178. Seed_rs1_r1_change_keycode105(); /* _ -> i */
  179. _cursn = 7;
  180. _winsn = _winsn_1;
  181. Seed_rs1_r1_change_keycode105(); /* _ -> i */
  182. _cursn = 8;
  183. _winsn = _winsn_1;
  184. Seed_rs1_r1_change_keycode105(); /* _ -> i */
  185. _cursn = 9;
  186. _winsn = _winsn_1;
  187. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  188. _cursn = 10;
  189. _winsn = _winsn_1;
  190. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  191. _cursn = 11;
  192. _winsn = _winsn_1;
  193. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  194. _cursn = 12;
  195. _winsn = _winsn_1;
  196. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  197. _cursn = 13;
  198. _winsn = _winsn_1;
  199. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  200. _cursn = 14;
  201. _winsn = _winsn_1;
  202. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  203. _cursn = 15;
  204. _winsn = _winsn_1;
  205. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  206. _cursn = 16;
  207. _winsn = _winsn_1;
  208. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  209. _cursn = 17;
  210. _winsn = _winsn_1;
  211. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  212. _cursn = 18;
  213. _winsn = _winsn_1;
  214. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  215. _cursn = 19;
  216. _winsn = _winsn_1;
  217. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  218. _cursn = 20;
  219. _winsn = _winsn_1;
  220. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  221. _cursn = 25;
  222. _winsn = _winsn_1;
  223. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  224. _cursn = 26;
  225. _winsn = _winsn_1;
  226. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  227. _cursn = 27;
  228. _winsn = _winsn_1;
  229. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  230. _cursn = 28;
  231. _winsn = _winsn_1;
  232. Seed_rs1_r1_change_keycode111(); /* _ -> o */
  233. }
  234. bool Seed_rs1_r1() {
  235. if (Seed_rs1_r1_given()) {
  236. Seed_rs1_r1_vote();
  237. if (Seed_rs1_r1_check()) {
  238. Seed_rs1_r1_change();
  239. return true;
  240. }
  241. }
  242. return false;
  243. }
RAW Paste Data