public GraphicalApp(LifeForm thatWindow, FavoritesForm favor) { ThatWindow = thatWindow; this.favor = favor; WIDTH = ThatWindow.Width; HEIGHT = ThatWindow.Height; CELLS_COUNT = settings.CellsCount; STEP = (int)(WIDTH / CELLS_COUNT); }
public FavoritesForm(LifeForm ThatWindow) { this.ThatWindow = ThatWindow; this.graphics = new GraphicalApp(ThatWindow, this); InitializeComponent(); graphics.DrowGrid(myCanvas); //this.Height = myCanvas.Height; //this.Width = myCanvas.Width; }
public StandartMode(LifeForm ThatWindow) { CELLS_COUNT = settings.CellsCount; CELLS_COUNT = settings.CellsCount; terr = new Terrain(); terr.WIDTH1 = ThatWindow.Width; scan = new Scanner(terr, ThatWindow); terr.TurnFinished += scan.StartScan; terr.TurnFinished += NewTickDrow; terr.CELLS1 = CELLS_COUNT; terr.CreateRandom(); favor = new FavoritesForm(ThatWindow); graphics = new GraphicalApp(ThatWindow, favor); scan.PatternDetected += favor.Sc_PatternDetected; lifeThread = new Thread(terr.StartGame); lifeThread.Start(); }
public Scanner(Terrain terrain, LifeForm window) { terr = terrain; ThatWindow = window; }