Hey, I recently wrote this fairly simple game of life in JavaScript.
Within this script I check all cells around a given cell, I currently do this via eight if statements.
It works but just feels wrong and hard coded. Would there happen to be a faster, more efficient way of doing this? Or are masses of if statements the only way?