i just got done with my first programming homework of the semester. our assignment was a fun and actually cool one. had to create an algorithm so as to make CONWAY'S GAME OF LIFE. the supporting code was provided, thankfully (though of course the supporting code is also quite simple so then again not that big a difference), so all i had to do was make the functions that count each cell's neighbour and then the function to create the next generation's board layout.
and boy was that a thing. thankfully, i had done something similar for my second-to-last programming project last semester. in that project, i had to make contours for a topographic map based on an image who's shades of grey were based on the elevation. i used the same concept of referencing surrounding bits of a 2d array, but then used that data to count the neighbours in all 8 directions. except, of course, for corner and edge cells.
i had trouble for a while with a couple of edges and corners- the other two for each were fine somehow- but after realizing my error in how i structured my if-statements, it was all sorted.
some quirks that still remain, though, and that i will try and figure out but won't stress about: somehow, even though it shouldn't be able to, the cells can wrap around to the other side... except they are thus offset by one height value upwards.... but only sometimes. i don't get how. another quirk is that at the bottom row, the 3rd, 4th, and 5th horizontal values always count one more than they're supposed to. no matter how large or small the board is, as long as the bottom row has 5+ values, those bois are wrong.
but, those are pretty small bugs that either a. won't be noticed or b. will be forgiven/uncared for.
anyway, that's about it. programming is cool.
Comments
Displaying 1 of 1 comments ( View all | Add Comment )
Fawkes
Jason
yeah what's up
by iason; ; Report
JASON
by Fawkes; ; Report
YEAH WHAT'S UP
by iason; ; Report
https://youtu.be/OYQDnV092hI
by Fawkes; ; Report
ps or xb or ni or pc x?
by iason; ; Report
JASON
by Fawkes; ; Report
shame that your name isn't shaun
by iason; ; Report
JASON!
by Fawkes; ; Report
JASON!!
by ㅇㅅㅇ; ; Report
multiplying
by iason; ; Report
JASON!!!
by Fawkes; ; Report
walk the two steps and yell at my face why don't ya
by iason; ; Report
JASON!!!!
by ㅇㅅㅇ; ; Report
JaSoN
by Fawkes; ; Report
j a s o n
by scientist_axolotl; ; Report
jay aah scsc ooh nnnh
by Fawkes; ; Report