├── .travis.yml ├── docs ├── element-list ├── resources │ ├── x.png │ └── glass.png ├── type-search-index.zip ├── member-search-index.zip ├── package-search-index.zip ├── jquery │ ├── images │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ ├── jszip-utils │ │ └── dist │ │ │ ├── jszip-utils-ie.min.js │ │ │ ├── jszip-utils.min.js │ │ │ ├── jszip-utils-ie.js │ │ │ └── jszip-utils.js │ ├── jquery-ui.structure.min.css │ └── jquery-ui.structure.css ├── package-search-index.js ├── type-search-index.js ├── overview-summary.html ├── allclasses.html ├── member-search-index.js ├── deprecated-list.html ├── script.js ├── com │ └── abhyudayasharma │ │ ├── package-use.html │ │ ├── class-use │ │ └── AppTest.html │ │ ├── tictactoe │ │ ├── class-use │ │ │ ├── Game.html │ │ │ ├── Main.html │ │ │ └── MagicSquare.html │ │ ├── package-tree.html │ │ ├── package-use.html │ │ └── package-summary.html │ │ ├── package-tree.html │ │ └── package-summary.html ├── index.html ├── allpackages-index.html ├── constant-values.html ├── index-files │ ├── index-15.html │ ├── index-10.html │ ├── index-13.html │ ├── index-8.html │ ├── index-2.html │ ├── index-14.html │ ├── index-12.html │ ├── index-1.html │ ├── index-4.html │ ├── index-11.html │ └── index-7.html ├── overview-tree.html └── allclasses-index.html ├── README.md ├── src ├── main │ └── java │ │ └── com │ │ └── abhyudayasharma │ │ └── tictactoe │ │ ├── PlayerType.java │ │ ├── Main.java │ │ └── MagicSquare.java └── test │ └── java │ └── com │ └── abhyudayasharma │ └── AppTest.java ├── .editorconfig ├── .gitignore └── pom.xml /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: openjdk11 3 | -------------------------------------------------------------------------------- /docs/element-list: -------------------------------------------------------------------------------- 1 | com.abhyudayasharma 2 | com.abhyudayasharma.tictactoe 3 | -------------------------------------------------------------------------------- /docs/resources/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/resources/x.png -------------------------------------------------------------------------------- /docs/resources/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/resources/glass.png -------------------------------------------------------------------------------- /docs/type-search-index.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/type-search-index.zip -------------------------------------------------------------------------------- /docs/member-search-index.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/member-search-index.zip -------------------------------------------------------------------------------- /docs/package-search-index.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/package-search-index.zip -------------------------------------------------------------------------------- /docs/jquery/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /docs/jquery/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /docs/package-search-index.js: -------------------------------------------------------------------------------- 1 | packageSearchIndex = [{"l":"All Packages","url":"allpackages-index.html"},{"l":"com.abhyudayasharma"},{"l":"com.abhyudayasharma.tictactoe"}] -------------------------------------------------------------------------------- /docs/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbhyudayaSharma/tic-tac-toe/HEAD/docs/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tic-tac-toe 2 | 3 | [![Build Status](https://travis-ci.com/AbhyudayaSharma/tic-tac-toe.svg?token=9CKSXzfHBrpFZM5Um8kH&branch=master)](https://travis-ci.com/AbhyudayaSharma/tic-tac-toe) 4 | 5 | To get started: 6 | 7 | ```bash 8 | mvn install 9 | ``` 10 | -------------------------------------------------------------------------------- /src/main/java/com/abhyudayasharma/tictactoe/PlayerType.java: -------------------------------------------------------------------------------- 1 | package com.abhyudayasharma.tictactoe; 2 | 3 | /** 4 | * Utility enum for checking the current player. 5 | * 6 | * @author Abhyudaya Sharma 7 | */ 8 | public enum PlayerType { 9 | HUMAN, 10 | COMPUTER 11 | } 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | indent_style = space 6 | indent_size = 4 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | max_line_length = 120 10 | insert_final_newline = true 11 | tab_width = 4 12 | 13 | [*.{yml, yaml}] 14 | indent_size = 2 15 | tab_width = 2 16 | -------------------------------------------------------------------------------- /docs/type-search-index.js: -------------------------------------------------------------------------------- 1 | typeSearchIndex = [{"l":"All Classes","url":"allclasses-index.html"},{"p":"com.abhyudayasharma","l":"AppTest"},{"p":"com.abhyudayasharma.tictactoe","l":"Game"},{"p":"com.abhyudayasharma.tictactoe","l":"MagicSquare"},{"p":"com.abhyudayasharma.tictactoe","l":"Main"},{"p":"com.abhyudayasharma.tictactoe","l":"PlayerType"}] -------------------------------------------------------------------------------- /src/test/java/com/abhyudayasharma/AppTest.java: -------------------------------------------------------------------------------- 1 | package com.abhyudayasharma; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.junit.jupiter.api.Assertions.assertTrue; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | class AppTest { 11 | /** 12 | * Rigorous Test :-) 13 | */ 14 | @Test 15 | void shouldAnswerWithTrue() { 16 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/abhyudayasharma/tictactoe/Main.java: -------------------------------------------------------------------------------- 1 | package com.abhyudayasharma.tictactoe; 2 | 3 | /** 4 | * Execution starts here. 5 | * 6 | * @author Abhyudaya Sharma 7 | */ 8 | public class Main { 9 | /** 10 | * The 'main' method for the game. 11 | * 12 | * @param args the command line arguments. 13 | */ 14 | public static void main(String[] args) { 15 | new Game().start(); 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 2 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 3 | 4 | # User-specific stuff 5 | .idea/ 6 | *.iml 7 | 8 | # CMake 9 | cmake-build-*/ 10 | 11 | # File-based project format 12 | *.iws 13 | 14 | # IntelliJ 15 | out/ 16 | target/ 17 | 18 | # mpeltonen/sbt-idea plugin 19 | .idea_modules/ 20 | 21 | # JIRA plugin 22 | atlassian-ide-plugin.xml 23 | 24 | # Crashlytics plugin (for Android Studio and IntelliJ) 25 | com_crashlytics_export_strings.xml 26 | crashlytics.properties 27 | crashlytics-build.properties 28 | fabric.properties 29 | 30 | -------------------------------------------------------------------------------- /docs/overview-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Generated Documentation (Untitled) 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 |
17 | 20 |

index.html

21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/jquery/jszip-utils/dist/jszip-utils-ie.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | JSZipUtils - A collection of cross-browser utilities to go along with JSZip. 4 | 5 | 6 | (c) 2014 Stuart Knightley, David Duponchel 7 | Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. 8 | 9 | */ 10 | !function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g\r\n";document.write(b),a.JSZipUtils._getBinaryFromXHR=function(a){for(var b=a.responseBody,c={},d=0;256>d;d++)for(var e=0;256>e;e++)c[String.fromCharCode(d+(e<<8))]=String.fromCharCode(d)+String.fromCharCode(e);var f=IEBinaryToArray_ByteStr(b),g=IEBinaryToArray_ByteStr_Last(b);return f.replace(/[\s\S]/g,function(a){return c[a]})+g}},{}]},{},[1]); 11 | -------------------------------------------------------------------------------- /docs/jquery/jquery-ui.structure.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.11.4 - 2015-05-20 2 | * http://jqueryui.com 3 | * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ 4 | 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} 6 | -------------------------------------------------------------------------------- /docs/jquery/jszip-utils/dist/jszip-utils.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | JSZipUtils - A collection of cross-browser utilities to go along with JSZip. 4 | 5 | 6 | (c) 2014 Stuart Knightley, David Duponchel 7 | Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. 8 | 9 | */ 10 | !function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZipUtils=a():"undefined"!=typeof global?global.JSZipUtils=a():"undefined"!=typeof self&&(self.JSZipUtils=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 |

All Classes

23 |
24 | 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/jquery/jszip-utils/dist/jszip-utils-ie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | JSZipUtils - A collection of cross-browser utilities to go along with JSZip. 4 | 5 | 6 | (c) 2014 Stuart Knightley, David Duponchel 7 | Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. 8 | 9 | */ 10 | ;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o\r\n"+ 18 | "\r\n"; 32 | 33 | // inject VBScript 34 | document.write(IEBinaryToArray_ByteStr_Script); 35 | 36 | global.JSZipUtils._getBinaryFromXHR = function (xhr) { 37 | var binary = xhr.responseBody; 38 | var byteMapping = {}; 39 | for ( var i = 0; i < 256; i++ ) { 40 | for ( var j = 0; j < 256; j++ ) { 41 | byteMapping[ String.fromCharCode( i + (j << 8) ) ] = 42 | String.fromCharCode(i) + String.fromCharCode(j); 43 | } 44 | } 45 | var rawBytes = IEBinaryToArray_ByteStr(binary); 46 | var lastChr = IEBinaryToArray_ByteStr_Last(binary); 47 | return rawBytes.replace(/[\s\S]/g, function( match ) { 48 | return byteMapping[match]; 49 | }) + lastChr; 50 | }; 51 | 52 | // enforcing Stuk's coding style 53 | // vim: set shiftwidth=4 softtabstop=4: 54 | 55 | },{}]},{},[1]) 56 | ; 57 | -------------------------------------------------------------------------------- /src/main/java/com/abhyudayasharma/tictactoe/MagicSquare.java: -------------------------------------------------------------------------------- 1 | package com.abhyudayasharma.tictactoe; 2 | 3 | /** 4 | * Generates a magic square of odd size. 5 | * 6 | * @author Kabir Kanha Arora 7 | */ 8 | class MagicSquare { 9 | private int mainCnt = 0; 10 | private int[][] matrix; 11 | private static int expectedSum; 12 | 13 | /** 14 | * Private constructor for the Magic square. 15 | * 16 | * @param n the size of the magic square to be generated. 17 | */ 18 | private MagicSquare(int n) { 19 | int max = n * n; 20 | expectedSum = (int) (n * (Math.pow(n, 2) + 1)) / 2; 21 | matrix = new int[n][n]; 22 | matrix[0][(n - 1) / 2] = ++mainCnt; 23 | placeNextOdd(0, (n - 1) / 2, matrix, n, max); 24 | } 25 | 26 | /** 27 | * Returns the expected sum of every diagonal, row and column of the Magic Square. 28 | * 29 | * @return the expected sum of every diagonal, row and column of the Magic Square. 30 | */ 31 | static int getExpectedSum() { 32 | return expectedSum; 33 | } 34 | 35 | /** 36 | * Calculates and returns a new magic square object. The objects produced by this methods 37 | * are isomorphic to one another but are not eht same objects. 38 | * 39 | * @param n the size of the magic square to be generated. Even values do not produce expected results. 40 | * @return a new magic square 41 | */ 42 | @SuppressWarnings("SameParameterValue") // tic tac toe uses a 3x3 magic square only 43 | static int[][] getMagicSquare(int n) { 44 | return new MagicSquare(n).matrix; 45 | } 46 | 47 | /** 48 | * Recursive method for placing digits in the magic square. 49 | * 50 | * @param r the row index 51 | * @param c the column index 52 | * @param matrix matrix that will eventually become a magic square 53 | * @param n the size of the magic square to be constructed 54 | * @param max the maximum possible value in the magic square. 55 | */ 56 | private void placeNextOdd(int r, int c, int[][] matrix, int n, int max) { 57 | if (mainCnt == max) { 58 | return; 59 | } 60 | 61 | int temp_r, temp_c; 62 | 63 | if (r - 1 < 0) { 64 | temp_r = n - 1; 65 | } else { 66 | temp_r = r - 1; 67 | } 68 | 69 | if (c + 1 >= n) { 70 | temp_c = 0; 71 | } else { 72 | temp_c = c + 1; 73 | } 74 | 75 | if (matrix[temp_r][temp_c] == 0) { 76 | matrix[temp_r][temp_c] = ++mainCnt; 77 | placeNextOdd(temp_r, temp_c, matrix, n, max); 78 | } else { 79 | if (r + 1 >= n) { 80 | r = 0; 81 | } else { 82 | ++r; 83 | } 84 | matrix[r][c] = ++mainCnt; 85 | placeNextOdd(r, c, matrix, n, max); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /docs/jquery/jquery-ui.structure.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | 12 | /* Layout helpers 13 | ----------------------------------*/ 14 | .ui-helper-hidden { 15 | display: none; 16 | } 17 | .ui-helper-hidden-accessible { 18 | border: 0; 19 | clip: rect(0 0 0 0); 20 | height: 1px; 21 | margin: -1px; 22 | overflow: hidden; 23 | padding: 0; 24 | position: absolute; 25 | width: 1px; 26 | } 27 | .ui-helper-reset { 28 | margin: 0; 29 | padding: 0; 30 | border: 0; 31 | outline: 0; 32 | line-height: 1.3; 33 | text-decoration: none; 34 | font-size: 100%; 35 | list-style: none; 36 | } 37 | .ui-helper-clearfix:before, 38 | .ui-helper-clearfix:after { 39 | content: ""; 40 | display: table; 41 | border-collapse: collapse; 42 | } 43 | .ui-helper-clearfix:after { 44 | clear: both; 45 | } 46 | .ui-helper-clearfix { 47 | min-height: 0; /* support: IE7 */ 48 | } 49 | .ui-helper-zfix { 50 | width: 100%; 51 | height: 100%; 52 | top: 0; 53 | left: 0; 54 | position: absolute; 55 | opacity: 0; 56 | filter:Alpha(Opacity=0); /* support: IE8 */ 57 | } 58 | 59 | .ui-front { 60 | z-index: 100; 61 | } 62 | 63 | 64 | /* Interaction Cues 65 | ----------------------------------*/ 66 | .ui-state-disabled { 67 | cursor: default !important; 68 | } 69 | 70 | 71 | /* Icons 72 | ----------------------------------*/ 73 | 74 | /* states and images */ 75 | .ui-icon { 76 | display: block; 77 | text-indent: -99999px; 78 | overflow: hidden; 79 | background-repeat: no-repeat; 80 | } 81 | 82 | 83 | /* Misc visuals 84 | ----------------------------------*/ 85 | 86 | /* Overlays */ 87 | .ui-widget-overlay { 88 | position: fixed; 89 | top: 0; 90 | left: 0; 91 | width: 100%; 92 | height: 100%; 93 | } 94 | .ui-autocomplete { 95 | position: absolute; 96 | top: 0; 97 | left: 0; 98 | cursor: default; 99 | } 100 | .ui-menu { 101 | list-style: none; 102 | padding: 0; 103 | margin: 0; 104 | display: block; 105 | outline: none; 106 | } 107 | .ui-menu .ui-menu { 108 | position: absolute; 109 | } 110 | .ui-menu .ui-menu-item { 111 | position: relative; 112 | margin: 0; 113 | padding: 3px 1em 3px .4em; 114 | cursor: pointer; 115 | min-height: 0; /* support: IE7 */ 116 | /* support: IE10, see #8844 */ 117 | list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); 118 | } 119 | .ui-menu .ui-menu-divider { 120 | margin: 5px 0; 121 | height: 0; 122 | font-size: 0; 123 | line-height: 0; 124 | border-width: 1px 0 0 0; 125 | } 126 | .ui-menu .ui-state-focus, 127 | .ui-menu .ui-state-active { 128 | margin: -1px; 129 | } 130 | 131 | /* icon support */ 132 | .ui-menu-icons { 133 | position: relative; 134 | } 135 | .ui-menu-icons .ui-menu-item { 136 | padding-left: 2em; 137 | } 138 | 139 | /* left-aligned */ 140 | .ui-menu .ui-icon { 141 | position: absolute; 142 | top: 0; 143 | bottom: 0; 144 | left: .2em; 145 | margin: auto 0; 146 | } 147 | 148 | /* right-aligned */ 149 | .ui-menu .ui-menu-icon { 150 | left: auto; 151 | right: 0; 152 | } 153 | -------------------------------------------------------------------------------- /docs/member-search-index.js: -------------------------------------------------------------------------------- 1 | memberSearchIndex = [{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"addOnClickListener(JButton, int, int)","url":"addOnClickListener(javax.swing.JButton,int,int)"},{"p":"com.abhyudayasharma","c":"AppTest","l":"AppTest()","url":"%3Cinit%3E()"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"boxes"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"buttons"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"compChar"},{"p":"com.abhyudayasharma.tictactoe","c":"PlayerType","l":"COMPUTER"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"computerMove()"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"computerMoves"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"computerMovesList"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"computerWins"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"correctCorner(List)","url":"correctCorner(java.util.List)"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"currentPlayer"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"elementCounter(List, int[])","url":"elementCounter(java.util.List,int[])"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"emptyCorner()"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"emptySide()"},{"p":"com.abhyudayasharma.tictactoe","c":"MagicSquare","l":"expectedSum"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"fillFirstFound(int[], int[])","url":"fillFirstFound(int[],int[])"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"fillOppositeCorner(int)"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"findAndDisable(int)"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"findStartPlayer()"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"flag"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"Game()","url":"%3Cinit%3E()"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"gameFrame"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"gameOver(String)","url":"gameOver(java.lang.String)"},{"p":"com.abhyudayasharma.tictactoe","c":"MagicSquare","l":"getExpectedSum()"},{"p":"com.abhyudayasharma.tictactoe","c":"MagicSquare","l":"getMagicSquare(int)"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"getNextPlayer()"},{"p":"com.abhyudayasharma.tictactoe","c":"PlayerType","l":"HUMAN"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"humanMoves"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"humanMovesList"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"humanWin(List)","url":"humanWin(java.util.List)"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"humanWins"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"leader"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"magicSquare"},{"p":"com.abhyudayasharma.tictactoe","c":"MagicSquare","l":"MagicSquare(int)","url":"%3Cinit%3E(int)"},{"p":"com.abhyudayasharma.tictactoe","c":"Main","l":"Main()","url":"%3Cinit%3E()"},{"p":"com.abhyudayasharma.tictactoe","c":"Main","l":"main(String[])","url":"main(java.lang.String[])"},{"p":"com.abhyudayasharma.tictactoe","c":"MagicSquare","l":"mainCnt"},{"p":"com.abhyudayasharma.tictactoe","c":"MagicSquare","l":"matrix"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"oppositeCorner()"},{"p":"com.abhyudayasharma.tictactoe","c":"MagicSquare","l":"placeNextOdd(int, int, int[][], int, int)","url":"placeNextOdd(int,int,int[][],int,int)"},{"p":"com.abhyudayasharma.tictactoe","c":"PlayerType","l":"PlayerType()","url":"%3Cinit%3E()"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"possWin(List, List)","url":"possWin(java.util.List,java.util.List)"},{"p":"com.abhyudayasharma","c":"AppTest","l":"shouldAnswerWithTrue()"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"size"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"start()"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"userChar"},{"p":"com.abhyudayasharma.tictactoe","c":"PlayerType","l":"valueOf(String)","url":"valueOf(java.lang.String)"},{"p":"com.abhyudayasharma.tictactoe","c":"PlayerType","l":"values()"},{"p":"com.abhyudayasharma.tictactoe","c":"Game","l":"winningSum"}] -------------------------------------------------------------------------------- /docs/jquery/jszip-utils/dist/jszip-utils.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | JSZipUtils - A collection of cross-browser utilities to go along with JSZip. 4 | 5 | 6 | (c) 2014 Stuart Knightley, David Duponchel 7 | Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. 8 | 9 | */ 10 | !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.JSZipUtils=e():"undefined"!=typeof global?global.JSZipUtils=e():"undefined"!=typeof self&&(self.JSZipUtils=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 2 | 3 | 4 | 5 | 6 | Deprecated List 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Deprecated API

99 |

Contents

100 |
101 |
102 |
103 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /docs/script.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. 3 | * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 4 | * 5 | * 6 | * 7 | * 8 | * 9 | * 10 | * 11 | * 12 | * 13 | * 14 | * 15 | * 16 | * 17 | * 18 | * 19 | * 20 | * 21 | * 22 | * 23 | * 24 | */ 25 | 26 | var moduleSearchIndex; 27 | var packageSearchIndex; 28 | var typeSearchIndex; 29 | var memberSearchIndex; 30 | var tagSearchIndex; 31 | function loadScripts(doc, tag) { 32 | createElem(doc, tag, 'jquery/jszip/dist/jszip.js'); 33 | createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils.js'); 34 | if (window.navigator.userAgent.indexOf('MSIE ') > 0 || window.navigator.userAgent.indexOf('Trident/') > 0 || 35 | window.navigator.userAgent.indexOf('Edge/') > 0) { 36 | createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils-ie.js'); 37 | } 38 | createElem(doc, tag, 'search.js'); 39 | 40 | $.get(pathtoroot + "module-search-index.zip") 41 | .done(function() { 42 | JSZipUtils.getBinaryContent(pathtoroot + "module-search-index.zip", function(e, data) { 43 | var zip = new JSZip(data); 44 | zip.load(data); 45 | moduleSearchIndex = JSON.parse(zip.file("module-search-index.json").asText()); 46 | }); 47 | }); 48 | $.get(pathtoroot + "package-search-index.zip") 49 | .done(function() { 50 | JSZipUtils.getBinaryContent(pathtoroot + "package-search-index.zip", function(e, data) { 51 | var zip = new JSZip(data); 52 | zip.load(data); 53 | packageSearchIndex = JSON.parse(zip.file("package-search-index.json").asText()); 54 | }); 55 | }); 56 | $.get(pathtoroot + "type-search-index.zip") 57 | .done(function() { 58 | JSZipUtils.getBinaryContent(pathtoroot + "type-search-index.zip", function(e, data) { 59 | var zip = new JSZip(data); 60 | zip.load(data); 61 | typeSearchIndex = JSON.parse(zip.file("type-search-index.json").asText()); 62 | }); 63 | }); 64 | $.get(pathtoroot + "member-search-index.zip") 65 | .done(function() { 66 | JSZipUtils.getBinaryContent(pathtoroot + "member-search-index.zip", function(e, data) { 67 | var zip = new JSZip(data); 68 | zip.load(data); 69 | memberSearchIndex = JSON.parse(zip.file("member-search-index.json").asText()); 70 | }); 71 | }); 72 | $.get(pathtoroot + "tag-search-index.zip") 73 | .done(function() { 74 | JSZipUtils.getBinaryContent(pathtoroot + "tag-search-index.zip", function(e, data) { 75 | var zip = new JSZip(data); 76 | zip.load(data); 77 | tagSearchIndex = JSON.parse(zip.file("tag-search-index.json").asText()); 78 | }); 79 | }); 80 | if (!moduleSearchIndex) { 81 | createElem(doc, tag, 'module-search-index.js'); 82 | } 83 | if (!packageSearchIndex) { 84 | createElem(doc, tag, 'package-search-index.js'); 85 | } 86 | if (!typeSearchIndex) { 87 | createElem(doc, tag, 'type-search-index.js'); 88 | } 89 | if (!memberSearchIndex) { 90 | createElem(doc, tag, 'member-search-index.js'); 91 | } 92 | if (!tagSearchIndex) { 93 | createElem(doc, tag, 'tag-search-index.js'); 94 | } 95 | $(window).resize(function() { 96 | $('.navPadding').css('padding-top', $('.fixedNav').css("height")); 97 | }); 98 | } 99 | 100 | function createElem(doc, tag, path) { 101 | var script = doc.createElement(tag); 102 | var scriptElement = doc.getElementsByTagName(tag)[0]; 103 | script.src = pathtoroot + path; 104 | scriptElement.parentNode.insertBefore(script, scriptElement); 105 | } 106 | 107 | function show(type) { 108 | count = 0; 109 | for (var key in data) { 110 | var row = document.getElementById(key); 111 | if ((data[key] & type) !== 0) { 112 | row.style.display = ''; 113 | row.className = (count++ % 2) ? rowColor : altColor; 114 | } 115 | else 116 | row.style.display = 'none'; 117 | } 118 | updateTabs(type); 119 | } 120 | 121 | function updateTabs(type) { 122 | for (var value in tabs) { 123 | var sNode = document.getElementById(tabs[value][0]); 124 | var spanNode = sNode.firstChild; 125 | if (value == type) { 126 | sNode.className = activeTableTab; 127 | spanNode.innerHTML = tabs[value][1]; 128 | } 129 | else { 130 | sNode.className = tableTab; 131 | spanNode.innerHTML = "" + tabs[value][1] + ""; 132 | } 133 | } 134 | } 135 | 136 | function updateModuleFrame(pFrame, cFrame) { 137 | top.packageFrame.location = pFrame; 138 | top.classFrame.location = cFrame; 139 | } 140 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 4.0.0 6 | 7 | com.abhyudayasharma 8 | tic-tac-toe 9 | 1.0-SNAPSHOT 10 | 11 | tic-tac-toe 12 | https://github.com/AbhyudayaSharma/tic-tac-toe 13 | 14 | 15 | UTF-8 16 | 11 17 | 11 18 | 5.5.2 19 | 20 | 21 | 22 | 23 | org.junit.jupiter 24 | junit-jupiter-engine 25 | ${junit.jupiter.version} 26 | test 27 | 28 | 29 | com.github.spotbugs 30 | spotbugs-annotations 31 | 4.0.0-beta3 32 | 33 | 34 | 35 | 36 | 37 | 38 | com.github.spotbugs 39 | spotbugs-maven-plugin 40 | 3.1.12.2 41 | 42 | 43 | package 44 | 45 | check 46 | 47 | 48 | 49 | 50 | 51 | org.apache.maven.plugins 52 | maven-jar-plugin 53 | 3.1.2 54 | 55 | 56 | 57 | true 58 | lib/ 59 | com.abhyudayasharma.tictactoe.Main 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | maven-clean-plugin 70 | 3.1.0 71 | 72 | 73 | 74 | maven-resources-plugin 75 | 3.1.0 76 | 77 | 78 | maven-compiler-plugin 79 | 3.8.1 80 | 81 | 82 | maven-surefire-plugin 83 | 2.22.2 84 | 85 | 86 | maven-jar-plugin 87 | 3.1.2 88 | 89 | 90 | maven-install-plugin 91 | 2.5.2 92 | 93 | 94 | maven-deploy-plugin 95 | 2.8.2 96 | 97 | 98 | 99 | maven-site-plugin 100 | 3.8.2 101 | 102 | 103 | maven-project-info-reports-plugin 104 | 3.0.0 105 | 106 | 107 | org.codehaus.mojo 108 | exec-maven-plugin 109 | 1.6.0 110 | 111 | com.abhyudayasharma.tictactoe.Main 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/package-use.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Uses of Package com.abhyudayasharma 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Uses of Package
com.abhyudayasharma

