public void Cycle_3BlueCyclicRGBCells_AllCellsEventuallyBecomeBlue()
        {
            var grid = new RGBGrid(10, true);

            GridTestHelper.make3CellColumn(grid, State.BLUE, new Point {
                X = 5, Y = 5
            });

            GridTestHelper.PerformGridCycles(grid, 100);

            var blueCells = GridTestHelper.GetStateCount(grid, State.BLUE);

            Assert.AreEqual(blueCells, grid.Data.Length);
        }
        public void Cycle_3GreenRGBCells_AllCellsEventuallyBecomeGreen()
        {
            var grid = new RGBGrid(10, false);

            GridTestHelper.make3CellColumn(grid, State.GREEN, new Point {
                X = 5, Y = 5
            });

            GridTestHelper.PerformGridCycles(grid, 100);

            var greenCells = GridTestHelper.GetStateCount(grid, State.GREEN);

            Assert.AreEqual(greenCells, grid.Data.Length);
        }
        public void Cycle_3Red3GreenCyclicRGBCells_AllCellsEventuallyBecomeRed()
        {
            var grid = new RGBGrid(10, true);

            GridTestHelper.make3CellColumn(grid, State.RED, new Point {
                X = 5, Y = 5
            });
            GridTestHelper.make3CellColumn(grid, State.GREEN, new Point {
                X = 6, Y = 5
            });

            GridTestHelper.PerformGridCycles(grid, 100);

            var redCells = GridTestHelper.GetStateCount(grid, State.RED);

            Assert.AreEqual(redCells, grid.Data.Length);
        }
        public void Cycle_3Red3Green3BlueCyclicRGBCells_AllCellsEventuallyBecomeRed()
        {
            var grid = new RGBGrid(10, true);

            GridTestHelper.make3CellColumn(grid, State.RED, new Point {
                X = 0, Y = 5
            });                                                                                         // left edge
            GridTestHelper.make3CellColumn(grid, State.GREEN, new Point {
                X = 5, Y = 5
            });                                                                                         // central
            GridTestHelper.make3CellColumn(grid, State.BLUE, new Point {
                X = 9, Y = 5
            });                                                                                        // right edge

            GridTestHelper.PerformGridCycles(grid, 100);

            /* Since Red eats Green eats Blue, Red should finally dominate:
             * - Green eats 'rightwards', and eats all the Blue
             * - Red eats 'rightwards' at the same rate, finally eating all the Green. */

            var redCells = GridTestHelper.GetStateCount(grid, State.RED);

            Assert.AreEqual(redCells, grid.Data.Length);
        }