示例#1
0
 //constructor with passed in variables
 public Cell(Graphics canvas, Point position, IColourPicker colourScheme, int cellSize)
 {
     this.canvas = canvas;
     this.position = position;
     this.cellSize = cellSize;
     this.colourScheme = colourScheme;
     currentAValue = 1;
     currentBValue = 0;
 }
示例#2
0
 //constructor with passed in variables
 public Cell(Graphics canvas, Point position, IColourPicker colourScheme, int cellSize)
 {
     this.canvas       = canvas;
     this.position     = position;
     this.cellSize     = cellSize;
     this.colourScheme = colourScheme;
     currentAValue     = 1;
     currentBValue     = 0;
 }
 //second constructor used for user input simulation
 public SimulationManager(Bitmap pattern, Graphics canvas, Graphics formGraphics, Rectangle bounds, LaplacianDelegate lapFunc, IColourPicker colourScheme,
     int cellSize, int gridSize, double diffA, double diffB, double feedA, double killB)
 {
     this.pattern = pattern;
     this.canvas = canvas;
     this.formGraphics = formGraphics;
     this.cellSize = cellSize;
     this.gridSize = gridSize;
     this.feedA = feedA;
     this.killB = killB;
     grid = new Grid(canvas, bounds, lapFunc, colourScheme, cellSize, gridSize, diffA, diffB, feedA, killB);
 }
示例#4
0
 //grid constructor - passes in needed variables
 //initialises 2d array of cells and fills it
 public Grid(Graphics canvas, Rectangle gridBounds, LaplacianDelegate lapFunc, IColourPicker colourScheme, int cellSize, int gridSize,
     double diffA, double diffB, double feedA, double killB)
 {
     this.gridBounds = gridBounds;
     this.cellSize = cellSize;
     this.gridSize = gridSize;
     this.lapFunc = lapFunc;
     this.colourScheme = colourScheme;
     this.feedA = feedA;
     this.killB = killB;
     this.diffA = diffA;
     this.diffB = diffB;
     gridCanvas = canvas;
     grid = new Cell[gridSize,gridSize];
     InitialGrid();
     GiveEachCellItsNeighbours();
 }
示例#5
0
 //grid constructor - passes in needed variables
 //initialises 2d array of cells and fills it
 public Grid(Graphics canvas, Rectangle gridBounds, LaplacianDelegate lapFunc, IColourPicker colourScheme, int cellSize, int gridSize,
             double diffA, double diffB, double feedA, double killB)
 {
     this.gridBounds   = gridBounds;
     this.cellSize     = cellSize;
     this.gridSize     = gridSize;
     this.lapFunc      = lapFunc;
     this.colourScheme = colourScheme;
     this.feedA        = feedA;
     this.killB        = killB;
     this.diffA        = diffA;
     this.diffB        = diffB;
     gridCanvas        = canvas;
     grid = new Cell[gridSize, gridSize];
     InitialGrid();
     GiveEachCellItsNeighbours();
 }
示例#6
0
 public SimpleLotteryTicket(INumberGenerator numberGenerator, IColourPicker colourPicker)
 {
     _numberGenerator = numberGenerator;
     _colourPicker    = colourPicker;
 }
示例#7
0
 protected GeckoboardDataServiceDomain()
 {
     myColourPicker = new DefaultColourPicker();
 }
 //second constructor used for user input simulation
 public SimulationManager(Bitmap pattern, Graphics canvas, Graphics formGraphics, Rectangle bounds, LaplacianDelegate lapFunc, IColourPicker colourScheme,
                          int cellSize, int gridSize, double diffA, double diffB, double feedA, double killB)
 {
     this.pattern      = pattern;
     this.canvas       = canvas;
     this.formGraphics = formGraphics;
     this.cellSize     = cellSize;
     this.gridSize     = gridSize;
     this.feedA        = feedA;
     this.killB        = killB;
     grid = new Grid(canvas, bounds, lapFunc, colourScheme, cellSize, gridSize, diffA, diffB, feedA, killB);
 }
示例#9
0
 static ColourPicker()
 {
     myInstance = Container.Resolve <IColourPicker>();
 }
 public GeckoboardDataServiceImpl(IGeckoboardDataProvider dataProvider,
                                  IColourPicker colourPicker)
 {
     myDataProvider = dataProvider;
     myColourPicker = colourPicker;
 }