コード例 #1
0
ファイル: Cell.cs プロジェクト: gregfield/IN710-fielgm2
 //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;
 }
コード例 #3
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.cs プロジェクト: gregfield/IN710-fielgm2
 //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();
 }
コード例 #8
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);
 }
コード例 #9
0
 static ColourPicker()
 {
     myInstance = Container.Resolve <IColourPicker>();
 }
コード例 #10
0
 public GeckoboardDataServiceImpl(IGeckoboardDataProvider dataProvider,
                                  IColourPicker colourPicker)
 {
     myDataProvider = dataProvider;
     myColourPicker = colourPicker;
 }