99 |
100 |
No usage of com.abhyudayasharma
101 |
102 |
103 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Overview 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 |
Packages 
PackageDescription
com.abhyudayasharma 
com.abhyudayasharma.tictactoe 
115 |
116 |
117 |
118 | 162 |
163 | 164 | 165 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/class-use/AppTest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Uses of Class com.abhyudayasharma.AppTest 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Uses of Class
com.abhyudayasharma.AppTest

99 |
100 |
No usage of com.abhyudayasharma.AppTest
101 |
102 |
103 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/tictactoe/class-use/Game.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Uses of Class com.abhyudayasharma.tictactoe.Game 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Uses of Class
com.abhyudayasharma.tictactoe.Game

99 |
100 |
No usage of com.abhyudayasharma.tictactoe.Game
101 |
102 |
103 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/tictactoe/class-use/Main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Uses of Class com.abhyudayasharma.tictactoe.Main 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Uses of Class
com.abhyudayasharma.tictactoe.Main

99 |
100 |
No usage of com.abhyudayasharma.tictactoe.Main
101 |
102 |
103 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.abhyudayasharma Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Hierarchy For Package com.abhyudayasharma

99 | Package Hierarchies: 100 | 103 |
104 |
105 |
106 |

Class Hierarchy

107 |
    108 |
  • java.lang.Object 109 |
      110 |
    • com.abhyudayasharma.AppTest
    • 111 |
    112 |
  • 113 |
