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