Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1014989 // varyBackgroundPlusCircles

JavaX fragment (include)

static <A extends BackgroundPlus<CircleWithColor>> A varyBackgroundPlusCircles(A s, int w, int h) {
  s = cloneThroughStructure(s);
  if (oneIn(10))
    s.background = varyColor(s.background);
  else if (tossCoin())
    replaceRandomElement(s.things, randomCircleWithColor(w, h));
  else
    varyCircleWithColor(random(s.things), w, h);
  ret s;
}

Author comment

Began life as a copy of #1014953

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: #1014989
Snippet name: varyBackgroundPlusCircles
Eternal ID of this version: #1014989/1
Text MD5: 745017b7a3df68a8aa3dcee1c3c181bb
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 20:15:31
Source code size: 356 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 335 / 367
Referenced in: [show references]