114 |
115 |
116 |
117 |
118 | 162 |
163 | 164 | 165 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/tictactoe/class-use/MagicSquare.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Uses of Class com.abhyudayasharma.tictactoe.MagicSquare 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Uses of Class
com.abhyudayasharma.tictactoe.MagicSquare

99 |
100 |
No usage of com.abhyudayasharma.tictactoe.MagicSquare
101 |
102 |
103 | 147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /docs/allpackages-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Packages 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

All Packages

99 |
100 |
101 | 122 |
123 |
124 |
125 | 169 |
170 | 171 | 172 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.abhyudayasharma 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Package com.abhyudayasharma

99 |
100 |
101 |
    102 |
  • 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 115 | 116 | 117 |
    Class Summary 
    ClassDescription
    AppTest 113 |
    Unit test for simple App.
    114 |
    118 |
  • 119 |
120 |
121 |
122 |
123 | 167 |
168 | 169 | 170 | -------------------------------------------------------------------------------- /docs/constant-values.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Constant Field Values 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Constant Field Values

99 |
100 |

Contents

101 | 104 |
105 |
106 |
107 | 108 | 109 |
110 |

com.abhyudayasharma.*

111 |
    112 |
  • 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 125 | 126 | 127 | 128 | 129 |
    com.abhyudayasharma.tictactoe.com.abhyudayasharma.tictactoe.Game 
    Modifier and TypeConstant FieldValue
    123 | 124 | private static final intsize3
    130 |
  • 131 |
132 |
133 |
134 |
135 |
136 | 180 |
181 | 182 | 183 | -------------------------------------------------------------------------------- /docs/index-files/index-15.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | W-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

W

101 |
102 |
winningSum - Variable in class com.abhyudayasharma.tictactoe.Game
103 |
104 |
The sum that gives a user his or her win.
105 |
106 |
107 | A B C E F G H L M O P S U V W 
All Classes All Packages
108 |
109 |
110 | 154 |
155 | 156 | 157 | -------------------------------------------------------------------------------- /docs/index-files/index-10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | O-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

O

101 |
102 |
oppositeCorner() - Method in class com.abhyudayasharma.tictactoe.Game
103 |
104 |
Finds the opposite corner for the move.
105 |
106 |
107 | A B C E F G H L M O P S U V W 
All Classes All Packages
108 |
109 |
110 | 154 |
155 | 156 | 157 | -------------------------------------------------------------------------------- /docs/index-files/index-13.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | U-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

U

101 |
102 |
userChar - Variable in class com.abhyudayasharma.tictactoe.Game
103 |
104 |
The character assigned to the user; either 'X' or 'O'.
105 |
106 |
107 | A B C E F G H L M O P S U V W 
All Classes All Packages
108 |
109 |
110 | 154 |
155 | 156 | 157 | -------------------------------------------------------------------------------- /docs/index-files/index-8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | L-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

L

101 |
102 |
leader - Static variable in class com.abhyudayasharma.tictactoe.Game
103 |
104 |
String that stores the name of the current scoreboard leader
105 |
106 |
107 | A B C E F G H L M O P S U V W 
All Classes All Packages
108 |
109 |
110 | 154 |
155 | 156 | 157 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/tictactoe/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.abhyudayasharma.tictactoe Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Hierarchy For Package com.abhyudayasharma.tictactoe

99 | Package Hierarchies: 100 | 103 |
104 |
105 |
106 |

Class Hierarchy

107 |
    108 |
  • java.lang.Object 109 |
      110 |
    • com.abhyudayasharma.tictactoe.Game
    • 111 |
    • com.abhyudayasharma.tictactoe.MagicSquare
    • 112 |
    • com.abhyudayasharma.tictactoe.Main
    • 113 |
    114 |
  • 115 |
116 |
117 |
118 |

Enum Hierarchy

119 |
    120 |
  • java.lang.Object 121 |
      122 |
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) 123 |
        124 |
      • com.abhyudayasharma.tictactoe.PlayerType
      • 125 |
      126 |
    • 127 |
    128 |
  • 129 |
130 |
131 |
132 |
133 |
134 | 178 |
179 | 180 | 181 | -------------------------------------------------------------------------------- /docs/overview-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Hierarchy For All Packages

99 | Package Hierarchies: 100 | 104 |
105 |
106 |
107 |

Class Hierarchy

108 |
    109 |
  • java.lang.Object 110 |
      111 |
    • com.abhyudayasharma.AppTest
    • 112 |
    • com.abhyudayasharma.tictactoe.Game
    • 113 |
    • com.abhyudayasharma.tictactoe.MagicSquare
    • 114 |
    • com.abhyudayasharma.tictactoe.Main
    • 115 |
    116 |
  • 117 |
118 |
119 |
120 |

Enum Hierarchy

121 |
    122 |
  • java.lang.Object 123 |
      124 |
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) 125 |
        126 |
      • com.abhyudayasharma.tictactoe.PlayerType
      • 127 |
      128 |
    • 129 |
    130 |
  • 131 |
132 |
133 |
134 |
135 |
136 | 180 |
181 | 182 | 183 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/tictactoe/package-use.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Uses of Package com.abhyudayasharma.tictactoe 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Uses of Package
com.abhyudayasharma.tictactoe

99 |
100 |
101 | 137 |
138 |
139 |
140 | 184 |
185 | 186 | 187 | -------------------------------------------------------------------------------- /docs/index-files/index-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | B-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

B

101 |
102 |
boxes - Variable in class com.abhyudayasharma.tictactoe.Game
103 |
104 |
JPanel to display the buttons for the game
105 |
106 |
buttons - Variable in class com.abhyudayasharma.tictactoe.Game
107 |
108 |
Clickable JButtons for user interactions.
109 |
110 |
111 | A B C E F G H L M O P S U V W 
All Classes All Packages
112 |
113 |
114 | 158 |
159 | 160 | 161 | -------------------------------------------------------------------------------- /docs/index-files/index-14.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | V-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

