Skip to content

rules need namespace #40

@gitorgstars

Description

@gitorgstars

rules should be objects with properties such as rule.do_gen(), rule.num_states etc

bbRule.js:
bbRule = {}
bbRule.do_gen = function(grid, x, y, z, frm) {...}
bbRule.num_states = 2;
bbRule.color_odd_p1 = 0xff0000;
bbRule.color_odd_n1 = 0xffff00;
bbRule.color_even_p1 = 0x0000ff;
bbRule.color_even_n1 = 0x00ffff;

index.js:
rule = bbRule;
if (state==1 && phase % 2 == 1) color = rule.color_odd_p1;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions