/* * private void Initializer_Click(object sender, EventArgs e) * { * // 초기화가 안되어 있으면 실행 * * Control_Moving.Stop(); * Program_Indicator.Stop(); * * game_Start(); * Control_Moving.Start(); * Program_Indicator.Start(); * } */ private void Gene_Generator_Click(object sender, EventArgs e) { if (Learning.get_Current_Generation() != 1) { if (MessageBox.Show("이미 만들어진 1세대 유전자 정보는 삭제됩니다. \n계속하시겠습니까?", "알림", MessageBoxButtons.YesNo) == DialogResult.No) { return; } } if (Learning.Make_first_Learning_file()) { heuristics.set_Weight(Learning.Load_Recent_Gene()); Calculator.set_weight(Learning.Load_Recent_Gene()); System_Log.Items.Add("1세대 유전자 100개 생성"); } }
public void game_Start() { try { Calculator = new CalculationNetwork(Learning.get_Formula(), Learning.Load_Recent_Gene()); } catch (Exception ex) { Console.WriteLine(ex.Message); } heuristics = new Heuristics(width / Interval, height / Interval, Calculator); mapping = new Mapping(heuristics, width / Interval, height / Interval); heuristics.set_Weight(Learning.get_Weight()); Next_Block = Generator.Next(6); Current_Block = Generator.Next(6); BlockColor = mapping.init_Character(Current_Block, 5); }