V

101 |
102 |
valueOf(String) - Static method in enum com.abhyudayasharma.tictactoe.PlayerType
103 |
104 |
Returns the enum constant of this type with the specified name.
105 |
106 |
values() - Static method in enum com.abhyudayasharma.tictactoe.PlayerType
107 |
108 |
Returns an array containing the constants of this enum type, in 109 | the order they are declared.
110 |
111 |
112 | A B C E F G H L M O P S U V W 
All Classes All Packages
113 |
114 |
115 | 159 |
160 | 161 | 162 | -------------------------------------------------------------------------------- /docs/com/abhyudayasharma/tictactoe/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.abhyudayasharma.tictactoe 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
98 |

Package com.abhyudayasharma.tictactoe

99 |
100 |
101 |
    102 |
  • 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 115 | 116 | 117 | 118 | 121 | 122 | 123 | 124 | 127 | 128 | 129 |
    Class Summary 
    ClassDescription
    Game 113 |
    This class contains logic for the AI of the game and maintains the UI.
    114 |
    MagicSquare 119 |
    Generates a magic square of odd size.
    120 |
    Main 125 |
    Execution starts here.
    126 |
    130 |
  • 131 |
  • 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 144 | 145 | 146 |
    Enum Summary 
    EnumDescription
    PlayerType 142 |
    Utility enum for checking the current player.
    143 |
    147 |
  • 148 |
