ПРИЛОЖЕНИЕ 1 «Исходный текст программы»
# include <stdlib.h>
#include <ctime>
#pragma once
namespace курсач {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Сводка для Form1
/// </summary>
int matr[15][15]; // здесь хранится таблица с положением плиток
int pol=2; // размер игрового поля стандартно 2х2
int x=50,y=48;// размеры плитки
int hard;//кол-во перемешиваний матрицы
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: добавьте код конструктора
//
}
protected:
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::PictureBox^ pictureBox1;
protected:
private: System::Windows::Forms::PictureBox^ pictureBox2;
private: System::Windows::Forms::PictureBox^ pictureBox3;
private: System::Windows::Forms::PictureBox^ pictureBox4;
private: System::Windows::Forms::PictureBox^ pictureBox5;
private: System::Windows::Forms::PictureBox^ pictureBox6;
private: System::Windows::Forms::PictureBox^ pictureBox7;
private: System::Windows::Forms::PictureBox^ pictureBox8;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Panel^ panel1;
private: System::Windows::Forms::PictureBox^ pictureBox9;
private: System::Windows::Forms::PictureBox^ pictureBox10;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::PictureBox^ pictureBox14;
private: System::Windows::Forms::PictureBox^ pictureBox13;
private: System::Windows::Forms::PictureBox^ pictureBox12;
private: System::Windows::Forms::PictureBox^ pictureBox11;
private: System::Windows::Forms::PictureBox^ pictureBox15;
private: System::Windows::Forms::PictureBox^ pictureBox16;
private: System::Windows::Forms::Panel^ panel2;
private: System::Windows::Forms::Button^ button3;
private: System::Windows::Forms::Button^ button4;
private: System::Windows::Forms::Panel^ panel3;
private: System::Windows::Forms::PictureBox^ pictureBox17;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::TrackBar^ trackBar1;
private: System::Windows::Forms::Label^ label6;
private: System::Windows::Forms::TrackBar^ trackBar2;
private: System::Windows::Forms::CheckBox^ checkBox1;
private: System::Windows::Forms::PictureBox^ pictureBox18;
private: System::ComponentModel::IContainer^ components;
private:
/// <summary>
/// Требуется переменная конструктора.
/// </summary>
#pragma region Windows Form Designer generated code
/// <summary>
/// Обязательный метод для поддержки конструктора - не изменяйте
/// содержимое данного метода при помощи редактора кода.
/// </summary>
void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox3 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox4 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox5 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox6 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox7 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox8 = (gcnew System::Windows::Forms::PictureBox());
this->button1 = (gcnew System::Windows::Forms::Button());
this->panel1 = (gcnew System::Windows::Forms::Panel());
this->pictureBox15 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox14 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox13 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox12 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox11 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox10 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox9 = (gcnew System::Windows::Forms::PictureBox());
this->label2 = (gcnew System::Windows::Forms::Label());
this->pictureBox16 = (gcnew System::Windows::Forms::PictureBox());
this->panel2 = (gcnew System::Windows::Forms::Panel());
this->button3 = (gcnew System::Windows::Forms::Button());
this->button4 = (gcnew System::Windows::Forms::Button());
this->panel3 = (gcnew System::Windows::Forms::Panel());
this->checkBox1 = (gcnew System::Windows::Forms::CheckBox());
this->trackBar2 = (gcnew System::Windows::Forms::TrackBar());
this->label6 = (gcnew System::Windows::Forms::Label());
this->trackBar1 = (gcnew System::Windows::Forms::TrackBar());
this->label5 = (gcnew System::Windows::Forms::Label());
this->label4 = (gcnew System::Windows::Forms::Label());
this->label3 = (gcnew System::Windows::Forms::Label());
this->pictureBox17 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox18 = (gcnew System::Windows::Forms::PictureBox());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox3))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox4))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox5))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox6))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox7))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox8))->BeginInit();
this->panel1->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox15))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox14))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox13))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox12))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox11))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox10))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox9))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox16))->BeginInit();
this->panel2->SuspendLayout();
this->panel3->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar2))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar1))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox17))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox18))->BeginInit();
this->SuspendLayout();
//
// pictureBox1
//
this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox1.Image")));
this->pictureBox1->Location = System::Drawing::Point(0, 0);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size = System::Drawing::Size(68, 48);
this->pictureBox1->TabIndex = 0;
this->pictureBox1->TabStop = false;
this->pictureBox1->Click += gcnew System::EventHandler(this, &Form1::pictureBox1_Click);
//
// pictureBox2
//
this->pictureBox2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox2.Image")));
this->pictureBox2->Location = System::Drawing::Point(46, 0);
this->pictureBox2->Name = L"pictureBox2";
this->pictureBox2->Size = System::Drawing::Size(50, 48);
this->pictureBox2->TabIndex = 1;
this->pictureBox2->TabStop = false;
this->pictureBox2->Click += gcnew System::EventHandler(this, &Form1::pictureBox2_Click);
//
// pictureBox3
//
this->pictureBox3->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox3.Image")));
this->pictureBox3->Location = System::Drawing::Point(97, 0);
this->pictureBox3->Name = L"pictureBox3";
this->pictureBox3->Size = System::Drawing::Size(50, 48);
this->pictureBox3->TabIndex = 2;
this->pictureBox3->TabStop = false;
this->pictureBox3->Click += gcnew System::EventHandler(this, &Form1::pictureBox3_Click);
//
// pictureBox4
//
this->pictureBox4->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox4.Image")));
this->pictureBox4->Location = System::Drawing::Point(145, 0);
this->pictureBox4->Name = L"pictureBox4";
this->pictureBox4->Size = System::Drawing::Size(50, 48);
this->pictureBox4->TabIndex = 3;
this->pictureBox4->TabStop = false;
this->pictureBox4->Click += gcnew System::EventHandler(this, &Form1::pictureBox4_Click);
//
// pictureBox5
//
this->pictureBox5->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox5.Image")));
this->pictureBox5->Location = System::Drawing::Point(193, 0);
this->pictureBox5->Name = L"pictureBox5";
this->pictureBox5->Size = System::Drawing::Size(50, 48);
this->pictureBox5->TabIndex = 4;
this->pictureBox5->TabStop = false;
this->pictureBox5->Click += gcnew System::EventHandler(this, &Form1::pictureBox5_Click);
//
// pictureBox6
//
this->pictureBox6->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox6.Image")));
this->pictureBox6->Location = System::Drawing::Point(0, 43);
this->pictureBox6->Name = L"pictureBox6";
this->pictureBox6->Size = System::Drawing::Size(50, 48);
this->pictureBox6->TabIndex = 5;
this->pictureBox6->TabStop = false;
this->pictureBox6->Click += gcnew System::EventHandler(this, &Form1::pictureBox6_Click);
//
// pictureBox7
//
this->pictureBox7->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox7.Image")));
this->pictureBox7->Location = System::Drawing::Point(46, 43);
this->pictureBox7->Name = L"pictureBox7";
this->pictureBox7->Size = System::Drawing::Size(50, 48);
this->pictureBox7->TabIndex = 6;
this->pictureBox7->TabStop = false;
this->pictureBox7->Click += gcnew System::EventHandler(this, &Form1::pictureBox7_Click);
//
// pictureBox8
//
this->pictureBox8->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox8.Image")));
this->pictureBox8->Location = System::Drawing::Point(89, 43);
this->pictureBox8->Name = L"pictureBox8";
this->pictureBox8->Size = System::Drawing::Size(50, 48);
this->pictureBox8->TabIndex = 7;
this->pictureBox8->TabStop = false;
this->pictureBox8->Click += gcnew System::EventHandler(this, &Form1::pictureBox8_Click);
//
// button1
//
this->button1->Location = System::Drawing::Point(0, 15);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(132, 57);
this->button1->TabIndex = 8;
this->button1->Text = L"новая игра";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// panel1
//
this->panel1->BackColor = System::Drawing::Color::Lime;
this->panel1->Controls->Add(this->pictureBox15);
this->panel1->Controls->Add(this->pictureBox14);
this->panel1->Controls->Add(this->pictureBox13);
this->panel1->Controls->Add(this->pictureBox12);
this->panel1->Controls->Add(this->pictureBox11);
this->panel1->Controls->Add(this->pictureBox10);
this->panel1->Controls->Add(this->pictureBox8);
this->panel1->Controls->Add(this->pictureBox9);
this->panel1->Controls->Add(this->pictureBox7);
this->panel1->Controls->Add(this->pictureBox6);
this->panel1->Controls->Add(this->pictureBox5);
this->panel1->Controls->Add(this->pictureBox4);
this->panel1->Controls->Add(this->pictureBox3);
this->panel1->Controls->Add(this->pictureBox2);
this->panel1->Controls->Add(this->pictureBox1);
this->panel1->Location = System::Drawing::Point(119, 50);
this->panel1->Name = L"panel1";
this->panel1->Size = System::Drawing::Size(29, 50);
this->panel1->TabIndex = 10;
this->panel1->Visible = false;
//
// pictureBox15
//
this->pictureBox15->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox15.Image")));
this->pictureBox15->Location = System::Drawing::Point(190, 97);
this->pictureBox15->Name = L"pictureBox15";
this->pictureBox15->Size = System::Drawing::Size(50, 48);
this->pictureBox15->TabIndex = 17;
this->pictureBox15->TabStop = false;
this->pictureBox15->Click += gcnew System::EventHandler(this, &Form1::pictureBox15_Click);
//
// pictureBox14
//
this->pictureBox14->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox14.Image")));
this->pictureBox14->Location = System::Drawing::Point(145, 97);
this->pictureBox14->Name = L"pictureBox14";
this->pictureBox14->Size = System::Drawing::Size(50, 48);
this->pictureBox14->TabIndex = 16;
this->pictureBox14->TabStop = false;
this->pictureBox14->Click += gcnew System::EventHandler(this, &Form1::pictureBox14_Click);
//
// pictureBox13
//
this->pictureBox13->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox13.Image")));
this->pictureBox13->Location = System::Drawing::Point(89, 97);
this->pictureBox13->Name = L"pictureBox13";
this->pictureBox13->Size = System::Drawing::Size(50, 48);
this->pictureBox13->TabIndex = 15;
this->pictureBox13->TabStop = false;
this->pictureBox13->Click += gcnew System::EventHandler(this, &Form1::pictureBox13_Click);
//
// pictureBox12
//
this->pictureBox12->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox12.Image")));
this->pictureBox12->Location = System::Drawing::Point(46, 97);
this->pictureBox12->Name = L"pictureBox12";
this->pictureBox12->Size = System::Drawing::Size(50, 48);
this->pictureBox12->TabIndex = 14;
this->pictureBox12->TabStop = false;
this->pictureBox12->Click += gcnew System::EventHandler(this, &Form1::pictureBox12_Click);
//
// pictureBox11
//
this->pictureBox11->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox11.Image")));
this->pictureBox11->Location = System::Drawing::Point(0, 97);
this->pictureBox11->Name = L"pictureBox11";
this->pictureBox11->Size = System::Drawing::Size(50, 48);
this->pictureBox11->TabIndex = 13;
this->pictureBox11->TabStop = false;
this->pictureBox11->Click += gcnew System::EventHandler(this, &Form1::pictureBox11_Click);
//
// pictureBox10
//
this->pictureBox10->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox10.Image")));
this->pictureBox10->Location = System::Drawing::Point(193, 43);
this->pictureBox10->Name = L"pictureBox10";
this->pictureBox10->Size = System::Drawing::Size(50, 48);
this->pictureBox10->TabIndex = 12;
this->pictureBox10->TabStop = false;
this->pictureBox10->Click += gcnew System::EventHandler(this, &Form1::pictureBox10_Click);
//
// pictureBox9
//
this->pictureBox9->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox9.Image")));
this->pictureBox9->Location = System::Drawing::Point(137, 43);
this->pictureBox9->Name = L"pictureBox9";
this->pictureBox9->Size = System::Drawing::Size(50, 48);
this->pictureBox9->TabIndex = 11;
this->pictureBox9->TabStop = false;
this->pictureBox9->Click += gcnew System::EventHandler(this, &Form1::pictureBox9_Click);
//
// label2
//
this->label2->AutoSize = true;
this->label2->Font = (gcnew System::Drawing::Font(L"Papyrus", 15.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label2->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(64)),
static_cast<System::Int32>(static_cast<System::Byte>(0)));
this->label2->Location = System::Drawing::Point(368, 5);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(0, 33);
this->label2->TabIndex = 14;
//
// pictureBox16
//
this->pictureBox16->Cursor = System::Windows::Forms::Cursors::Hand;
this->pictureBox16->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox16.Image")));
this->pictureBox16->Location = System::Drawing::Point(95, 43);
this->pictureBox16->Name = L"pictureBox16";
this->pictureBox16->Size = System::Drawing::Size(85, 85);
this->pictureBox16->TabIndex = 17;
this->pictureBox16->TabStop = false;
this->pictureBox16->Click += gcnew System::EventHandler(this, &Form1::pictureBox16_Click);
//
// panel2
//
this->panel2->Controls->Add(this->button3);
this->panel2->Controls->Add(this->button1);
this->panel2->Location = System::Drawing::Point(188, 154);
this->panel2->Name = L"panel2";
this->panel2->Size = System::Drawing::Size(135, 148);
this->panel2->TabIndex = 18;
//
// button3
//
this->button3->Location = System::Drawing::Point(2, 78);
this->button3->Name = L"button3";
this->button3->Size = System::Drawing::Size(130, 57);
this->button3->TabIndex = 9;
this->button3->Text = L"Выйти из игры";
this->button3->UseVisualStyleBackColor = true;
this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click_1);
//
// button4
//
this->button4->Location = System::Drawing::Point(12, 9);
this->button4->Name = L"button4";
this->button4->Size = System::Drawing::Size(115, 23);
this->button4->TabIndex = 19;
this->button4->Text = L"главное меню";
this->button4->UseVisualStyleBackColor = true;
this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
//
// panel3
//
this->panel3->Controls->Add(this->checkBox1);
this->panel3->Controls->Add(this->trackBar2);
this->panel3->Controls->Add(this->label6);
this->panel3->Controls->Add(this->trackBar1);
this->panel3->Controls->Add(this->label5);
this->panel3->Controls->Add(this->label4);
this->panel3->Controls->Add(this->label3);
this->panel3->Controls->Add(this->pictureBox17);
this->panel3->Controls->Add(this->pictureBox16);
this->panel3->Location = System::Drawing::Point(110, 53);
this->panel3->Name = L"panel3";
this->panel3->Size = System::Drawing::Size(258, 222);
this->panel3->TabIndex = 20;
this->panel3->Visible = false;
//
// checkBox1
//
this->checkBox1->AutoSize = true;
this->checkBox1->FlatStyle = System::Windows::Forms::FlatStyle::Popup;
this->checkBox1->Font = (gcnew System::Drawing::Font(L"Blackadder ITC", 15.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->checkBox1->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(64)),
static_cast<System::Int32>(static_cast<System::Byte>(0)));
this->checkBox1->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
this->checkBox1->Location = System::Drawing::Point(117, 235);
this->checkBox1->Name = L"checkBox1";
this->checkBox1->Size = System::Drawing::Size(138, 32);
this->checkBox1->TabIndex = 25;
this->checkBox1->Text = L"Подсказка";
this->checkBox1->UseVisualStyleBackColor = true;
this->checkBox1->CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox1_CheckedChanged);
//
// trackBar2
//
this->trackBar2->Cursor = System::Windows::Forms::Cursors::Hand;
this->trackBar2->LargeChange = 2;
this->trackBar2->Location = System::Drawing::Point(234, 194);
this->trackBar2->Maximum = 40;
this->trackBar2->Minimum = 2;
this->trackBar2->Name = L"trackBar2";
this->trackBar2->Size = System::Drawing::Size(104, 45);
this->trackBar2->TabIndex = 24;
this->trackBar2->Value = 2;
this->trackBar2->Scroll += gcnew System::EventHandler(this, &Form1::trackBar2_Scroll);
//
// label6
//
this->label6->AutoSize = true;
this->label6->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 15.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label6->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(128)),
static_cast<System::Int32>(static_cast<System::Byte>(0)));
this->label6->Location = System::Drawing::Point(181, 131);
this->label6->Name = L"label6";
this->label6->Size = System::Drawing::Size(47, 25);
this->label6->TabIndex = 23;
this->label6->Text = L"2х2";
//
// trackBar1
//
this->trackBar1->AccessibleDescription = L"";
this->trackBar1->AccessibleName = L"";
this->trackBar1->Cursor = System::Windows::Forms::Cursors::Hand;
this->trackBar1->Location = System::Drawing::Point(234, 153);
this->trackBar1->Maximum = 4;
this->trackBar1->Minimum = 2;
this->trackBar1->Name = L"trackBar1";
this->trackBar1->Size = System::Drawing::Size(104, 45);
this->trackBar1->TabIndex = 22;
this->trackBar1->TickStyle = System::Windows::Forms::TickStyle::TopLeft;
this->trackBar1->Value = 2;
this->trackBar1->Scroll += gcnew System::EventHandler(this, &Form1::trackBar1_Scroll);
//
// label5
//
this->label5->AutoSize = true;
this->label5->Font = (gcnew System::Drawing::Font(L"Blackadder ITC", 15.75F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)),
System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
this->label5->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(64)),
static_cast<System::Int32>(static_cast<System::Byte>(0)));
this->label5->Location = System::Drawing::Point(75, 194);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(138, 28);
this->label5->TabIndex = 21;
this->label5->Text = L"перемешка";
this->label5->Click += gcnew System::EventHandler(this, &Form1::label5_Click);
//
// label4
//
this->label4->AutoSize = true;
this->label4->Font = (gcnew System::Drawing::Font(L"Blackadder ITC", 15.75F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)),
System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
this->label4->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(64)),
static_cast<System::Int32>(static_cast<System::Byte>(0)));
this->label4->Location = System::Drawing::Point(75, 154);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(153, 28);
this->label4->TabIndex = 20;
this->label4->Text = L"Размер поля";
//
// label3
//
this->label3->AutoSize = true;
this->label3->FlatStyle = System::Windows::Forms::FlatStyle::Popup;
this->label3->Font = (gcnew System::Drawing::Font(L"Blackadder ITC", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label3->ForeColor = System::Drawing::Color::DarkGreen;
this->label3->Location = System::Drawing::Point(71, -4);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(247, 26);
this->label3->TabIndex = 19;
this->label3->Text = L"Выберите изображение";
//
// pictureBox17
//
this->pictureBox17->Cursor = System::Windows::Forms::Cursors::Hand;
this->pictureBox17->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox17.Image")));
this->pictureBox17->Location = System::Drawing::Point(216, 43);
this->pictureBox17->Name = L"pictureBox17";
this->pictureBox17->Size = System::Drawing::Size(85, 85);
this->pictureBox17->TabIndex = 18;
this->pictureBox17->TabStop = false;
this->pictureBox17->Click += gcnew System::EventHandler(this, &Form1::pictureBox17_Click);
//
// pictureBox18
//
this->pictureBox18->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox18.Image")));
this->pictureBox18->Location = System::Drawing::Point(137, 12);
this->pictureBox18->Name = L"pictureBox18";
this->pictureBox18->Size = System::Drawing::Size(32, 37);
this->pictureBox18->TabIndex = 21;
this->pictureBox18->TabStop = false;
this->pictureBox18->Visible = false;
this->pictureBox18->Click += gcnew System::EventHandler(this, &Form1::pictureBox18_Click);
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(224)),
static_cast<System::Int32>(static_cast<System::Byte>(192)));
this->ClientSize = System::Drawing::Size(514, 390);
this->Controls->Add(this->pictureBox18);
this->Controls->Add(this->panel3);
this->Controls->Add(this->button4);
this->Controls->Add(this->panel2);
this->Controls->Add(this->label2);
this->Controls->Add(this->panel1);
this->Name = L"Form1";
this->Text = L"Form1";
this->TransparencyKey = System::Drawing::Color::Olive;
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox3))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox4))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox5))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox6))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox7))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox8))->EndInit();
this->panel1->ResumeLayout(false);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox15))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox14))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox13))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox12))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox11))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox10))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox9))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox16))->EndInit();
this->panel2->ResumeLayout(false);
this->panel3->ResumeLayout(false);
this->panel3->PerformLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar2))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar1))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox17))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox18))->EndInit();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
//функции для работы с плитками для игры
////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
int findi(int nom) // находит координату i элемента в матрице (в какой строке находиться)
{
for (int i=0;i<pol;i++)
for(int j=0;j<pol;j++)
if (matr[i][j]==nom)
return(i);
}
int findj(int nom) // находит координату j элемента в матрице (в какой строке находиться)
{
for (int i=0;i<pol;i++)
for(int j=0;j<pol;j++)
if (matr[i][j]==nom)
return(j);
}
bool up(int nom)// проверка возможности перемещения вверх
{
int i,j;
i=findi(nom);//ищем координаты плитки
j=findj(nom);
if (i==0) //если это первая строка то переместить нельзя
return(false);
else
if (matr[i-1][j]==0) //если сверху клетка пуста то переместить можно
{int temp;
temp=matr[i][j]; //меняем местами плитки
matr[i][j]=matr[i-1][j];
matr[i-1][j]=temp;
return(true); // поэтому возвращаем 1
}
return(false);
}
bool down(int nom)// проверка возможности перемещения вниз
{
int i,j;
i=findi(nom);//ищем координаты плитки
j=findj(nom);
if (i==pol-1) //если это последняя строка то переместить нельзя
return(false);
else
if (matr[i+1][j]==0) //если снизу клетка пуста то переместить можно
{int temp;
temp=matr[i][j]; //меняем местами плитки
matr[i][j]=matr[i+1][j];
matr[i+1][j]=temp;
return(true); // поэтому возвращаем 1
}
return(false); //во всех остальных случаях переместить нельзя
}
bool left(int nom)// проверка возможности перемещения влево
{
int i,j;
i=findi(nom);//ищем координаты плитки
j=findj(nom);
if (j==0) //если это первый столбец то переместить нельзя
return(false);
else
if (matr[i][j-1]==0) //если слева клетка пуста то переместить можно
{int temp;
temp=matr[i][j]; //меняем местами плитки
matr[i][j]=matr[i][j-1];
matr[i][j-1]=temp;
return(true); // поэтому возвращаем 1
}
return(false); //во всех остальных случаях переместить нельзя
}
bool right(int nom)// проверка возможности перемещения вправо
{
int i,j;
i=findi(nom);//ищем координаты плитки
j=findj(nom);
if (j==pol-1) //если это последний столбец то переместить нельзя
return(false);
else
if (matr[i][j+1]==0){ //если справа клетка пуста то переместить можно
int temp;
temp=matr[i][j]; //меняем местами плитки
matr[i][j]=matr[i][j+1];
matr[i][j+1]=temp;
return(true); // возвращаем 1
}
return(false); //во всех остальных случаях переместить нельзя
}
bool updateVisTru()
{
pictureBox4->Visible=true;
pictureBox5->Visible=true;
pictureBox6->Visible=true;
pictureBox7->Visible=true;
pictureBox8->Visible=true;
pictureBox9->Visible=true;
pictureBox10->Visible=true;
pictureBox11->Visible=true;
pictureBox12->Visible=true;
pictureBox13->Visible=true;
pictureBox14->Visible=true;
pictureBox15->Visible=true;
return(true);
}
bool updateVisFal(int x,int y)
{
if (pol==2){
pictureBox4->Visible=false;
pictureBox5->Visible=false;
pictureBox6->Visible=false;
pictureBox7->Visible=false;
pictureBox8->Visible=false;
pictureBox9->Visible=false;
pictureBox10->Visible=false;
pictureBox11->Visible=false;
pictureBox12->Visible=false;
pictureBox13->Visible=false;
pictureBox14->Visible=false;
pictureBox15->Visible=false;
}
if (pol==3){
pictureBox9->Visible=false;
pictureBox10->Visible=false;
pictureBox11->Visible=false;
pictureBox12->Visible=false;
pictureBox13->Visible=false;
pictureBox14->Visible=false;
pictureBox15->Visible=false;
}
this->panel1->Size = System:: Drawing:: Size(x*pol, y*pol);
return(true);
}
void sizePlit()
{ this->pictureBox1->Size = System:: Drawing:: Size(x, y);
this->pictureBox2->Size = System:: Drawing:: Size(x, y);
this->pictureBox3->Size = System:: Drawing:: Size(x, y);
this->pictureBox4->Size = System:: Drawing:: Size(x, y);
this->pictureBox5->Size = System:: Drawing:: Size(x, y);
this->pictureBox6->Size = System:: Drawing:: Size(x, y);
this->pictureBox7->Size = System:: Drawing:: Size(x, y);
this->pictureBox8->Size = System:: Drawing:: Size(x, y);
this->pictureBox9->Size = System:: Drawing:: Size(x, y);
this->pictureBox10->Size = System:: Drawing:: Size(x, y);
this->pictureBox11->Size = System:: Drawing:: Size(x, y);
this->pictureBox12->Size = System:: Drawing:: Size(x, y);
this->pictureBox13->Size = System:: Drawing:: Size(x, y);
this->pictureBox14->Size = System:: Drawing:: Size(x, y);
this->pictureBox15->Size = System:: Drawing:: Size(x, y);
}
bool update()// обновить экран, n-расстояние от краев кратное 50
{ int i,j; // кординаты плитки
sizePlit();
updateVisTru();
updateVisFal(x,y);
i= findi(1); // ищем место в матрице
j= findj(1);
pictureBox1->Location=Point(j*x,i*y); // меняем положение
i= findi(2);
j= findj(2);
pictureBox2->Location=Point(j*x,i*y);
i= findi(3);
j= findj(3);
pictureBox3->Location=Point(j*x,i*y);
i= findi(4);
j= findj(4);
pictureBox4->Location=Point(j*x,i*y);
i= findi(5);
j= findj(5);
pictureBox5->Location=Point(j*x,i*y);
i= findi(6);
j= findj(6);
pictureBox6->Location=Point(j*x,i*y);
i= findi(7);
j= findj(7);
pictureBox7->Location=Point(j*x,i*y);
i= findi(8);
j= findj(8);
pictureBox8->Location=Point(j*x,i*y);
i= findi(9);
j= findj(9);
pictureBox9->Location=Point(j*x,i*y);
i= findi(10);
j= findj(10);
pictureBox10->Location=Point(j*x,i*y);
i= findi(11);
j= findj(11);
pictureBox11->Location=Point(j*x,i*y);
i= findi(12);
j= findj(12);
pictureBox12->Location=Point(j*x,i*y);
i= findi(13);
j= findj(13);
pictureBox13->Location=Point(j*x,i*y);
i= findi(14);
j= findj(14);
pictureBox14->Location=Point(j*x,i*y);
i= findi(15);
j= findj(15);
pictureBox15->Location=Point(j*x,i*y);
return(true);
}
void home4() //загрузка картинки с домиком в поле 4х4
{
pictureBox1->Image = Image::FromFile("c:\\home1_swap_part1x1.jpg");
pictureBox2->Image = Image::FromFile("c:\\home1_swap_part1x2.jpg");
pictureBox3->Image = Image::FromFile("c:\\home1_swap_part1x3.jpg");
pictureBox4->Image = Image::FromFile("c:\\home1_swap_part1x4.jpg");
pictureBox5->Image = Image::FromFile("c:\\home1_swap_part2x1.jpg");
pictureBox6->Image = Image::FromFile("c:\\home1_swap_part2x2.jpg");
pictureBox7->Image = Image::FromFile("c:\\home1_swap_part2x3.jpg");
pictureBox8->Image = Image::FromFile("c:\\home1_swap_part2x4.jpg");
pictureBox9->Image = Image::FromFile("c:\\home1_swap_part3x1.jpg");
pictureBox10->Image = Image::FromFile("c:\\home1_swap_part3x2.jpg");
pictureBox11->Image = Image::FromFile("c:\\home1_swap_part3x3.jpg");
pictureBox12->Image = Image::FromFile("c:\\home1_swap_part3x4.jpg");
pictureBox13->Image = Image::FromFile("c:\\home1_swap_part4x1.jpg");
pictureBox14->Image = Image::FromFile("c:\\home1_swap_part4x2.jpg");
pictureBox15->Image = Image::FromFile("c:\\home1_swap_part4x3.jpg");
x=75; // размер картинки с домиком
y=75;
update(); // выводим на экран
}
void home3() //загрузка картинки с домиком в поле 3х3
{
pictureBox1->Image = Image::FromFile("c:\\д1.jpg");
pictureBox2->Image = Image::FromFile("c:\\д2.jpg");
pictureBox3->Image = Image::FromFile("c:\\д3.jpg");
pictureBox4->Image = Image::FromFile("c:\\д4.jpg");
pictureBox5->Image = Image::FromFile("c:\\д5.jpg");
pictureBox6->Image = Image::FromFile("c:\\д6.jpg");
pictureBox7->Image = Image::FromFile("c:\\д7.jpg");
pictureBox8->Image = Image::FromFile("c:\\д8.jpg");
x=100; // размер картинки с домиком
y=100;
update(); // выводим на экран
}
void home2() //загрузка картинки с домиком в поле 2х2
{
pictureBox1->Image = Image::FromFile("c:\\home1 (1)_swap_part1x1.jpg");
pictureBox2->Image = Image::FromFile("c:\\home1 (1)_swap_part1x2.jpg");
pictureBox3->Image = Image::FromFile("c:\\home1 (1)_swap_part2x1.jpg");
pictureBox4->Image = Image::FromFile("c:\\home1 (1)_swap_part2x2.jpg");
x=150; // размер картинки с домиком
y=150;
update(); // выводим на экран
}
void num()
{
pictureBox1->Image = Image::FromFile("c:\\1.png");
pictureBox2->Image = Image::FromFile("c:\\2.png");
pictureBox3->Image = Image::FromFile("c:\\3.png");
pictureBox4->Image = Image::FromFile("c:\\4.png");
pictureBox5->Image = Image::FromFile("c:\\5.png");
pictureBox6->Image = Image::FromFile("c:\\6.png");
pictureBox7->Image = Image::FromFile("c:\\7.png");
pictureBox8->Image = Image::FromFile("c:\\8.png");
pictureBox9->Image = Image::FromFile("c:\\9.png");
pictureBox10->Image = Image::FromFile("c:\\10.png");
pictureBox11->Image = Image::FromFile("c:\\11.png");
pictureBox12->Image = Image::FromFile("c:\\12.png");
pictureBox13->Image = Image::FromFile("c:\\13.png");
pictureBox14->Image = Image::FromFile("c:\\14.png");
pictureBox15->Image = Image::FromFile("c:\\15.png");
x=68;
y=70;
update();
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
bool oup()// проверка возможности перемещения вверх 0
{
int i,j;
i=findi(0);//ищем координаты плитки
j=findj(0);
if (i==0) //если это первая строка то переместить нельзя
return(false);
else
{int temp;
temp=matr[i][j]; //меняем местами плитки
matr[i][j]=matr[i-1][j];
matr[i-1][j]=temp;
return(true); // возвращаем 1
}
return(false);
}
bool odown()// проверка возможности перемещения вниз
{
int i,j;
i=findi(0);//ищем координаты плитки
j=findj(0);
if (i==pol-1) //если это последняя строка то переместить нельзя
return(false);
else
{int temp;
temp=matr[i][j]; //меняем местами плитки
matr[i][j]=matr[i+1][j];
matr[i+1][j]=temp;
return(true); // поэтому возвращаем 1
}
return(false); //во всех остальных случаях переместить нельзя
}
bool oleft()// проверка возможности перемещения влево
{
int i,j;
i=findi(0);//ищем координаты плитки
j=findj(0);
if (j==0) //если это первый столбец то переместить нельзя
return(false);
else
{int temp;
temp=matr[i][j]; //меняем местами плитки
matr[i][j]=matr[i][j-1];
matr[i][j-1]=temp;
return(true); // поэтому возвращаем 1
}
return(false); //во всех остальных случаях переместить нельзя
}
bool oright()// проверка возможности перемещения вправо
{
int i,j;
i=findi(0);//ищем координаты плитки
j=findj(0);
if (j==pol-1) //если это последний столбец то переместить нельзя
return(false);
else
{
int temp;
temp=matr[i][j]; //меняем местами плитки
matr[i][j]=matr[i][j+1];
matr[i][j+1]=temp;
return(true); // возвращаем 1
}
return(false); //во всех остальных случаях переместить нельзя
}
////////////////////////////////////////
///////////////////////////////////////
int rndpero()// перемещает рандомно пустую клетку
{
int temp;
temp =rand()%4;
if (temp==0)
if (oup())
return(true);
if (temp==1)
if(oleft())
return(true);
if (temp==2)
if(oright())
return(true);
if (temp==3)
if(odown())
return(true);
return(temp);
}
bool randomo(int n)// перемешивает n раз и обновляет экран
{ int temp1,temp2=-1;
for (int i=1;i<n;i++){
temp1=rndpero();
if (temp1==temp2)
i--;
else temp2=temp1;
}
update();
return(true);
}
bool norandom()//заполнение матрицы и вывод на экран по порядку
{label2->Text="";
int k=1;
for (int i=0;i<pol;i++)
for (int j=0;j<pol;j++)
{ matr[i][j]=k;
k++;
}
matr[pol-1][pol-1]=0;
return(true);
}
bool pruf()//проверка на правильность
{label2->Text="";
bool k=true;
int kol=0;// колчество эл-в провереных
int temp=matr[0][0];//пер-я для сравнивания
for (int i=0;i<pol;i++) // проходим матрицу
for (int j=0;j<pol;j++)
{ kol++;
if (matr[i][j]<temp && kol!=pol*pol )// если текущий э-т меньше придыдущего и кол не равно размеру матрицы то не правильно
{
k=false;
}
else
if ( kol==pol*pol && matr[i][j]!=0)
k=false;
temp=matr[i][j];
if (checkBox1->Checked )
label2->Text+=matr[i][j];
}
if (k){
this->pictureBox18->Size = System:: Drawing:: Size(136,93);// вывод победной картинки
pictureBox18->Visible=true;
}
return(k);
}
bool go(int nom) //перемещаем любую плитку если это возможно
{ if(right(nom)||left(nom)||up(nom)||down(nom)){
update();
pruf();
return(true);}
return(false);
}
//обработчики кнопок и плиток
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { // новая игра
srand(time(NULL));
this->panel3->Size = System:: Drawing:: Size(390, 290);
panel2->Visible=false;
panel3->Visible=true;
}
private: System::Void pictureBox8_Click(System::Object^ sender, System::EventArgs^ e) {
go(8);//перемещаем плитку
}
private: System::Void pictureBox4_Click(System::Object^ sender, System::EventArgs^ e) {
go(4);
}
private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) {
go(1);
}
private: System::Void pictureBox2_Click(System::Object^ sender, System::EventArgs^ e) {
go(2);
}
private: System::Void pictureBox3_Click(System::Object^ sender, System::EventArgs^ e) {
go(3);
}
private: System::Void pictureBox5_Click(System::Object^ sender, System::EventArgs^ e) {
go(5);
}
private: System::Void pictureBox6_Click(System::Object^ sender, System::EventArgs^ e) {
go(6);
}
private: System::Void pictureBox7_Click(System::Object^ sender, System::EventArgs^ e) {
go(7);
}
private: System::Void pictureBox9_Click(System::Object^ sender, System::EventArgs^ e) {
go(9);
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button2_Click_1(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void pictureBox10_Click(System::Object^ sender, System::EventArgs^ e) {
go(10);
}
private: System::Void pictureBox11_Click(System::Object^ sender, System::EventArgs^ e) {
go(11);
}
private: System::Void pictureBox12_Click(System::Object^ sender, System::EventArgs^ e) {
go(12);
}
private: System::Void pictureBox13_Click(System::Object^ sender, System::EventArgs^ e) {
go(13);
}
private: System::Void pictureBox14_Click(System::Object^ sender, System::EventArgs^ e) {
go(14);
}
private: System::Void pictureBox15_Click(System::Object^ sender, System::EventArgs^ e) {
go(15);
}
private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
}
//////////////////////////////
//////////////////////////////
///////////////////////////// обработчики
private: System::Void pictureBox16_Click(System::Object^ sender, System::EventArgs^ e) {
hard=Convert::ToDouble(String::Concat( "", trackBar2->Value ));
norandom();
randomo(hard);
panel1->Visible=true;
panel3->Visible=false;
if (pol==2)
home2();
if (pol==3)
home3();
if (pol==4)
home4();
}
private: System::Void button3_Click_1(System::Object^ sender, System::EventArgs^ e) {
Close();
}
private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
pictureBox18->Visible=false; //скрываем картинку с победой
panel1->Visible=false;
panel2->Visible=true;
panel3->Visible=false;
}
private: System::Void pictureBox17_Click(System::Object^ sender, System::EventArgs^ e) {
norandom(); // заполняем матрицу по порядку
randomo(hard);//разбиваем матрицу
panel1->Visible=true; // открываем панель с игровым полем
panel3->Visible=false; //закрываем все остальные панели
num();
}
private: System::Void trackBar1_Scroll(System::Object^ sender, System::EventArgs^ e) {
pol=Convert::ToDouble(String::Concat( "", trackBar1->Value ));
label6->Text = String::Concat( "", trackBar1->Value )+"x"+String::Concat( "", trackBar1->Value );
}
private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void trackBar2_Scroll(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void label5_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void pictureBox18_Click(System::Object^ sender, System::EventArgs^ e) {
pictureBox18->Visible=false; //скрываем картинку с победой
button4_Click(sender,e);//главное меню
}
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
}
};
}