Guest User

Untitled

a guest
May 22nd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.67 KB | None | 0 0
  1. #pragma once
  2.  
  3. namespace Löfferschöck {
  4.  
  5. using namespace System;
  6. using namespace System::ComponentModel;
  7. using namespace System::Collections;
  8. using namespace System::Windows::Forms;
  9. using namespace System::Data;
  10. using namespace System::Drawing;
  11. using namespace std;
  12.  
  13. /// <summary>
  14. /// Summary for Form1
  15. /// </summary>
  16. public ref class Form1 : public System::Windows::Forms::Form
  17. {
  18. public:
  19. Form1(void)
  20. {
  21. InitializeComponent();
  22. //
  23. //TODO: Add the constructor code here
  24. //
  25. }
  26.  
  27. protected:
  28. /// <summary>
  29. /// Clean up any resources being used.
  30. /// </summary>
  31. ~Form1()
  32. {
  33. if (components)
  34. {
  35. delete components;
  36. }
  37. }
  38. private: System::Windows::Forms::Button^ button1;
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. private: System::Windows::Forms::Label^ currentPlayer;
  48. private: System::Windows::Forms::Button^ button2;
  49. private: System::Windows::Forms::Button^ debugger;
  50. private: System::Windows::Forms::Button^ button3;
  51. private: System::Windows::Forms::Button^ button4;
  52. private: System::Windows::Forms::Button^ button5;
  53. private: System::Windows::Forms::Button^ button6;
  54. private: System::Windows::Forms::Button^ button7;
  55. private: System::Windows::Forms::Button^ button8;
  56. private: System::Windows::Forms::Button^ button9;
  57. private: System::Windows::Forms::Button^ c1;
  58. private: System::Windows::Forms::Button^ c2;
  59. private: System::Windows::Forms::Button^ c3;
  60. private: System::Windows::Forms::Button^ c4;
  61. private: System::Windows::Forms::Button^ c5;
  62. private: System::Windows::Forms::Button^ c6;
  63. private: System::Windows::Forms::Button^ c7;
  64. private: System::Windows::Forms::Button^ c8;
  65. private: System::Windows::Forms::Button^ c9;
  66. private: System::Windows::Forms::Label^ label1;
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76. protected:
  77.  
  78. private:
  79. /// <summary>
  80. /// Required designer variable.
  81. /// </summary>
  82. System::ComponentModel::Container ^components;
  83.  
  84. #pragma region Windows Form Designer generated code
  85. /// <summary>
  86. /// Required method for Designer support - do not modify
  87. /// the contents of this method with the code editor.
  88. /// </summary>
  89. void InitializeComponent(void)
  90. {
  91. this->button1 = (gcnew System::Windows::Forms::Button());
  92. this->currentPlayer = (gcnew System::Windows::Forms::Label());
  93. this->button2 = (gcnew System::Windows::Forms::Button());
  94. this->debugger = (gcnew System::Windows::Forms::Button());
  95. this->button3 = (gcnew System::Windows::Forms::Button());
  96. this->button4 = (gcnew System::Windows::Forms::Button());
  97. this->button5 = (gcnew System::Windows::Forms::Button());
  98. this->button6 = (gcnew System::Windows::Forms::Button());
  99. this->button7 = (gcnew System::Windows::Forms::Button());
  100. this->button8 = (gcnew System::Windows::Forms::Button());
  101. this->button9 = (gcnew System::Windows::Forms::Button());
  102. this->c1 = (gcnew System::Windows::Forms::Button());
  103. this->c2 = (gcnew System::Windows::Forms::Button());
  104. this->c3 = (gcnew System::Windows::Forms::Button());
  105. this->c4 = (gcnew System::Windows::Forms::Button());
  106. this->c5 = (gcnew System::Windows::Forms::Button());
  107. this->c6 = (gcnew System::Windows::Forms::Button());
  108. this->c7 = (gcnew System::Windows::Forms::Button());
  109. this->c8 = (gcnew System::Windows::Forms::Button());
  110. this->c9 = (gcnew System::Windows::Forms::Button());
  111. this->label1 = (gcnew System::Windows::Forms::Label());
  112. this->SuspendLayout();
  113. //
  114. // button1
  115. //
  116. this->button1->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(30)), static_cast<System::Int32>(static_cast<System::Byte>(30)),
  117. static_cast<System::Int32>(static_cast<System::Byte>(30)));
  118. this->button1->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  119. this->button1->Font = (gcnew System::Drawing::Font(L"MicroSquare", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  120. static_cast<System::Byte>(0)));
  121. this->button1->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  122. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  123. this->button1->Location = System::Drawing::Point(12, 12);
  124. this->button1->Name = L"button1";
  125. this->button1->Size = System::Drawing::Size(35, 35);
  126. this->button1->TabIndex = 0;
  127. this->button1->Text = L" ";
  128. this->button1->UseVisualStyleBackColor = false;
  129. this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
  130. //
  131. // currentPlayer
  132. //
  133. this->currentPlayer->AutoSize = true;
  134. this->currentPlayer->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  135. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  136. this->currentPlayer->Location = System::Drawing::Point(12, 132);
  137. this->currentPlayer->Name = L"currentPlayer";
  138. this->currentPlayer->Size = System::Drawing::Size(45, 13);
  139. this->currentPlayer->TabIndex = 1;
  140. this->currentPlayer->Text = L"Player 1";
  141. this->currentPlayer->Click += gcnew System::EventHandler(this, &Form1::currentPlayer_Click);
  142. //
  143. // button2
  144. //
  145. this->button2->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(30)), static_cast<System::Int32>(static_cast<System::Byte>(30)),
  146. static_cast<System::Int32>(static_cast<System::Byte>(30)));
  147. this->button2->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  148. this->button2->Font = (gcnew System::Drawing::Font(L"MicroSquare", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  149. static_cast<System::Byte>(0)));
  150. this->button2->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  151. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  152. this->button2->Location = System::Drawing::Point(53, 12);
  153. this->button2->Name = L"button2";
  154. this->button2->Size = System::Drawing::Size(35, 35);
  155. this->button2->TabIndex = 2;
  156. this->button2->UseVisualStyleBackColor = false;
  157. this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
  158. //
  159. // debugger
  160. //
  161. this->debugger->Location = System::Drawing::Point(159, 23);
  162. this->debugger->Name = L"debugger";
  163. this->debugger->Size = System::Drawing::Size(125, 96);
  164. this->debugger->TabIndex = 3;
  165. this->debugger->UseVisualStyleBackColor = true;
  166. this->debugger->Click += gcnew System::EventHandler(this, &Form1::debugger_Click);
  167. //
  168. // button3
  169. //
  170. this->button3->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(30)), static_cast<System::Int32>(static_cast<System::Byte>(30)),
  171. static_cast<System::Int32>(static_cast<System::Byte>(30)));
  172. this->button3->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  173. this->button3->Font = (gcnew System::Drawing::Font(L"MicroSquare", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  174. static_cast<System::Byte>(0)));
  175. this->button3->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  176. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  177. this->button3->Location = System::Drawing::Point(95, 13);
  178. this->button3->Name = L"button3";
  179. this->button3->Size = System::Drawing::Size(35, 35);
  180. this->button3->TabIndex = 4;
  181. this->button3->UseVisualStyleBackColor = false;
  182. this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
  183. //
  184. // button4
  185. //
  186. this->button4->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(30)), static_cast<System::Int32>(static_cast<System::Byte>(30)),
  187. static_cast<System::Int32>(static_cast<System::Byte>(30)));
  188. this->button4->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  189. this->button4->Font = (gcnew System::Drawing::Font(L"MicroSquare", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  190. static_cast<System::Byte>(0)));
  191. this->button4->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  192. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  193. this->button4->Location = System::Drawing::Point(12, 53);
  194. this->button4->Name = L"button4";
  195. this->button4->Size = System::Drawing::Size(35, 35);
  196. this->button4->TabIndex = 5;
  197. this->button4->UseVisualStyleBackColor = false;
  198. this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
  199. //
  200. // button5
  201. //
  202. this->button5->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(30)), static_cast<System::Int32>(static_cast<System::Byte>(30)),
  203. static_cast<System::Int32>(static_cast<System::Byte>(30)));
  204. this->button5->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  205. this->button5->Font = (gcnew System::Drawing::Font(L"MicroSquare", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  206. static_cast<System::Byte>(0)));
  207. this->button5->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  208. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  209. this->button5->Location = System::Drawing::Point(53, 53);
  210. this->button5->Name = L"button5";
  211. this->button5->Size = System::Drawing::Size(35, 35);
  212. this->button5->TabIndex = 6;
  213. this->button5->UseVisualStyleBackColor = false;
  214. this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);
  215. //
  216. // button6
  217. //
  218. this->button6->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(30)), static_cast<System::Int32>(static_cast<System::Byte>(30)),
  219. static_cast<System::Int32>(static_cast<System::Byte>(30)));
  220. this->button6->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  221. this->button6->Font = (gcnew System::Drawing::Font(L"MicroSquare", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  222. static_cast<System::Byte>(0)));
  223. this->button6->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  224. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  225. this->button6->Location = System::Drawing::Point(94, 54);
  226. this->button6->Name = L"button6";
  227. this->button6->Size = System::Drawing::Size(35, 35);
  228. this->button6->TabIndex = 7;
  229. this->button6->UseVisualStyleBackColor = false;
  230. this->button6->Click += gcnew System::EventHandler(this, &Form1::button6_Click);
  231. //
  232. // button7
  233. //
  234. this->button7->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(30)), static_cast<System::Int32>(static_cast<System::Byte>(30)),
  235. static_cast<System::Int32>(static_cast<System::Byte>(30)));
  236. this->button7->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  237. this->button7->Font = (gcnew System::Drawing::Font(L"MicroSquare", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  238. static_cast<System::Byte>(0)));
  239. this->button7->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  240. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  241. this->button7->Location = System::Drawing::Point(12, 94);
  242. this->button7->Name = L"button7";
  243. this->button7->Size = System::Drawing::Size(35, 35);
  244. this->button7->TabIndex = 8;
  245. this->button7->UseVisualStyleBackColor = false;
  246. this->button7->Click += gcnew System::EventHandler(this, &Form1::button7_Click);
  247. //
  248. // button8
  249. //
  250. this->button8->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(30)), static_cast<System::Int32>(static_cast<System::Byte>(30)),
  251. static_cast<System::Int32>(static_cast<System::Byte>(30)));
  252. this->button8->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  253. this->button8->Font = (gcnew System::Drawing::Font(L"MicroSquare", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  254. static_cast<System::Byte>(0)));
  255. this->button8->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  256. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  257. this->button8->Location = System::Drawing::Point(53, 94);
  258. this->button8->Name = L"button8";
  259. this->button8->Size = System::Drawing::Size(35, 35);
  260. this->button8->TabIndex = 9;
  261. this->button8->UseVisualStyleBackColor = false;
  262. this->button8->Click += gcnew System::EventHandler(this, &Form1::button8_Click);
  263. //
  264. // button9
  265. //
  266. this->button9->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(30)), static_cast<System::Int32>(static_cast<System::Byte>(30)),
  267. static_cast<System::Int32>(static_cast<System::Byte>(30)));
  268. this->button9->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  269. this->button9->Font = (gcnew System::Drawing::Font(L"MicroSquare", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  270. static_cast<System::Byte>(0)));
  271. this->button9->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  272. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  273. this->button9->Location = System::Drawing::Point(95, 95);
  274. this->button9->Name = L"button9";
  275. this->button9->Size = System::Drawing::Size(35, 35);
  276. this->button9->TabIndex = 10;
  277. this->button9->UseVisualStyleBackColor = false;
  278. this->button9->Click += gcnew System::EventHandler(this, &Form1::button9_Click);
  279. //
  280. // c1
  281. //
  282. this->c1->BackColor = System::Drawing::Color::Black;
  283. this->c1->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  284. this->c1->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  285. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  286. this->c1->Location = System::Drawing::Point(22, 155);
  287. this->c1->Name = L"c1";
  288. this->c1->Size = System::Drawing::Size(25, 25);
  289. this->c1->TabIndex = 11;
  290. this->c1->Text = L"1";
  291. this->c1->UseVisualStyleBackColor = false;
  292. //
  293. // c2
  294. //
  295. this->c2->BackColor = System::Drawing::Color::Black;
  296. this->c2->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  297. this->c2->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  298. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  299. this->c2->Location = System::Drawing::Point(48, 155);
  300. this->c2->Name = L"c2";
  301. this->c2->Size = System::Drawing::Size(25, 25);
  302. this->c2->TabIndex = 12;
  303. this->c2->Text = L"2";
  304. this->c2->UseVisualStyleBackColor = false;
  305. //
  306. // c3
  307. //
  308. this->c3->BackColor = System::Drawing::Color::Black;
  309. this->c3->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  310. this->c3->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  311. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  312. this->c3->Location = System::Drawing::Point(74, 155);
  313. this->c3->Name = L"c3";
  314. this->c3->Size = System::Drawing::Size(25, 25);
  315. this->c3->TabIndex = 13;
  316. this->c3->Text = L"3";
  317. this->c3->UseVisualStyleBackColor = false;
  318. //
  319. // c4
  320. //
  321. this->c4->BackColor = System::Drawing::Color::Black;
  322. this->c4->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  323. this->c4->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  324. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  325. this->c4->Location = System::Drawing::Point(22, 181);
  326. this->c4->Name = L"c4";
  327. this->c4->Size = System::Drawing::Size(25, 25);
  328. this->c4->TabIndex = 14;
  329. this->c4->Text = L"4";
  330. this->c4->UseVisualStyleBackColor = false;
  331. //
  332. // c5
  333. //
  334. this->c5->BackColor = System::Drawing::Color::Black;
  335. this->c5->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  336. this->c5->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  337. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  338. this->c5->Location = System::Drawing::Point(48, 181);
  339. this->c5->Name = L"c5";
  340. this->c5->Size = System::Drawing::Size(25, 25);
  341. this->c5->TabIndex = 15;
  342. this->c5->Text = L"5";
  343. this->c5->UseVisualStyleBackColor = false;
  344. //
  345. // c6
  346. //
  347. this->c6->BackColor = System::Drawing::Color::Black;
  348. this->c6->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  349. this->c6->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  350. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  351. this->c6->Location = System::Drawing::Point(74, 181);
  352. this->c6->Name = L"c6";
  353. this->c6->Size = System::Drawing::Size(25, 25);
  354. this->c6->TabIndex = 16;
  355. this->c6->Text = L"6";
  356. this->c6->UseVisualStyleBackColor = false;
  357. this->c6->Click += gcnew System::EventHandler(this, &Form1::button15_Click);
  358. //
  359. // c7
  360. //
  361. this->c7->BackColor = System::Drawing::Color::Black;
  362. this->c7->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  363. this->c7->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  364. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  365. this->c7->Location = System::Drawing::Point(22, 207);
  366. this->c7->Name = L"c7";
  367. this->c7->Size = System::Drawing::Size(25, 25);
  368. this->c7->TabIndex = 17;
  369. this->c7->Text = L"7";
  370. this->c7->UseVisualStyleBackColor = false;
  371. //
  372. // c8
  373. //
  374. this->c8->BackColor = System::Drawing::Color::Black;
  375. this->c8->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  376. this->c8->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  377. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  378. this->c8->Location = System::Drawing::Point(48, 207);
  379. this->c8->Name = L"c8";
  380. this->c8->Size = System::Drawing::Size(25, 25);
  381. this->c8->TabIndex = 18;
  382. this->c8->Text = L"8";
  383. this->c8->UseVisualStyleBackColor = false;
  384. //
  385. // c9
  386. //
  387. this->c9->BackColor = System::Drawing::Color::Black;
  388. this->c9->FlatStyle = System::Windows::Forms::FlatStyle::Flat;
  389. this->c9->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  390. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  391. this->c9->Location = System::Drawing::Point(74, 207);
  392. this->c9->Name = L"c9";
  393. this->c9->Size = System::Drawing::Size(25, 25);
  394. this->c9->TabIndex = 19;
  395. this->c9->Text = L"9";
  396. this->c9->UseVisualStyleBackColor = false;
  397. //
  398. // label1
  399. //
  400. this->label1->AutoSize = true;
  401. this->label1->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
  402. static_cast<System::Int32>(static_cast<System::Byte>(0)));
  403. this->label1->Location = System::Drawing::Point(105, 176);
  404. this->label1->Name = L"label1";
  405. this->label1->Size = System::Drawing::Size(95, 39);
  406. this->label1->TabIndex = 20;
  407. this->label1->Text = L"Click to remove\r\nthe corresponding \r\nbuttons symbol.\r\n";
  408. //
  409. // Form1
  410. //
  411. this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  412. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  413. this->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(10)), static_cast<System::Int32>(static_cast<System::Byte>(10)),
  414. static_cast<System::Int32>(static_cast<System::Byte>(10)));
  415. this->ClientSize = System::Drawing::Size(309, 262);
  416. this->Controls->Add(this->label1);
  417. this->Controls->Add(this->c9);
  418. this->Controls->Add(this->c8);
  419. this->Controls->Add(this->c7);
  420. this->Controls->Add(this->c6);
  421. this->Controls->Add(this->c5);
  422. this->Controls->Add(this->c4);
  423. this->Controls->Add(this->c3);
  424. this->Controls->Add(this->c2);
  425. this->Controls->Add(this->c1);
  426. this->Controls->Add(this->button9);
  427. this->Controls->Add(this->button8);
  428. this->Controls->Add(this->button7);
  429. this->Controls->Add(this->button6);
  430. this->Controls->Add(this->button5);
  431. this->Controls->Add(this->button4);
  432. this->Controls->Add(this->button3);
  433. this->Controls->Add(this->debugger);
  434. this->Controls->Add(this->button2);
  435. this->Controls->Add(this->currentPlayer);
  436. this->Controls->Add(this->button1);
  437. this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedToolWindow;
  438. this->Name = L"Form1";
  439. this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
  440. this->Text = L"Form1";
  441. this->ResumeLayout(false);
  442. this->PerformLayout();
  443.  
  444. }
  445. bool pturn; // Stores player turn, false = p1 true = p2
  446. bool b1; // Stores weather or not button is clicked, allows for moving tiles
  447. bool b2; // Stores weather or not button is clicked, allows for moving tiles
  448. bool b3; // Stores weather or not button is clicked, allows for moving tiles
  449. bool b4; // Stores weather or not button is clicked, allows for moving tiles
  450. bool b5; // Stores weather or not button is clicked, allows for moving tiles
  451. bool b6; // Stores weather or not button is clicked, allows for moving tiles
  452. bool b7; // Stores weather or not button is clicked, allows for moving tiles
  453. bool b8; // Stores weather or not button is clicked, allows for moving tiles
  454. bool b9; // Stores weather or not button is clicked, allows for moving tiles
  455. char bu1; // What char is on button.
  456. char bu2;
  457. char bu3;
  458. char bu4;
  459. char bu5;
  460. char bu6;
  461. char bu7;
  462. char bu8;
  463. char bu9;
  464. int bclick1; // Stores how many times p1 has clicked buttons, runs check for 3 in a row each time this == 3
  465. int bclick2; // Stores how many times p2 has clicked buttons, runs check for 3 in a row each time this == 3
  466.  
  467.  
  468. #pragma endregion
  469.  
  470. void checker(){
  471. if(bclick1>=3)
  472. {
  473. if(bu1=='X' && bu2=='X' && bu3=='X')
  474. {
  475. button1->Text="P";
  476. button2->Text="1";
  477. button3->Text=" ";
  478. button4->Text=" ";
  479. button5->Text=" ";
  480. button6->Text=" ";
  481. button7->Text="W";
  482. button8->Text="o";
  483. button9->Text="n";
  484. }
  485. }
  486. }
  487.  
  488. private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
  489. if(pturn == true && b1!=true){
  490. pturn=false;
  491. button1->Text="X";
  492. bclick1 =+1;
  493. b1=true;
  494. bu1='X';
  495. }
  496. else if(pturn==false && b1!=true){
  497. pturn=true;
  498. button1->Text="O";
  499. bclick2 =+1;
  500. b1=true;
  501. bu1='O';
  502. }
  503. }
  504. private: System::Void currentPlayer_Click(System::Object^ sender, System::EventArgs^ e) {
  505.  
  506. if(pturn == false){
  507. currentPlayer->Text = "Player 1";
  508. }
  509. else if(pturn==true){
  510. currentPlayer->Text = "Player 2";
  511. }
  512. }
  513.  
  514. private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
  515. if(pturn == true && b2!=true){
  516. pturn=false;
  517. button2->Text="X";
  518. bclick1 =+1;
  519. b2=true;
  520.  
  521. }
  522. else if(pturn==false && b2!=true){
  523. pturn=true;
  524. button2->Text="O";
  525. bclick2 =+1;
  526. b2=true;
  527. }
  528.  
  529. }
  530. private: System::Void debugger_Click(System::Object^ sender, System::EventArgs^ e) {
  531.  
  532. bclick1=5;
  533. }
  534. private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
  535. if(pturn == true && b3!=true){
  536. pturn=false;
  537. button3->Text="X";
  538. bclick1 =+1;
  539. b3=true;
  540.  
  541. }
  542. else if(pturn==false && b3!=true){
  543. pturn=true;
  544. button3->Text="O";
  545. bclick2 =+1;
  546. b3=true;
  547. }
  548. }
  549. private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
  550. if(pturn == true && b4!=true){
  551. pturn=false;
  552. button4->Text="X";
  553. bclick1 =+1;
  554. b4=true;
  555.  
  556. }
  557. else if(pturn==false && b4!=true){
  558. pturn=true;
  559. button4->Text="O";
  560. bclick2 =+1;
  561. b4=true;
  562. }
  563. }
  564. private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {
  565. if(pturn == true && b5!=true){
  566. pturn=false;
  567. button5->Text="X";
  568. bclick1 =+1;
  569. b5=true;
  570.  
  571. }
  572. else if(pturn==false && b5!=true){
  573. pturn=true;
  574. button5->Text="O";
  575. bclick2 =+1;
  576. b5=true;
  577. }
  578. }
  579. private: System::Void button6_Click(System::Object^ sender, System::EventArgs^ e) {
  580. if(pturn == true && b6!=true){
  581. pturn=false;
  582. button6->Text="X";
  583. bclick1 =+1;
  584. b6=true;
  585.  
  586. }
  587. else if(pturn==false && b6!=true){
  588. pturn=true;
  589. button6->Text="O";
  590. bclick2 =+1;
  591. b6=true;
  592. }
  593. }
  594. private: System::Void button7_Click(System::Object^ sender, System::EventArgs^ e) {
  595. if(pturn == true && b7!=true){
  596. pturn=false;
  597. button7->Text="X";
  598. bclick1 =+1;
  599. b7=true;
  600.  
  601. }
  602. else if(pturn==false && b7!=true){
  603. pturn=true;
  604. button7->Text="O";
  605. bclick2 =+1;
  606. b7=true;
  607. }
  608. }
  609. private: System::Void button8_Click(System::Object^ sender, System::EventArgs^ e) {
  610. if(pturn == true && b8!=true){
  611. pturn=false;
  612. button8->Text="X";
  613. bclick1 =+1;
  614. b8=true;
  615.  
  616. }
  617. else if(pturn==false && b8!=true){
  618. pturn=true;
  619. button8->Text="O";
  620. bclick2 =+1;
  621. b8=true;
  622. }
  623. }
  624. private: System::Void button9_Click(System::Object^ sender, System::EventArgs^ e) {
  625. if(pturn == true && b9!=true){
  626. pturn=false;
  627. button9->Text="X";
  628. bclick1 =+1;
  629. b9=true;
  630.  
  631. }
  632. else if(pturn==false && b9!=true){
  633. pturn=true;
  634. button9->Text="O";
  635. bclick2 =+1;
  636. b9=true;
  637. }
  638. }
  639. private: System::Void button15_Click(System::Object^ sender, System::EventArgs^ e) {
  640. }
  641. };
  642. }
Add Comment
Please, Sign In to add comment