Samze/GPCA — Issue #4: 2D CAs incorrectly calculate limits for neighbour.
Author: Samze
Created: 2012-02-22 01:14:11+00:00
State: open
Labels: Cellular Automata Logic, Neighbourhoods

Abstract2D class currently has the incorrect implementation for calculating the x value boundary for neighbouring cells. Logic currently applys the if statement,

if ((x != xDIM - 1)

Whereas this is incorrect as x is currently set to a value relative to the entire flat array, the code should 'normalise' this first such as

if ((x/xDIM) != xDIM - 1)

or better yet calculate a xBounds value as x/xDim.