WOW


SUBMITTED BY: Guest

DATE: Dec. 5, 2013, 9:50 a.m.

FORMAT: JavaScript

SIZE: 21.8 kB

HITS: 865

  1. <body>
  2. <SCRIPT>
  3. /*
  4. Code Written by Cory Fogliani (Email: cory@ijustdontcare.com)
  5. Testers: Cory Fogliani, Chris Gordon
  6. Featured on JavaScript Kit (http://javascriptkit.com)
  7. For this and over 400+ free scripts, visit http://javascriptkit.com
  8. */
  9. //if IE4/NS6, apply style
  10. if (document.all||document.getElementById){
  11. document.write('<style>.tictac{')
  12. document.write('width:50px;height:50px;')
  13. document.write('}</style>')
  14. }
  15. var sqr1
  16. var sqr2
  17. var sqr3
  18. var sqr4
  19. var sqr5
  20. var sqr6
  21. var sqr7
  22. var sqr8
  23. var sqr9
  24. var sqr1T = 0
  25. var sqr2T = 0
  26. var sqr3T = 0
  27. var sqr4T = 0
  28. var sqr5T = 0
  29. var sqr6T = 0
  30. var sqr7T = 0
  31. var sqr8T = 0
  32. var sqr9T = 0
  33. var moveCount = 0
  34. var turn = 0
  35. var mode = 1
  36. function vari()
  37. {
  38. sqr1 = document.tic.sqr1.value
  39. sqr2 = document.tic.sqr2.value
  40. sqr3 = document.tic.sqr3.value
  41. sqr4 = document.tic.sqr4.value
  42. sqr5 = document.tic.sqr5.value
  43. sqr6 = document.tic.sqr6.value
  44. sqr7 = document.tic.sqr7.value
  45. sqr8 = document.tic.sqr8.value
  46. sqr9 = document.tic.sqr9.value
  47. }
  48. function check()
  49. {
  50. if(sqr1 == " X " && sqr2 == " X " && sqr3 == " X ")
  51. {
  52. alert("You Win!")
  53. reset()
  54. }
  55. else if(sqr4 == " X " && sqr5 == " X " && sqr6 == " X ")
  56. {
  57. alert("You Win!")
  58. reset()
  59. }
  60. else if(sqr7 == " X " && sqr8 == " X " && sqr9 == " X ")
  61. {
  62. alert("You Win!")
  63. reset()
  64. }
  65. else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
  66. {
  67. alert("You Win!")
  68. reset()
  69. }
  70. else if(sqr1 == " X " && sqr4 == " X " && sqr7 == " X ")
  71. {
  72. alert("You Win!")
  73. reset()
  74. }
  75. else if(sqr2 == " X " && sqr5 == " X " && sqr8 == " X ")
  76. {
  77. alert("You Win!")
  78. reset()
  79. }
  80. else if(sqr3 == " X " && sqr6 == " X " && sqr9 == " X ")
  81. {
  82. alert("You Win!")
  83. reset()
  84. }
  85. else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
  86. {
  87. alert("You Win!")
  88. reset()
  89. }
  90. else if(sqr3 == " X " && sqr5 == " X " && sqr7 == " X ")
  91. {
  92. alert("You Win!")
  93. reset()
  94. }
  95. else
  96. {
  97. winCheck()
  98. check2()
  99. drawCheck()
  100. }
  101. }
  102. function check2()
  103. {
  104. vari()
  105. drawCheck()
  106. if(sqr1 == " O " && sqr2 == " O " && sqr3 == " O ")
  107. {
  108. alert("You Lose!")
  109. reset()
  110. }
  111. else if(sqr4 == " O " && sqr5 == " O " && sqr6 == " O ")
  112. {
  113. alert("You Lose!")
  114. reset()
  115. }
  116. else if(sqr7 == " O " && sqr8 == " O " && sqr9 == " O ")
  117. {
  118. alert("You Lose!")
  119. reset()
  120. }
  121. else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
  122. {
  123. alert("You Lose!")
  124. reset()
  125. }
  126. else if(sqr1 == " O " && sqr4 == " O " && sqr7 == " O ")
  127. {
  128. alert("You Lose!")
  129. reset()
  130. }
  131. else if(sqr2 == " O " && sqr5 == " O " && sqr8 == " O ")
  132. {
  133. alert("You Lose!")
  134. reset()
  135. }
  136. else if(sqr3 == " O " && sqr6 == " O " && sqr9 == " O ")
  137. {
  138. alert("You Lose!")
  139. reset()
  140. }
  141. else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
  142. {
  143. alert("You Lose!")
  144. reset()
  145. }
  146. else if(sqr3 == " O " && sqr5 == " O " && sqr7 == " O ")
  147. {
  148. alert("You Lose!")
  149. reset()
  150. }
  151. }
  152. function player1Check()
  153. {
  154. if(sqr1 == " X " && sqr2 == " X " && sqr3 == " X ")
  155. {
  156. alert("Player 1 wins!")
  157. reset()
  158. }
  159. else if(sqr4 == " X " && sqr5 == " X " && sqr6 == " X ")
  160. {
  161. alert("Player 1 wins!")
  162. reset()
  163. }
  164. else if(sqr7 == " X " && sqr8 == " X " && sqr9 == " X ")
  165. {
  166. alert("Player 1 wins!")
  167. reset()
  168. }
  169. else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
  170. {
  171. alert("Player 1 wins!")
  172. reset()
  173. }
  174. else if(sqr1 == " X " && sqr4 == " X " && sqr7 == " X ")
  175. {
  176. alert("Player 1 wins!")
  177. reset()
  178. }
  179. else if(sqr2 == " X " && sqr5 == " X " && sqr8 == " X ")
  180. {
  181. alert("Player 1 wins!")
  182. reset()
  183. }
  184. else if(sqr3 == " X " && sqr6 == " X " && sqr9 == " X ")
  185. {
  186. alert("Player 1 wins!")
  187. reset()
  188. }
  189. else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
  190. {
  191. alert("Player 1 wins!")
  192. reset()
  193. }
  194. else if(sqr3 == " X " && sqr5 == " X " && sqr7 == " X ")
  195. {
  196. alert("Player 1 wins!")
  197. reset()
  198. }
  199. else
  200. {
  201. player2Check()
  202. drawCheck()
  203. }
  204. }
  205. function player2Check()
  206. {
  207. vari()
  208. drawCheck()
  209. if(sqr1 == " O " && sqr2 == " O " && sqr3 == " O ")
  210. {
  211. alert("Player 2 wins!")
  212. reset()
  213. }
  214. else if(sqr4 == " O " && sqr5 == " O " && sqr6 == " O ")
  215. {
  216. alert("Player 2 wins!")
  217. reset()
  218. }
  219. else if(sqr7 == " O " && sqr8 == " O " && sqr9 == " O ")
  220. {
  221. alert("Player 2 wins!")
  222. reset()
  223. }
  224. else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
  225. {
  226. alert("Player 2 wins!")
  227. reset()
  228. }
  229. else if(sqr1 == " O " && sqr4 == " O " && sqr7 == " O ")
  230. {
  231. alert("Player 2 wins!")
  232. reset()
  233. }
  234. else if(sqr2 == " O " && sqr5 == " O " && sqr8 == " O ")
  235. {
  236. alert("Player 2 wins!")
  237. reset()
  238. }
  239. else if(sqr3 == " O " && sqr6 == " O " && sqr9 == " O ")
  240. {
  241. alert("Player 2 wins!")
  242. reset()
  243. }
  244. else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
  245. {
  246. alert("Player 2 wins!")
  247. reset()
  248. }
  249. else if(sqr3 == " O " && sqr5 == " O " && sqr7 == " O ")
  250. {
  251. alert("Player 2 wins!")
  252. reset()
  253. }
  254. }
  255. function drawCheck()
  256. {
  257. vari()
  258. moveCount = sqr1T + sqr2T + sqr3T + sqr4T + sqr5T + sqr6T + sqr7T + sqr8T + sqr9T
  259. if(moveCount == 9)
  260. {
  261. reset()
  262. alert("Draw")
  263. }
  264. }
  265. function winCheck()
  266. {
  267. check2()
  268. if(sqr1 == " O " && sqr2 == " O " && sqr3T == 0 && turn == 1)
  269. {
  270. document.tic.sqr3.value = " O "
  271. sqr3T = 1;
  272. turn = 0;
  273. }
  274. else if(sqr2 == " O " && sqr3 == " O " && sqr1T == 0 && turn == 1)
  275. {
  276. document.tic.sqr1.value = " O "
  277. sqr1T = 1;
  278. turn = 0;
  279. }
  280. else if(sqr4 == " O " && sqr5 == " O " && sqr6T == 0 && turn == 1)
  281. {
  282. document.tic.sqr6.value = " O "
  283. sqr6T = 1;
  284. turn = 0;
  285. }
  286. else if(sqr5 == " O " && sqr6 == " O " && sqr4T == 0 && turn == 1)
  287. {
  288. document.tic.sqr4.value = " O "
  289. sqr4T = 1;
  290. turn = 0;
  291. }
  292. else if(sqr7 == " O " && sqr8 == " O " && sqr9T == 0 && turn == 1)
  293. {
  294. document.tic.sqr9.value = " O "
  295. sqr9T = 1;
  296. turn = 0;
  297. }
  298. else if(sqr8 == " O " && sqr9 == " O " && sqr7T == 0 && turn == 1)
  299. {
  300. document.tic.sqr7.value = " O "
  301. sqr7T = 1;
  302. turn = 0;
  303. }
  304. else if(sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1)
  305. {
  306. document.tic.sqr9.value = " O "
  307. sqr9T = 1;
  308. turn = 0;
  309. }
  310. else if(sqr5 == " O " && sqr9 == " O " && sqr1T == 0 && turn == 1)
  311. {
  312. document.tic.sqr1.value = " O "
  313. sqr1T = 1;
  314. turn = 0;
  315. }
  316. else if(sqr3 == " O " && sqr5 == " O " && sqr7T == 0 && turn == 1)
  317. {
  318. document.tic.sqr7.value = " O "
  319. sqr7T = 1;
  320. turn = 0;
  321. }
  322. else if(sqr7 == " O " && sqr5 == " O " && sqr3T == 0 && turn == 1)
  323. {
  324. document.tic.sqr3.value = " O "
  325. sqr3T = 1;
  326. turn = 0;
  327. }
  328. else if(sqr1 == " O " && sqr3 == " O " && sqr2T == 0 && turn == 1)
  329. {
  330. document.tic.sqr2.value = " O "
  331. sqr2T = 1;
  332. turn = 0;
  333. }
  334. else if(sqr4 == " O " && sqr6 == " O " && sqr5T == 0 && turn == 1)
  335. {
  336. document.tic.sqr5.value = " O "
  337. sqr5T = 1;
  338. turn = 0;
  339. }
  340. else if(sqr7 == " O " && sqr9 == " O " && sqr8T == 0 && turn == 1)
  341. {
  342. document.tic.sqr8.value = " O "
  343. sqr8T = 1;
  344. turn = 0;
  345. }
  346. else if(sqr1 == " O " && sqr7 == " O " && sqr4T == 0 && turn == 1)
  347. {
  348. document.tic.sqr4.value = " O "
  349. sqr4T = 1;
  350. turn = 0;
  351. }
  352. else if(sqr2 == " O " && sqr8 == " O " && sqr5T == 0 && turn == 1)
  353. {
  354. document.tic.sqr5.value = " O "
  355. sqr5T = 1;
  356. turn = 0;
  357. }
  358. else if(sqr3 == " O " && sqr9 == " O " && sqr6T == 0 && turn == 1)
  359. {
  360. document.tic.sqr6.value = " O "
  361. sqr6T = 1;
  362. turn = 0;
  363. }
  364. else if(sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1)
  365. {
  366. document.tic.sqr9.value = " O "
  367. sqr9T = 1;
  368. turn = 0;
  369. }
  370. else if(sqr4 == " O " && sqr7 == " O " && sqr1T == 0 && turn == 1)
  371. {
  372. document.tic.sqr1.value = " O "
  373. sqr1T = 1;
  374. turn = 0;
  375. }
  376. else if(sqr5 == " O " && sqr8 == " O " && sqr2T == 0 && turn == 1)
  377. {
  378. document.tic.sqr2.value = " O "
  379. sqr2T = 1;
  380. turn = 0;
  381. }
  382. else if(sqr6 == " O " && sqr9 == " O " && sqr3T == 0 && turn == 1)
  383. {
  384. document.tic.sqr3.value = " O "
  385. sqr3T = 1;
  386. turn = 0;
  387. }
  388. else if(sqr1 == " O " && sqr4 == " O " && sqr7T == 0 && turn == 1)
  389. {
  390. document.tic.sqr7.value = " O "
  391. sqr7T = 1;
  392. turn = 0;
  393. }
  394. else if(sqr2 == " O " && sqr5 == " O " && sqr8T == 0 && turn == 1)
  395. {
  396. document.tic.sqr8.value = " O "
  397. sqr8T = 1;
  398. turn = 0;
  399. }
  400. else if(sqr3 == " O " && sqr6 == " O " && sqr9T == 0 && turn == 1)
  401. {
  402. document.tic.sqr9.value = " O "
  403. sqr9T = 1;
  404. turn = 0;
  405. }
  406. else if(sqr1 == " O " && sqr9 == " O " && sqr5T == 0 && turn == 1)
  407. {
  408. document.tic.sqr5.value = " O "
  409. sqr5T = 1;
  410. turn = 0;
  411. }
  412. else if(sqr3 == " O " && sqr7 == " O " && sqr5T == 0 && turn == 1)
  413. {
  414. document.tic.sqr5.value = " O "
  415. sqr5T = 1;
  416. turn = 0;
  417. }
  418. else
  419. {
  420. computer()
  421. }
  422. check2()
  423. }
  424. function computer()
  425. {
  426. check2()
  427. if(sqr1 == " X " && sqr2 == " X " && sqr3T == 0 && turn == 1)
  428. {
  429. document.tic.sqr3.value = " O "
  430. sqr3T = 1;
  431. turn = 0;
  432. }
  433. else if(sqr2 == " X " && sqr3 == " X " && sqr1T == 0 && turn == 1)
  434. {
  435. document.tic.sqr1.value = " O "
  436. sqr1T = 1;
  437. turn = 0;
  438. }
  439. else if(sqr4 == " X " && sqr5 == " X " && sqr6T == 0 && turn == 1)
  440. {
  441. document.tic.sqr6.value = " O "
  442. sqr6T = 1;
  443. turn = 0;
  444. }
  445. else if(sqr5 == " X " && sqr6 == " X " && sqr4T == 0 && turn == 1)
  446. {
  447. document.tic.sqr4.value = " O "
  448. sqr4T = 1;
  449. turn = 0;
  450. }
  451. else if(sqr7 == " X " && sqr8 == " X " && sqr9T == 0 && turn == 1)
  452. {
  453. document.tic.sqr9.value = " O "
  454. sqr9T = 1;
  455. turn = 0;
  456. }
  457. else if(sqr8 == " X " && sqr9 == " X " && sqr7T == 0 && turn == 1)
  458. {
  459. document.tic.sqr7.value = " O "
  460. sqr7T = 1;
  461. turn = 0;
  462. }
  463. else if(sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1)
  464. {
  465. document.tic.sqr9.value = " O "
  466. sqr9T = 1;
  467. turn = 0;
  468. }
  469. else if(sqr5 == " X " && sqr9 == " X " && sqr1T == 0 && turn == 1)
  470. {
  471. document.tic.sqr1.value = " O "
  472. sqr1T = 1;
  473. turn = 0;
  474. }
  475. else if(sqr3 == " X " && sqr5 == " X " && sqr7T == 0 && turn == 1)
  476. {
  477. document.tic.sqr7.value = " O "
  478. sqr7T = 1;
  479. turn = 0;
  480. }
  481. else if(sqr7 == " X " && sqr5 == " X " && sqr3T == 0 && turn == 1)
  482. {
  483. document.tic.sqr3.value = " O "
  484. sqr3T = 1;
  485. turn = 0;
  486. }
  487. else if(sqr1 == " X " && sqr3 == " X " && sqr2T == 0 && turn == 1)
  488. {
  489. document.tic.sqr2.value = " O "
  490. sqr2T = 1;
  491. turn = 0;
  492. }
  493. else if(sqr4 == " X " && sqr6 == " X " && sqr5T == 0 && turn == 1)
  494. {
  495. document.tic.sqr5.value = " O "
  496. sqr5T = 1;
  497. turn = 0;
  498. }
  499. else if(sqr7 == " X " && sqr9 == " X " && sqr8T == 0 && turn == 1)
  500. {
  501. document.tic.sqr8.value = " O "
  502. sqr8T = 1;
  503. turn = 0;
  504. }
  505. else if(sqr1 == " X " && sqr7 == " X " && sqr4T == 0 && turn == 1)
  506. {
  507. document.tic.sqr4.value = " O "
  508. sqr4T = 1;
  509. turn = 0;
  510. }
  511. else if(sqr2 == " X " && sqr8 == " X " && sqr5T == 0 && turn == 1)
  512. {
  513. document.tic.sqr5.value = " O "
  514. sqr5T = 1;
  515. turn = 0;
  516. }
  517. else if(sqr3 == " X " && sqr9 == " X " && sqr6T == 0 && turn == 1)
  518. {
  519. document.tic.sqr6.value = " O "
  520. sqr6T = 1;
  521. turn = 0;
  522. }
  523. else if(sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1)
  524. {
  525. document.tic.sqr9.value = " O "
  526. sqr9T = 1;
  527. turn = 0;
  528. }
  529. else if(sqr4 == " X " && sqr7 == " X " && sqr1T == 0 && turn == 1)
  530. {
  531. document.tic.sqr1.value = " O "
  532. sqr1T = 1;
  533. turn = 0;
  534. }
  535. else if(sqr5 == " X " && sqr8 == " X " && sqr2T == 0 && turn == 1)
  536. {
  537. document.tic.sqr2.value = " O "
  538. sqr2T = 1;
  539. turn = 0;
  540. }
  541. else if(sqr6 == " X " && sqr9 == " X " && sqr3T == 0 && turn == 1)
  542. {
  543. document.tic.sqr3.value = " O "
  544. sqr3T = 1;
  545. turn = 0;
  546. }
  547. else if(sqr1 == " X " && sqr4 == " X " && sqr7T == 0 && turn == 1)
  548. {
  549. document.tic.sqr7.value = " O "
  550. sqr7T = 1;
  551. turn = 0;
  552. }
  553. else if(sqr2 == " X " && sqr5 == " X " && sqr8T == 0 && turn == 1)
  554. {
  555. document.tic.sqr8.value = " O "
  556. sqr8T = 1;
  557. turn = 0;
  558. }
  559. else if(sqr3 == " X " && sqr6 == " X " && sqr9T == 0 && turn == 1)
  560. {
  561. document.tic.sqr9.value = " O "
  562. sqr9T = 1;
  563. turn = 0;
  564. }
  565. else if(sqr1 == " X " && sqr9 == " X " && sqr5T == 0 && turn == 1)
  566. {
  567. document.tic.sqr5.value = " O "
  568. sqr5T = 1;
  569. turn = 0;
  570. }
  571. else if(sqr3 == " X " && sqr7 == " X " && sqr5T == 0 && turn == 1)
  572. {
  573. document.tic.sqr5.value = " O "
  574. sqr5T = 1;
  575. turn = 0;
  576. }
  577. else
  578. {
  579. AI()
  580. }
  581. check2()
  582. }
  583. function AI()
  584. {
  585. vari()
  586. if(document.tic.sqr5.value == " " && turn == 1)
  587. {
  588. document.tic.sqr5.value = " O "
  589. turn = 0
  590. sqr5T = 1
  591. }
  592. else if(document.tic.sqr1.value == " " && turn == 1)
  593. {
  594. document.tic.sqr1.value = " O "
  595. turn = 0
  596. sqr1T = 1
  597. }
  598. else if(document.tic.sqr9.value == " " && turn == 1)
  599. {
  600. document.tic.sqr9.value = " O "
  601. turn = 0
  602. sqr9T = 1
  603. }
  604. else if(document.tic.sqr6.value == " " && turn == 1)
  605. {
  606. document.tic.sqr6.value = " O "
  607. turn = 0
  608. sqr6T = 1
  609. }
  610. else if(document.tic.sqr2.value == " " && turn == 1)
  611. {
  612. document.tic.sqr2.value = " O "
  613. turn = 0
  614. sqr2T = 1
  615. }
  616. else if(document.tic.sqr8.value == " " && turn == 1)
  617. {
  618. document.tic.sqr8.value = " O "
  619. turn = 0
  620. sqr8T = 1
  621. }
  622. else if(document.tic.sqr3.value == " " && turn == 1)
  623. {
  624. document.tic.sqr3.value = " O "
  625. turn = 0
  626. sqr3T = 1
  627. }
  628. else if(document.tic.sqr7.value == " " && turn == 1)
  629. {
  630. document.tic.sqr7.value = " O "
  631. turn = 0
  632. sqr7T = 1
  633. }
  634. else if(document.tic.sqr4.value == " " && turn == 1)
  635. {
  636. document.tic.sqr4.value = " O "
  637. turn = 0
  638. sqr4T = 1
  639. }
  640. check2()
  641. }
  642. function reset()
  643. {
  644. document.tic.sqr1.value = " "
  645. document.tic.sqr2.value = " "
  646. document.tic.sqr3.value = " "
  647. document.tic.sqr4.value = " "
  648. document.tic.sqr5.value = " "
  649. document.tic.sqr6.value = " "
  650. document.tic.sqr7.value = " "
  651. document.tic.sqr8.value = " "
  652. document.tic.sqr9.value = " "
  653. sqr1T = 0
  654. sqr2T = 0
  655. sqr3T = 0
  656. sqr4T = 0
  657. sqr5T = 0
  658. sqr6T = 0
  659. sqr7T = 0
  660. sqr8T = 0
  661. sqr9T = 0
  662. vari()
  663. turn = 0
  664. moveCount = 0
  665. }
  666. function resetter()
  667. {
  668. reset()
  669. }
  670. </SCRIPT>
  671. <FORM NAME="tic">
  672. <INPUT TYPE="button" NAME="sqr1" class="tictac" value=" " onClick="if(document.tic.sqr1.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 1; vari(); check();} else if(document.tic.sqr1.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr1.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr1.value = ' O '; sqr1T = 1; turn = 1; vari(); player1Check()} drawCheck()">
  673. <INPUT TYPE="button" NAME="sqr2" class="tictac" value=" " onClick="if(document.tic.sqr2.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 1; vari(); check();} else if(document.tic.sqr2.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr2.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr2.value = ' O '; sqr2T = 1; turn = 1; vari(); player1Check()} drawCheck()">
  674. <INPUT TYPE="button" NAME="sqr3" class="tictac" value=" " onClick="if(document.tic.sqr3.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 1; vari(); check();} else if(document.tic.sqr3.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr3.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr3.value = ' O '; sqr3T = 1; turn = 1; vari(); player1Check()} drawCheck()"><br />
  675. <INPUT TYPE="button" NAME="sqr4" class="tictac" value=" " onClick="if(document.tic.sqr4.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 1; vari(); check();} else if(document.tic.sqr4.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr4.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr4.value = ' O '; sqr4T = 1; turn = 1; vari(); player1Check()} drawCheck()">
  676. <INPUT TYPE="button" NAME="sqr5" class="tictac" value=" " onClick="if(document.tic.sqr5.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 1; vari(); check();} else if(document.tic.sqr5.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr5.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr5.value = ' O '; sqr5T = 1; turn = 1; vari(); player1Check()} drawCheck()">
  677. <INPUT TYPE="button" NAME="sqr6" class="tictac" value=" " onClick="if(document.tic.sqr6.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 1; vari(); check();} else if(document.tic.sqr6.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr6.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr6.value = ' O '; sqr6T = 1; turn = 1; vari(); player1Check()} drawCheck()"><br />
  678. <INPUT TYPE="button" NAME="sqr7" class="tictac" value=" " onClick="if(document.tic.sqr7.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 1; vari(); check();} else if(document.tic.sqr7.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr7.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr7.value = ' O '; sqr7T = 1; turn = 1; vari(); player1Check()} drawCheck()">
  679. <INPUT TYPE="button" NAME="sqr8" class="tictac" value=" " onClick="if(document.tic.sqr8.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 1; vari(); check();} else if(document.tic.sqr8.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr8.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr8.value = ' O '; sqr8T = 1; turn = 1; vari(); player1Check()} drawCheck()">
  680. <INPUT TYPE="button" NAME="sqr9" class="tictac" value=" " onClick="if(document.tic.sqr9.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 1; vari(); check();} else if(document.tic.sqr9.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr9.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr9.value = ' O '; sqr9T = 1; turn = 1; vari(); player1Check()} drawCheck()">
  681. </form>
  682. </body>

comments powered by Disqus