01-25-2014, 04:15 PM
|
#3
|
Kawaii Desu Ne?
Join Date: Dec 2007
Location: The Kawaiian Island~
Age: 30
Posts: 4,182
|
Re: C++ Conway's Game of Life
Quote:
Originally Posted by Kekeb
Be careful about extending beyond the bounds of your arrays.
|
This is the first thing I noticed myself. One possible easy fix if you don't want to deal with having a lot of "if" constructs to check if you're within your boundaries, is to implement circular boundary conditions and do your operations in mod n (i.e. having "whatever % n" in your code) where n*n is your grid size. In this way, the game will play as if it's a pacman universe (or you can imagine folding up your grid into a torus if you can visualize that :P).
__________________
AMA: http://ask.fm/benguino
Not happening now! Don't click to join!
Quote:
Originally Posted by Spenner
(^)> peck peck says the heels
|
Quote:
Originally Posted by Xx{Midnight}xX
And god made ben, and realized he was doomed to miss. And said it was good.
|
Quote:
Originally Posted by Zakvvv666
awww :< crushing my dreams; was looking foward to you attempting to shoot yourself point blank and missing
|
|
|
|