Posts

Showing posts from February, 2010

Learning C++ (or programming Conway's Game of Life)

Image
This post is about programming so if that doesn't interest you then fair warned be ye, says I. Been learning C++. Out of a book. I'm just up to getting methods to work, which if you are a programmer you will know is not that far in, but it's a start damnit! So I know from experience that it is much more fun to do this kind of thing if you are making something that is actually fun and you care about, so I had a crack at Conway's Game of Life, something that I'd always wanted to do since I first heard about it. The basic premise is that you have a field of cells. Each cell dies if it is overcrowded or too lonely and cells are born if there are a specific number of living cells nearby. This gives you a fairly rudimentary but funtastic life simulator. LET'S DO IT! Features of my version: Shitty coding. (hey I'm learning) My version features no methods classes or objects or anything fancy like that just good old fashioned loops and 'if' statements. Eye wa