149 |
150 |
151 |
152 | 196 |
197 | 198 | 199 | -------------------------------------------------------------------------------- /docs/index-files/index-12.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | S-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

S

101 |
102 |
shouldAnswerWithTrue() - Method in class com.abhyudayasharma.AppTest
103 |
104 |
Rigorous Test :-)
105 |
106 |
size - Static variable in class com.abhyudayasharma.tictactoe.Game
107 |
108 |
The size of the tic-tac-toe board = 3.
109 |
110 |
start() - Method in class com.abhyudayasharma.tictactoe.Game
111 |
112 |
Execution starts here.
113 |
114 |
115 | A B C E F G H L M O P S U V W 
All Classes All Packages
116 |
117 |
118 | 162 |
163 | 164 | 165 | -------------------------------------------------------------------------------- /docs/index-files/index-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | A-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

A

101 |
102 |
addOnClickListener(JButton, int, int) - Method in class com.abhyudayasharma.tictactoe.Game
103 |
104 |
Adds listener to the button for user interaction which get fired when the button is clicked.
105 |
106 |
AppTest - Class in com.abhyudayasharma
107 |
108 |
Unit test for simple App.
109 |
110 |
AppTest() - Constructor for class com.abhyudayasharma.AppTest
111 |
 
112 |
113 | A B C E F G H L M O P S U V W 
All Classes All Packages
114 |
115 |
116 | 160 |
161 | 162 | 163 | -------------------------------------------------------------------------------- /docs/allclasses-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 40 | 43 |
44 | 101 |
102 |
103 |
104 |

All Classes

105 |
106 |
107 |
    108 |
  • 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 120 | 121 | 122 | 123 | 126 | 127 | 128 | 129 | 132 | 133 | 134 | 135 | 138 | 139 | 140 | 141 | 144 | 145 |
    All Classes Class Summary Enum Summary 
    ClassDescription
    AppTest 118 |
    Unit test for simple App.
    119 |
    Game 124 |
    This class contains logic for the AI of the game and maintains the UI.
    125 |
    MagicSquare 130 |
    Generates a magic square of odd size.
    131 |
    Main 136 |
    Execution starts here.
    137 |
    PlayerType 142 |
    Utility enum for checking the current player.
    143 |
    146 |
  • 147 |
148 |
149 |
150 |
151 | 195 |
196 | 197 | 198 | -------------------------------------------------------------------------------- /docs/index-files/index-4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | E-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

E

101 |
102 |
elementCounter(List, int[]) - Method in class com.abhyudayasharma.tictactoe.Game
103 |
104 |
Counts the number of elements common in an array and a List
105 |
106 |
emptyCorner() - Method in class com.abhyudayasharma.tictactoe.Game
107 |
108 |
Finds an empty corner in the matrix
109 |
110 |
emptySide() - Method in class com.abhyudayasharma.tictactoe.Game
111 |
112 |
Finds an empty side in the matrix
113 |
114 |
expectedSum - Static variable in class com.abhyudayasharma.tictactoe.MagicSquare
115 |
 
116 |
117 | A B C E F G H L M O P S U V W 
All Classes All Packages
118 |
119 |
120 | 164 |
165 | 166 | 167 | -------------------------------------------------------------------------------- /docs/index-files/index-11.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | P-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

P

101 |
102 |
placeNextOdd(int, int, int[][], int, int) - Method in class com.abhyudayasharma.tictactoe.MagicSquare
103 |
104 |
Recursive method for placing digits in the magic square.
105 |
106 |
PlayerType - Enum in com.abhyudayasharma.tictactoe
107 |
108 |
Utility enum for checking the current player.
109 |
110 |
PlayerType() - Constructor for enum com.abhyudayasharma.tictactoe.PlayerType
111 |
 
112 |
possWin(List, List) - Method in class com.abhyudayasharma.tictactoe.Game
113 |
114 |
Checks if the winning is possible
115 |
116 |
117 | A B C E F G H L M O P S U V W 
All Classes All Packages
118 |
119 |
120 | 164 |
165 | 166 | 167 | -------------------------------------------------------------------------------- /docs/index-files/index-7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | H-Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 37 |
38 | 95 |
96 |
97 |
A B C E F G H L M O P S U V W 
All Classes All Packages 98 | 99 | 100 |

H

101 |
102 |
HUMAN - com.abhyudayasharma.tictactoe.PlayerType
103 |
 
104 |
humanMoves - Variable in class com.abhyudayasharma.tictactoe.Game
105 |
106 |
List of moves made by the user.
107 |
108 |
humanMovesList - Variable in class com.abhyudayasharma.tictactoe.Game
109 |
110 |
Displayable list of moves made by the human user.
111 |
112 |
humanWin(List) - Method in class com.abhyudayasharma.tictactoe.Game
113 |
114 |
Checks if the win for the human player is possible.
115 |
116 |
humanWins - Static variable in class com.abhyudayasharma.tictactoe.Game
117 |
118 |
The number of wins made by the human player.
119 |
120 |
121 | A B C E F G H L M O P S U V W 
All Classes All Packages
122 |
123 | 169 | 170 | 171 | --------------------------------------------------------------------------------