Advertisement
Guest User

atiya

a guest
Nov 23rd, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.23 KB | None | 0 0
  1. namespace TicTacToe
  2. {
  3. public partial class Form1 : Form
  4. {
  5. //global variables
  6. static string strPlayerFace;
  7. static string strCompFace;
  8. static string strMultiplayerFace;
  9. int intCounter;
  10. int intPlayerScore = 0;
  11. int intCompScore = 0;
  12. bool blnClicked1;
  13. bool blnClicked2;
  14. bool blnClicked3;
  15. bool blnClicked4;
  16. bool blnClicked5;
  17. bool blnClicked6;
  18. bool blnClicked7;
  19. bool blnClicked8;
  20. bool blnClicked9;
  21. bool blnSelection1;
  22. bool blnSelection2;
  23. bool blnSelection3;
  24. bool blnSelection4;
  25. bool blnSelection5;
  26. bool blnSelection6;
  27. bool blnSelection7;
  28. bool blnSelection8;
  29. bool blnSelection9;
  30.  
  31. public Form1()
  32. {
  33. InitializeComponent();
  34. }
  35. private void Form1_Load(object sender, EventArgs e)
  36. {
  37.  
  38. //Output
  39. MessageBox.Show("Set Your Difficulty and Mode");
  40. declareVariable();
  41. }
  42. public void declareVariable()
  43. {
  44. //initialization
  45. strPlayerFace = "X";
  46. strCompFace = "O";
  47. strMultiplayerFace = "O";
  48. intCounter = 0;
  49. //Initialize the variabled
  50. blnClicked1 = false;
  51. blnClicked2 = false;
  52. blnClicked3 = false;
  53. blnClicked4 = false;
  54. blnClicked5 = false;
  55. blnClicked6 = false;
  56. blnClicked7 = false;
  57. blnClicked8 = false;
  58. blnClicked9 = false;
  59. blnSelection1 = false;
  60. blnSelection2 = false;
  61. blnSelection3 = false;
  62. blnSelection4 = false;
  63. blnSelection5 = false;
  64. blnSelection6 = false;
  65. blnSelection7 = false;
  66. blnSelection8 = false;
  67. blnSelection9 = false;
  68. //Reset Buttons
  69. btnTopLeft.Enabled = true;
  70. btnTopMid.Enabled = true;
  71. btnTopRight.Enabled = true;
  72. btnMidLeft.Enabled = true;
  73. btnMidCenter.Enabled = true;
  74. btnMidRight.Enabled = true;
  75. btnBottomLeft.Enabled = true;
  76. btnBottomMid.Enabled = true;
  77. btnBottomRight.Enabled = true;
  78. //Reset Button Text
  79. btnTopLeft.Text = "";
  80. btnTopMid.Text = "";
  81. btnTopRight.Text = "";
  82. btnMidLeft.Text = "";
  83. btnMidCenter.Text = "";
  84. btnMidRight.Text = "";
  85. btnBottomLeft.Text = "";
  86. btnBottomMid.Text = "";
  87. btnBottomRight.Text = "";
  88. }
  89. private void btnTopLeft_Click(object sender, EventArgs e)
  90. {
  91. if (blnClicked1 == false)
  92. {
  93. this.btnTopLeft.Text = strPlayerFace;
  94. blnClicked1 = true;
  95. this.btnTopLeft.Enabled = false;
  96. blnSelection1 = true;
  97. }
  98. checkWinner();
  99. intCounter++;
  100. if (radMultiplayer.Checked == true)
  101. {
  102. MultiplayerMode();
  103. }
  104. else
  105. {
  106. if (radEasy.Checked == true)
  107. {
  108. compMoveEasy();
  109. }
  110. else if (radMedium.Checked == true)
  111. {
  112. compMoveMedium();
  113. }
  114. else if (radHard.Checked == true)
  115. {
  116. compMoveHard();
  117. }
  118. }
  119. }
  120. private void btnTopMid_Click(object sender, EventArgs e)
  121. {
  122. if (blnClicked2 == false)
  123. {
  124. this.btnTopMid.Text = strPlayerFace;
  125. blnClicked2 = true;
  126. this.btnTopMid.Enabled = false;
  127. blnSelection2 = true;
  128. }
  129. checkWinner();
  130. intCounter++;if (radMultiplayer.Checked == true)
  131. {
  132. MultiplayerMode();
  133. }
  134. else
  135. {
  136. if (radEasy.Checked == true)
  137. {
  138. compMoveEasy();
  139. }
  140. else if (radMedium.Checked == true)
  141. {
  142. compMoveMedium();
  143. }
  144. else if (radHard.Checked == true)
  145. {
  146. compMoveHard();
  147. }
  148. }
  149. if (radMultiplayer.Checked == true)
  150. {
  151. MultiplayerMode();
  152. }
  153. else
  154. {
  155. if (radEasy.Checked == true)
  156. {
  157. compMoveEasy();
  158. }
  159. else if (radMedium.Checked == true)
  160. {
  161. compMoveMedium();
  162. }
  163. else if (radHard.Checked == true)
  164. {
  165. compMoveHard();
  166. }
  167. }
  168. }
  169. private void btnTopRight_Click(object sender, EventArgs e)
  170. {
  171. if (blnClicked3 == false)
  172. {
  173. this.btnTopRight.Text = strPlayerFace;
  174. blnClicked3 = true;
  175. this.btnTopRight.Enabled = false;
  176. blnSelection3 = true;
  177. }
  178. checkWinner();
  179. intCounter++;
  180. if (radMultiplayer.Checked == true)
  181. {
  182. MultiplayerMode();
  183. }
  184. else
  185. {
  186. if (radEasy.Checked == true)
  187. {
  188. compMoveEasy();
  189. }
  190. else if (radMedium.Checked == true)
  191. {
  192. compMoveMedium();
  193. }
  194. else if (radHard.Checked == true)
  195. {
  196. compMoveHard();
  197. }
  198. }
  199. }
  200.  
  201. private void btnMidLeft_Click(object sender, EventArgs e)
  202. {
  203. if (blnClicked4 == false)
  204. {
  205. this.btnMidLeft.Text = strPlayerFace;
  206. blnClicked4 = true;
  207. this.btnMidLeft.Enabled = false;
  208. blnSelection4 = true;
  209. }
  210. checkWinner();
  211. intCounter++;
  212. if (radMultiplayer.Checked == true)
  213. {
  214. MultiplayerMode();
  215. }
  216. else
  217. {
  218. if (radEasy.Checked == true)
  219. {
  220. compMoveEasy();
  221. }
  222. else if (radMedium.Checked == true)
  223. {
  224. compMoveMedium();
  225. }
  226. else if (radHard.Checked == true)
  227. {
  228. compMoveHard();
  229. }
  230. }
  231. }
  232.  
  233. private void btnMidCenter_Click(object sender, EventArgs e)
  234. {
  235. if (blnClicked5 == false)
  236. {
  237. this.btnMidCenter.Text = strPlayerFace;
  238. blnClicked5 = true;
  239. this.btnMidCenter.Enabled = false;
  240. blnSelection5 = true;
  241. }
  242. checkWinner();
  243. intCounter++;
  244. if (radMultiplayer.Checked == true)
  245. {
  246. MultiplayerMode();
  247. }
  248. else
  249. {
  250. if (radEasy.Checked == true)
  251. {
  252. compMoveEasy();
  253. }
  254. else if (radMedium.Checked == true)
  255. {
  256. compMoveMedium();
  257. }
  258. else if (radHard.Checked == true)
  259. {
  260. compMoveHard();
  261. }
  262. }
  263. }
  264.  
  265. private void btnMidRight_Click(object sender, EventArgs e)
  266. {
  267. if (blnClicked6 == false)
  268. {
  269. this.btnMidRight.Text = strPlayerFace;
  270. blnClicked6 = true;
  271. this.btnMidRight.Enabled = false;
  272. blnSelection6 = true;
  273. }
  274. checkWinner();
  275. intCounter++;
  276. if (radMultiplayer.Checked == true)
  277. {
  278. MultiplayerMode();
  279. }
  280. else
  281. {
  282. if (radEasy.Checked == true)
  283. {
  284. compMoveEasy();
  285. }
  286. else if (radMedium.Checked == true)
  287. {
  288. compMoveMedium();
  289. }
  290. else if (radHard.Checked == true)
  291. {
  292. compMoveHard();
  293. }
  294. }
  295. }
  296.  
  297. private void btnBottomLeft_Click(object sender, EventArgs e)
  298. {
  299. if (blnClicked7 == false)
  300. {
  301. this.btnBottomLeft.Text = strPlayerFace;
  302. blnClicked7 = true;
  303. this.btnBottomLeft.Enabled = false;
  304. blnSelection7 = true;
  305. }
  306. checkWinner();
  307. intCounter++;
  308. if (radMultiplayer.Checked == true)
  309. {
  310. MultiplayerMode();
  311. }
  312. else
  313. {
  314. if (radEasy.Checked == true)
  315. {
  316. compMoveEasy();
  317. }
  318. else if (radMedium.Checked == true)
  319. {
  320. compMoveMedium();
  321. }
  322. else if (radHard.Checked == true)
  323. {
  324. compMoveHard();
  325. }
  326. }
  327. }
  328.  
  329. private void btnBottomMid_Click(object sender, EventArgs e)
  330. {
  331. if (blnClicked8 == false)
  332. {
  333. this.btnBottomMid.Text = strPlayerFace;
  334. blnClicked8 = true;
  335. this.btnBottomMid.Enabled = false;
  336. blnSelection8 = true;
  337. }
  338. checkWinner();
  339. intCounter++;
  340. if (radMultiplayer.Checked == true)
  341. {
  342. MultiplayerMode();
  343. }
  344. else
  345. {
  346. if (radEasy.Checked == true)
  347. {
  348. compMoveEasy();
  349. }
  350. else if (radMedium.Checked == true)
  351. {
  352. compMoveMedium();
  353. }
  354. else if (radHard.Checked == true)
  355. {
  356. compMoveHard();
  357. }
  358. }
  359. }
  360.  
  361. private void btnBottomRight_Click(object sender, EventArgs e)
  362. {
  363. if (blnClicked9 == false)
  364. {
  365. this.btnBottomRight.Text = strPlayerFace;
  366. blnClicked9 = true;
  367. this.btnBottomRight.Enabled = false;
  368. blnSelection9 = true;
  369. }
  370. checkWinner();
  371. intCounter++;
  372. if (radMultiplayer.Checked == true)
  373. {
  374. MultiplayerMode();
  375. }
  376. else
  377. {
  378. if (radEasy.Checked == true)
  379. {
  380. compMoveEasy();
  381. }
  382. else if (radMedium.Checked == true)
  383. {
  384. compMoveMedium();
  385. }
  386. else if (radHard.Checked == true)
  387. {
  388. compMoveHard();
  389. }
  390. }
  391. }
  392. public void compMoveEasy()
  393. {
  394. Random rndClass = new Random();
  395. int rndSelection = rndClass.Next(1,10);
  396. {
  397. if (rndSelection == 1)
  398. {
  399. if (blnClicked1 == false)
  400. {
  401. this.btnTopLeft.Text = strCompFace;
  402. blnClicked1 = true;
  403. blnSelection1 = false;
  404. btnTopLeft.Enabled = false;
  405. intCounter++;
  406. }
  407. else
  408. {
  409. compMoveEasy();
  410. }
  411. checkWinner();
  412.  
  413. }
  414. if (rndSelection == 2)
  415. {
  416. if (blnClicked2 == false)
  417. {
  418. this.btnTopMid.Text = strCompFace;
  419. blnClicked2 = true;
  420. blnSelection2 = false;
  421. btnTopMid.Enabled = false;
  422. intCounter++;
  423. }
  424. else
  425. {
  426. compMoveEasy();
  427. }
  428. checkWinner();
  429.  
  430. }
  431. if (rndSelection == 3)
  432. {
  433. if (blnClicked3 == false)
  434. {
  435. this.btnTopRight.Text = strCompFace;
  436. blnClicked3 = true;
  437. blnSelection3 = false;
  438. btnTopRight.Enabled = false;
  439. intCounter++;
  440. }
  441. else
  442. {
  443. compMoveEasy();
  444. }
  445. checkWinner();
  446.  
  447. }
  448. if (rndSelection == 4)
  449. {
  450. if (blnClicked4 == false)
  451. {
  452. this.btnMidLeft.Text = strCompFace;
  453. blnClicked4 = true;
  454. blnSelection4 = false;
  455. btnMidLeft.Enabled = false;
  456. intCounter++;
  457. }
  458. else
  459. {
  460. compMoveEasy();
  461. }
  462. checkWinner();
  463.  
  464. }
  465. if (rndSelection == 5)
  466. {
  467. if (blnClicked5 == false)
  468. {
  469. this.btnMidCenter.Text = strCompFace;
  470. blnClicked5 = true;
  471. blnSelection5 = false;
  472. btnMidCenter.Enabled = false;
  473. intCounter++;
  474. }
  475. else
  476. {
  477. compMoveEasy();
  478. }
  479. checkWinner();
  480.  
  481. }
  482. if (rndSelection == 6)
  483. {
  484. if (blnClicked6 == false)
  485. {
  486. this.btnMidRight.Text = strCompFace;
  487. blnClicked6 = true;
  488. blnSelection6 = false;
  489. btnMidRight.Enabled = false;
  490. intCounter++;
  491. }
  492. else
  493. {
  494. compMoveEasy();
  495. }
  496. checkWinner();
  497.  
  498. }
  499. if (rndSelection == 7)
  500. {
  501. if (blnClicked7 == false)
  502. {
  503. this.btnBottomLeft.Text = strCompFace;
  504. blnClicked7 = true;
  505. blnSelection7 = false;
  506. btnBottomLeft.Enabled = false;
  507. intCounter++;
  508. }
  509. else
  510. {
  511. compMoveEasy();
  512. }
  513. checkWinner();
  514.  
  515. }
  516. if (rndSelection == 8)
  517. {
  518. if (blnClicked8 == false)
  519. {
  520. this.btnBottomMid.Text = strCompFace;
  521. blnClicked8 = true;
  522. blnSelection8 = false;
  523. btnBottomMid.Enabled = false;
  524. intCounter++;
  525. }
  526. else
  527. {
  528. compMoveEasy();
  529. }
  530. checkWinner();
  531.  
  532. }
  533. if (rndSelection == 9)
  534. {
  535. if (blnClicked9 == false)
  536. {
  537. this.btnBottomRight.Text = strCompFace;
  538. blnClicked9 = true;
  539. blnSelection9 = false;
  540. btnBottomRight.Enabled = false;
  541. intCounter++;
  542. }
  543. else
  544. {
  545. compMoveEasy();
  546. }
  547. checkWinner();
  548.  
  549. }
  550. }
  551. }
  552. public void compMoveMedium()
  553. {
  554. Random rndClass = new Random();
  555. int rndSelectionEven = rndClass.Next(1, 5);
  556. int rndSelectionOdd = rndClass.Next(1, 5);
  557. for (int intA = 0; intA < 1; intA++)
  558. {
  559. {
  560. if (blnClicked5 == false)
  561. {
  562. blnClicked5 = true;
  563. this.btnMidCenter.Text = strCompFace;
  564. btnMidCenter.Enabled = false;
  565. blnSelection5 = false;
  566. intCounter++;
  567. checkWinner();
  568.  
  569. }
  570. else if (rndSelectionEven == 1)
  571. {
  572. if (blnClicked2 == false)
  573. {
  574. this.btnTopMid.Text = strCompFace;
  575. blnClicked2 = true;
  576. blnSelection2 = false;
  577. btnTopMid.Enabled = false;
  578. intCounter++;
  579. }
  580. else
  581. {
  582. compMoveMedium();
  583. }
  584. checkWinner();
  585.  
  586. }
  587. else if (rndSelectionEven == 2)
  588. {
  589. if (blnClicked4 == false)
  590. {
  591. this.btnMidLeft.Text = strCompFace;
  592. blnClicked4 = true;
  593. blnSelection4 = false;
  594. btnMidLeft.Enabled = false;
  595. intCounter++;
  596. }
  597. else
  598. {
  599. compMoveMedium();
  600. }
  601. checkWinner();
  602.  
  603. }
  604. else if (rndSelectionEven == 3)
  605. {
  606. if (blnClicked6 == false)
  607. {
  608. this.btnMidRight.Text = strCompFace;
  609. blnClicked6 = true;
  610. blnSelection6 = false;
  611. btnMidRight.Enabled = false;
  612. intCounter++;
  613. }
  614. else
  615. {
  616. compMoveMedium();
  617. }
  618. checkWinner();
  619.  
  620. }
  621. else if (rndSelectionEven == 4)
  622. {
  623. if (blnClicked8 == false)
  624. {
  625. this.btnBottomMid.Text = strCompFace;
  626. blnClicked8 = true;
  627. blnSelection8 = false;
  628. btnBottomMid.Enabled = false;
  629. intCounter++;
  630. }
  631. else
  632. {
  633. compMoveMedium();
  634. }
  635. checkWinner();
  636.  
  637. }
  638. else if (rndSelectionOdd == 1)
  639. {
  640. if (blnClicked1 == false)
  641. {
  642. this.btnTopLeft.Text = strCompFace;
  643. blnClicked1 = true;
  644. blnSelection1 = false;
  645. btnTopLeft.Enabled = false;
  646. intCounter++;
  647. }
  648. else
  649. {
  650. compMoveMedium();
  651. }
  652. checkWinner();
  653.  
  654. }
  655. else if (rndSelectionOdd == 2)
  656. {
  657. if (blnClicked3 == false)
  658. {
  659. this.btnTopRight.Text = strCompFace;
  660. blnClicked3 = true;
  661. blnSelection3 = false;
  662. btnTopRight.Enabled = false;
  663. intCounter++;
  664. }
  665. else
  666. {
  667. compMoveMedium();
  668. }
  669. checkWinner();
  670.  
  671. }
  672. else if (rndSelectionOdd == 3)
  673. {
  674. if (blnClicked7 == false)
  675. {
  676. this.btnBottomLeft.Text = strCompFace;
  677. blnClicked7 = true;
  678. blnSelection7 = false;
  679. btnBottomLeft.Enabled = false;
  680. intCounter++;
  681. }
  682. else
  683. {
  684. compMoveMedium();
  685. }
  686. checkWinner();
  687.  
  688. }
  689. else if (rndSelectionOdd == 4)
  690. {
  691. if (blnClicked9 == false)
  692. {
  693. this.btnBottomRight.Text = strCompFace;
  694. blnClicked9 = true;
  695. blnSelection9 = false;
  696. btnBottomRight.Enabled = false;
  697. intCounter++;
  698. }
  699. else
  700. {
  701. compMoveMedium();
  702. }
  703. checkWinner();
  704.  
  705. }
  706. }
  707. }
  708. }
  709. public void compMoveHard()
  710. {
  711.  
  712. }
  713. public void checkWinner()
  714. {
  715. if (blnClicked1 == true && blnClicked2 == true && blnClicked3 == true)
  716. {
  717. if (blnSelection1 == true && blnSelection2 == true && blnSelection3 == true)
  718. {
  719. MessageBox.Show("User Wins", "Winning Message");
  720. intPlayerScore++;
  721. lblPlayerScoreNum.Text = intPlayerScore.ToString();
  722. declareVariable();
  723. }
  724. else if (blnSelection1 == false && blnSelection2 == false && blnSelection3 == false)
  725. {
  726. MessageBox.Show("Computer Wins", "Winning Message");
  727. intCompScore++;
  728. lblCompScoreNum.Text = intCompScore.ToString();
  729. declareVariable();
  730. }
  731. }
  732. else if (blnClicked4 == true && blnClicked5 == true && blnClicked6 == true)
  733. {
  734. if (blnSelection4 == true && blnSelection5 == true && blnSelection6 == true)
  735. {
  736. MessageBox.Show("User Wins", "Winning Message");
  737. intPlayerScore++;
  738. lblPlayerScoreNum.Text = intPlayerScore.ToString();
  739. declareVariable();
  740. }
  741. else if (blnSelection4 == false && blnSelection5 == false && blnSelection6 == false)
  742. {
  743. MessageBox.Show("Computer Wins", "Winning Message");
  744. intCompScore++;
  745. lblCompScoreNum.Text = intCompScore.ToString();
  746. declareVariable();
  747. }
  748. }
  749. else if (blnClicked7 == true && blnClicked8 == true && blnClicked9 == true)
  750. {
  751. if (blnSelection7 == true && blnSelection8 == true && blnSelection9 == true)
  752. {
  753. MessageBox.Show("User Wins", "Winning Message");
  754. intPlayerScore++;
  755. lblPlayerScoreNum.Text = intPlayerScore.ToString();
  756. declareVariable();
  757. }
  758. else if (blnSelection7 == false && blnSelection8 == false && blnSelection9 == false)
  759. {
  760. MessageBox.Show("Computer Wins", "Winning Message");
  761. intCompScore++;
  762. lblCompScoreNum.Text = intCompScore.ToString();
  763. declareVariable();
  764. }
  765. }
  766. else if (blnClicked1 == true && blnClicked4 == true && blnClicked7 == true)
  767. {
  768. if (blnSelection1 == true && blnSelection4 == true && blnSelection7 == true)
  769. {
  770. MessageBox.Show("User Wins", "Winning Message");
  771. intPlayerScore++;
  772. lblPlayerScoreNum.Text = intPlayerScore.ToString();
  773. declareVariable();
  774. }
  775. else if (blnSelection1 == false && blnSelection4 == false && blnSelection7 == false)
  776. {
  777. MessageBox.Show("Computer Wins", "Winning Message");
  778. intCompScore++;
  779. lblCompScoreNum.Text = intCompScore.ToString();
  780. declareVariable();
  781. }
  782. }
  783. else if (blnClicked2 == true && blnClicked5 == true && blnClicked8 == true)
  784. {
  785. if (blnSelection2 == true && blnSelection5 == true && blnSelection8 == true)
  786. {
  787. MessageBox.Show("User Wins", "Winning Message");
  788. intPlayerScore++;
  789. lblPlayerScoreNum.Text = intPlayerScore.ToString();
  790. declareVariable();
  791. }
  792. else if (blnSelection2 == false && blnSelection5 == false && blnSelection8 == false)
  793. {
  794. MessageBox.Show("Computer Wins", "Winning Message");
  795. intCompScore++;
  796. lblCompScoreNum.Text = intCompScore.ToString();
  797. declareVariable();
  798. }
  799. }
  800. else if (blnClicked3 == true && blnClicked6 == true && blnClicked9 == true)
  801. {
  802. if (blnSelection3 == true && blnSelection6 == true && blnSelection9 == true)
  803. {
  804. MessageBox.Show("User Wins", "Winning Message");
  805. intPlayerScore++;
  806. lblPlayerScoreNum.Text = intPlayerScore.ToString();
  807. declareVariable();
  808. }
  809. else if (blnSelection3 == false && blnSelection6 == false && blnSelection9 == false)
  810. {
  811. MessageBox.Show("Computer Wins", "Winning Message");
  812. intCompScore++;
  813. lblCompScoreNum.Text = intCompScore.ToString();
  814. declareVariable();
  815. }
  816. }
  817. else if (blnClicked1 == true && blnClicked5 == true && blnClicked9 == true)
  818. {
  819. if (blnSelection1 == true && blnSelection5 == true && blnSelection9 == true)
  820. {
  821. MessageBox.Show("User Wins", "Winning Message");
  822. intPlayerScore++;
  823. lblPlayerScoreNum.Text = intPlayerScore.ToString();
  824. declareVariable();
  825. }
  826. else if (blnSelection1 == false && blnSelection5 == false && blnSelection9 == false)
  827. {
  828. MessageBox.Show("Computer Wins", "Winning Message");
  829. intCompScore++;
  830. lblCompScoreNum.Text = intCompScore.ToString();
  831. declareVariable();
  832. }
  833. }
  834. else if (blnClicked3 == true && blnClicked5 == true && blnClicked7 == true)
  835. {
  836. if (blnSelection3 == true && blnSelection5 == true && blnSelection7 == true)
  837. {
  838. MessageBox.Show("User Wins", "Winning Message");
  839. intPlayerScore++;
  840. lblPlayerScoreNum.Text = intPlayerScore.ToString();
  841. declareVariable();
  842. }
  843. else if (blnSelection3 == false && blnSelection5 == false && blnSelection7 == false)
  844. {
  845. MessageBox.Show("Computer Wins", "Winning Message");
  846. intCompScore++;
  847. lblCompScoreNum.Text = intCompScore.ToString();
  848. declareVariable();
  849. }
  850. }
  851. else if (blnClicked1 == true && blnClicked2 == true && blnClicked3 == true && blnClicked4 == true && blnClicked5 == true && blnClicked6 == true && blnClicked7 == true && blnClicked8 == true && blnClicked9 == true && intCounter == 9)
  852. {
  853. MessageBox.Show("It's a Draw", "Winning Messaage");
  854. declareVariable();
  855. }
  856. }
  857. private void btnReset_Click(object sender, EventArgs e)
  858. {
  859. declareVariable();
  860. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement