1 | static <A extends BackgroundPlus<LineWithColor>> A varyBackgroundPlusLines(A s, int w, int h) { |
2 | s = cloneThroughStructure(s); |
3 | if (oneIn(10)) |
4 | s.background = varyColor(s.background); |
5 | else if (tossCoin()) |
6 | replaceRandomElement(s.things, randomLineWithColor(w, h)); |
7 | else |
8 | varyLineWithColor(random(s.things), w, h); |
9 | ret s; |
10 | } |
Began life as a copy of #1015007
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: | #1015019 |
Snippet name: | varyBackgroundPlusLines |
Eternal ID of this version: | #1015019/1 |
Text MD5: | e357eb27cf140d87bf15bc2928091bdb |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-06 23:47:40 |
Source code size: | 348 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 377 / 412 |
Referenced in: | [show references] |