Simulating Life

Just another UMass Boston Blogs site

Code Review 3/31/17 2:41 PM

| 1 Comment

I am trying to get the two middle clusters in centered, and position and in the middle and for some reason its not working when I change the numbers. I even set the Y axis to 0 and they don’t even line up isn’t that weird? Is there something within the code that is making it that way.

One Comment

  1. having the picture is GREAT – thanks!
    the first code will put 5 HMs between (x,y) (15,0) and (19,14)
    if you number the clusters across then down
    1 2 3
    4 5
    6 7 8
    this is probably #5

    the second code puts them in (-15,-14) to (0,0) which is probably #4

    the best way to do this is to use some graph paper, box off the parts you want, figure out the x & y ranges and then work out the random thingy

    one way to debug this is to make the clusters different colors (just for now) to see which one is which

Leave a Reply

Required fields are marked *.


Skip to toolbar