This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
Package
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain six categories:
+
+
Interfaces
+
Classes
+
Enum Classes
+
Exceptions
+
Errors
+
Annotation Interfaces
+
+
+
+
Class or Interface
+
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+
Class Inheritance Diagram
+
Direct Subclasses
+
All Known Subinterfaces
+
All Known Implementing Classes
+
Class or Interface Declaration
+
Class or Interface Description
+
+
+
+
Nested Class Summary
+
Field Summary
+
Property Summary
+
Constructor Summary
+
Method Summary
+
+
+
+
Field Details
+
Property Details
+
Constructor Details
+
Method Details
+
+
The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+
+
+
Annotation Interface
+
Each annotation interface has its own separate page with the following sections:
+
+
Annotation Interface Declaration
+
Annotation Interface Description
+
Required Element Summary
+
Optional Element Summary
+
Element Details
+
+
+
+
Enum Class
+
Each enum class has its own separate page with the following sections:
+
+
Enum Declaration
+
Enum Description
+
Enum Constant Summary
+
Enum Constant Details
+
+
+
+
Tree (Class Hierarchy)
+
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.
+
+
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
+
When viewing a particular package, class or interface page, clicking on "Tree" displays the hierarchy for only that package.
+
+
+
+
Index
+
The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.
+
+
+
Search
+
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camel-case" abbreviations. For example:
+
+
j.l.obj will match "java.lang.Object"
+
InpStr will match "java.io.InputStream"
+
HM.cK will match "java.util.HashMap.containsKey(Object)"
+
+
+
diff --git a/doc/jquery-ui.overrides.css b/doc/jquery-ui.overrides.css
new file mode 100644
index 0000000..f89acb6
--- /dev/null
+++ b/doc/jquery-ui.overrides.css
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+.ui-state-active,
+.ui-widget-content .ui-state-active,
+.ui-widget-header .ui-state-active,
+a.ui-button:active,
+.ui-button:active,
+.ui-button.ui-state-active:hover {
+ /* Overrides the color of selection used in jQuery UI */
+ background: #F8981D;
+}
diff --git a/doc/member-search-index.js b/doc/member-search-index.js
new file mode 100644
index 0000000..213878f
--- /dev/null
+++ b/doc/member-search-index.js
@@ -0,0 +1 @@
+memberSearchIndex = [{"p":"com.company","c":"Joueur","l":"Joueur()","u":"%3Cinit%3E()"},{"p":"com.company","c":"Joueur","l":"main()"},{"p":"com.company","c":"RegleDuJeu","l":"main()"},{"p":"com.company","c":"Score","l":"main()"},{"p":"com.company","c":"Main","l":"Main()","u":"%3Cinit%3E()"},{"p":"com.company","c":"Main","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.company","c":"Main","l":"menuJeu()"},{"p":"com.company","c":"Joueur","l":"pasDeCase(int, int)","u":"pasDeCase(int,int)"},{"p":"com.company","c":"RegleDuJeu","l":"RegleDuJeu()","u":"%3Cinit%3E()"},{"p":"com.company","c":"Score","l":"Score()","u":"%3Cinit%3E()"},{"p":"com.company","c":"Joueur","l":"verifCaseLibre(int, int)","u":"verifCaseLibre(int,int)"}];updateSearchResults();
\ No newline at end of file
diff --git a/doc/module-search-index.js b/doc/module-search-index.js
new file mode 100644
index 0000000..0d59754
--- /dev/null
+++ b/doc/module-search-index.js
@@ -0,0 +1 @@
+moduleSearchIndex = [];updateSearchResults();
\ No newline at end of file
diff --git a/doc/overview-tree.html b/doc/overview-tree.html
new file mode 100644
index 0000000..0ef39bb
--- /dev/null
+++ b/doc/overview-tree.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+Class Hierarchy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete});
\ No newline at end of file
diff --git a/doc/script-dir/jquery-ui.structure.min.css b/doc/script-dir/jquery-ui.structure.min.css
new file mode 100644
index 0000000..e880892
--- /dev/null
+++ b/doc/script-dir/jquery-ui.structure.min.css
@@ -0,0 +1,5 @@
+/*! jQuery UI - v1.12.1 - 2018-12-06
+* http://jqueryui.com
+* Copyright jQuery Foundation and other contributors; Licensed MIT */
+
+.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-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;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.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:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.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-wrapper{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}
\ No newline at end of file
diff --git a/doc/script.js b/doc/script.js
new file mode 100644
index 0000000..864989c
--- /dev/null
+++ b/doc/script.js
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+var moduleSearchIndex;
+var packageSearchIndex;
+var typeSearchIndex;
+var memberSearchIndex;
+var tagSearchIndex;
+function loadScripts(doc, tag) {
+ createElem(doc, tag, 'search.js');
+
+ createElem(doc, tag, 'module-search-index.js');
+ createElem(doc, tag, 'package-search-index.js');
+ createElem(doc, tag, 'type-search-index.js');
+ createElem(doc, tag, 'member-search-index.js');
+ createElem(doc, tag, 'tag-search-index.js');
+}
+
+function createElem(doc, tag, path) {
+ var script = doc.createElement(tag);
+ var scriptElement = doc.getElementsByTagName(tag)[0];
+ script.src = pathtoroot + path;
+ scriptElement.parentNode.insertBefore(script, scriptElement);
+}
+
+function show(tableId, selected, columns) {
+ if (tableId !== selected) {
+ document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')')
+ .forEach(function(elem) {
+ elem.style.display = 'none';
+ });
+ }
+ document.querySelectorAll('div.' + selected)
+ .forEach(function(elem, index) {
+ elem.style.display = '';
+ var isEvenRow = index % (columns * 2) < columns;
+ elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor);
+ elem.classList.add(isEvenRow ? evenRowColor : oddRowColor);
+ });
+ updateTabs(tableId, selected);
+}
+
+function updateTabs(tableId, selected) {
+ document.querySelector('div#' + tableId +' .summary-table')
+ .setAttribute('aria-labelledby', selected);
+ document.querySelectorAll('button[id^="' + tableId + '"]')
+ .forEach(function(tab, index) {
+ if (selected === tab.id || (tableId === selected && index === 0)) {
+ tab.className = activeTableTab;
+ tab.setAttribute('aria-selected', true);
+ tab.setAttribute('tabindex',0);
+ } else {
+ tab.className = tableTab;
+ tab.setAttribute('aria-selected', false);
+ tab.setAttribute('tabindex',-1);
+ }
+ });
+}
+
+function switchTab(e) {
+ var selected = document.querySelector('[aria-selected=true]');
+ if (selected) {
+ if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) {
+ // left or up arrow key pressed: move focus to previous tab
+ selected.previousSibling.click();
+ selected.previousSibling.focus();
+ e.preventDefault();
+ } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) {
+ // right or down arrow key pressed: move focus to next tab
+ selected.nextSibling.click();
+ selected.nextSibling.focus();
+ e.preventDefault();
+ }
+ }
+}
+
+var updateSearchResults = function() {};
+
+function indexFilesLoaded() {
+ return moduleSearchIndex
+ && packageSearchIndex
+ && typeSearchIndex
+ && memberSearchIndex
+ && tagSearchIndex;
+}
+
+// Workaround for scroll position not being included in browser history (8249133)
+document.addEventListener("DOMContentLoaded", function(e) {
+ var contentDiv = document.querySelector("div.flex-content");
+ window.addEventListener("popstate", function(e) {
+ if (e.state !== null) {
+ contentDiv.scrollTop = e.state;
+ }
+ });
+ window.addEventListener("hashchange", function(e) {
+ history.replaceState(contentDiv.scrollTop, document.title);
+ });
+ contentDiv.addEventListener("scroll", function(e) {
+ var timeoutID;
+ if (!timeoutID) {
+ timeoutID = setTimeout(function() {
+ history.replaceState(contentDiv.scrollTop, document.title);
+ timeoutID = null;
+ }, 100);
+ }
+ });
+ if (!location.hash) {
+ history.replaceState(contentDiv.scrollTop, document.title);
+ }
+});
diff --git a/doc/search.js b/doc/search.js
new file mode 100644
index 0000000..2c2ced0
--- /dev/null
+++ b/doc/search.js
@@ -0,0 +1,354 @@
+/*
+ * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+var noResult = {l: "No results found"};
+var loading = {l: "Loading search index..."};
+var catModules = "Modules";
+var catPackages = "Packages";
+var catTypes = "Classes and Interfaces";
+var catMembers = "Members";
+var catSearchTags = "Search Tags";
+var highlight = "$&";
+var searchPattern = "";
+var fallbackPattern = "";
+var RANKING_THRESHOLD = 2;
+var NO_MATCH = 0xffff;
+var MIN_RESULTS = 3;
+var MAX_RESULTS = 500;
+var UNNAMED = "";
+function escapeHtml(str) {
+ return str.replace(//g, ">");
+}
+function getHighlightedText(item, matcher, fallbackMatcher) {
+ var escapedItem = escapeHtml(item);
+ var highlighted = escapedItem.replace(matcher, highlight);
+ if (highlighted === escapedItem) {
+ highlighted = escapedItem.replace(fallbackMatcher, highlight)
+ }
+ return highlighted;
+}
+function getURLPrefix(ui) {
+ var urlPrefix="";
+ var slash = "/";
+ if (ui.item.category === catModules) {
+ return ui.item.l + slash;
+ } else if (ui.item.category === catPackages && ui.item.m) {
+ return ui.item.m + slash;
+ } else if (ui.item.category === catTypes || ui.item.category === catMembers) {
+ if (ui.item.m) {
+ urlPrefix = ui.item.m + slash;
+ } else {
+ $.each(packageSearchIndex, function(index, item) {
+ if (item.m && ui.item.p === item.l) {
+ urlPrefix = item.m + slash;
+ }
+ });
+ }
+ }
+ return urlPrefix;
+}
+function createSearchPattern(term) {
+ var pattern = "";
+ var isWordToken = false;
+ term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) {
+ if (index > 0) {
+ // whitespace between identifiers is significant
+ pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*";
+ }
+ var tokens = w.split(/(?=[A-Z,.()<>[\/])/);
+ for (var i = 0; i < tokens.length; i++) {
+ var s = tokens[i];
+ if (s === "") {
+ continue;
+ }
+ pattern += $.ui.autocomplete.escapeRegex(s);
+ isWordToken = /\w$/.test(s);
+ if (isWordToken) {
+ pattern += "([a-z0-9_$<>\\[\\]]*?)";
+ }
+ }
+ });
+ return pattern;
+}
+function createMatcher(pattern, flags) {
+ var isCamelCase = /[A-Z]/.test(pattern);
+ return new RegExp(pattern, flags + (isCamelCase ? "" : "i"));
+}
+var watermark = 'Search';
+$(function() {
+ var search = $("#search");
+ var reset = $("#reset");
+ search.val('');
+ search.prop("disabled", false);
+ reset.prop("disabled", false);
+ search.val(watermark).addClass('watermark');
+ search.blur(function() {
+ if ($(this).val().length === 0) {
+ $(this).val(watermark).addClass('watermark');
+ }
+ });
+ search.on('click keydown paste', function() {
+ if ($(this).val() === watermark) {
+ $(this).val('').removeClass('watermark');
+ }
+ });
+ reset.click(function() {
+ search.val('').focus();
+ });
+ search.focus()[0].setSelectionRange(0, 0);
+});
+$.widget("custom.catcomplete", $.ui.autocomplete, {
+ _create: function() {
+ this._super();
+ this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)");
+ },
+ _renderMenu: function(ul, items) {
+ var rMenu = this;
+ var currentCategory = "";
+ rMenu.menu.bindings = $();
+ $.each(items, function(index, item) {
+ var li;
+ if (item.category && item.category !== currentCategory) {
+ ul.append("
").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete});
\ No newline at end of file
diff --git a/script-dir/jquery-ui.structure.min.css b/script-dir/jquery-ui.structure.min.css
new file mode 100644
index 0000000..e880892
--- /dev/null
+++ b/script-dir/jquery-ui.structure.min.css
@@ -0,0 +1,5 @@
+/*! jQuery UI - v1.12.1 - 2018-12-06
+* http://jqueryui.com
+* Copyright jQuery Foundation and other contributors; Licensed MIT */
+
+.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-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;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.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:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.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-wrapper{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}
\ No newline at end of file
diff --git a/src/.DS_Store b/src/.DS_Store
new file mode 100644
index 0000000..15fa802
Binary files /dev/null and b/src/.DS_Store differ
diff --git a/src/com/.DS_Store b/src/com/.DS_Store
new file mode 100644
index 0000000..c4e1b64
Binary files /dev/null and b/src/com/.DS_Store differ
diff --git a/src/com/company/Joueur.java b/src/com/company/Joueur.java
index 337cb21..fa688b4 100644
--- a/src/com/company/Joueur.java
+++ b/src/com/company/Joueur.java
@@ -1,19 +1,294 @@
package com.company;
import java.lang.*;
+import java.sql.SQLOutput;
+import java.util.*;
+import com.company.Main;
public class Joueur {
+ static boolean jeu = true;
+ static boolean caseLibro;
+
+// Fonction permettant de savoir si il y a encore des case librre autour du joueur
+ /**
+ * La méthode pasDeCase prend en paramètre deux entiers pi et ti et retourne un booléen gameOver.
+ * On initialise le booléen gameOver ainsi que 4 entiers : haut, bas, gauche et droite.
+ * On regarde si les cases autour de ti et pi sont libres.
+ * Si toutes les cases autour ne sont pas libre, on donne au booléen gameOver la valeur true.
+ * Sinon, la valeur reste à false.
+ */
+ public static boolean pasDeCase (int pi,int ti){
+
+ boolean gameOver = false;// declare la variable qui va etre retourner
+
+ int haut = ti--; // declaration des variable pour les case autour du joueur
+ int bas = ti++;
+ int gauche = pi--;
+ int droite = pi++;
+
+ boolean pasHaut = false;// declaration des variable boolean qui vont verifie si il y a des case libre
+ boolean pasBas = false;
+ boolean pasDroite = false;
+ boolean pasGauche = false;
+
+ if(verifCaseLibre(pi,haut)){ // verification de si il y a des case libre autour du joueur
+ pasHaut = true;
+ }
+ if (verifCaseLibre(pi,bas)){
+ pasBas = true;
+ }
+ if (verifCaseLibre(gauche,ti)){
+ pasGauche = true;
+ }
+ if ((verifCaseLibre(droite,ti))){
+ pasDroite = true;
+ }
+ if (pasHaut == false && pasBas == false && pasDroite == false && pasGauche == false){ // verification que toute les case sont occupé
+ gameOver = true;
+ jeu = false;
+
+ }
+ return gameOver; // on retourne la variable pour savoir si il y a des case libres
+ }
+
+ // Fonction permettant de verifié si case est libre avec comme parametre les coordoné x et y du tab
+ /**
+ * Cette méthode vérifie si une case est libre.
+ * Elle prend en paramètres un entier fi et un entier gi.
+ * On crée d'abord un booléen caseLibre auquel on donne la valeur false.
+ * On regarde si la valeur de fi et gi se trouve dans le tableau puis on regarde si la case n'est pas déjà occupée.
+ * Si elle est vide, on passe la valeur de caseLibre à true. Sinon, elle reste à false.
+ */
+ public static boolean verifCaseLibre(int fi, int gi){
+
+ boolean caseLibre = false;
+ if((fi < 10 && fi >=0)&&(gi < 11 && gi >=0)){
+ String a = Main.grille[fi][gi]; // On range la valeur contenu dans le tab au coord x et y
+ if (a.equals("[ ]")) { // On la compare avec le caractère qui défini une place vide dans le tab
+
+ caseLibre = true; // Si c'est le bon caractère alors on renvoie la valeur true
+
+ } else {
+
+ caseLibre = false;
+
+
+ }
+
+ }else{
+ System.out.println("Le joueur ne peut pas avancer");
+ caseLibre = false;
+ }
+
+ return caseLibre; // On renvoie soit la valeur true si case libre et false si occupé
+ }
+
+
public static void main() {
- // write your code here
+
+ boolean retourMenu = false;
+
+ //le choix du pseudo: On demande le nom des deux joueurs et on les rentre dans leur variables respectives
+ // (pseudo1 pour le joueur 1 et pseudo2 pour le joueur 2)
+
+
+ System.out.println("Quel est le nom du Joueur 1?");
+ String pseudo1 = Main.sc.next();
+ System.out.println("Quel est le nom du Joueur 2?");
+ String pseudo2 = Main.sc.next();
+
+ //On vérifie que les joueurs aient deux pseudos distinct entre 2 et 10 caractères.
+ while(pseudo2.equals(pseudo1) ||(pseudo2.length() > 10) || (pseudo2.length() < 2)){
+ System.out.println("Pseudo du joueur 2 similaire au joueur 1 ou trop long. Choisissez un autre pseudo.");
+ pseudo2 = Main.sc.next();
+ }
+ while(pseudo1.length() > 10 || pseudo1.length() < 2){
+ System.out.println("Pseudo du joueur 1 trop long. Choisissez un autre pseudo.");
+ pseudo1 = Main.sc.next();
+ }
+
+ // Joueur qui commence
boolean joueur = true;
double nombre;
nombre = Math.random();
nombre = nombre * 2;
int premier = (int) nombre;
if(premier == 0){
+
joueur = true;
}
else if(premier == 1){
+
joueur = false;
}
+ System.out.println(premier);
+ // Création des pions 1 et 2 en fonction de leurs coordonnées x et y.
+
+ int pion1x = new Random().nextInt(10);
+ int pion1y = new Random().nextInt(11);
+ int pion2x = new Random().nextInt(10);
+ int pion2y = new Random().nextInt(11);
+// Utilisation d'une boucle for pour remplir la grille de cases. t étant la coordonnée x et i étant la coordonnée y.
+ int i;
+ for(int t = 0; t < 10; ++t) {
+ for(i = 0; i < 11; ++i) {
+ Main.grille[t][i] = "[ ]";
+ }
+ }
+
+ do{
+
+
+
+
+ // Ajout des pions 1 et 2 sur le plateau de jeu grâce à leurs coordonnées.
+ Main.grille [pion1x][pion1y] = "[1]";
+ Main.grille [pion2x][pion2y] = "[2]";
+
+ // Afficher le tableau dans la console.
+ // (k et l servant a naviguer verticalement et horizontalement dans le tableau.)
+
+ for(int k = 0; k < 10; k++) {
+ String ligne = "";
+ for (int l = 0; l < 11; l++) {
+ ligne += Main.grille[k][l];
+ }
+ System.out.println(ligne);
+ }
+ Main.grille [pion1x][pion1y] = "[ ]";
+ Main.grille [pion2x][pion2y] = "[ ]";
+ //On demande au joueur la direction dans laquelle il souhaite aller
+ // puis on la stocke dans la variable direction.
+ String direction ="";
+ boolean recoCaseL = false;
+ do {
+
+ if (joueur == true) {
+ System.out.println(pseudo1 + " Dans quel direction voulez-vous aller ? ( H / B / G / D )");
+ direction = Main.sc.next();
+ } else if (joueur == false) {
+ System.out.println(pseudo2 + " Dans quel direction voulez-vous aller ? ( H / B / G / D )");
+ direction = Main.sc.next();
+ }
+
+ //On vérifie que la réponse est bien une direction sinon on redemande au joueur la direction.
+
+ while (!direction.equals("H") && !direction.equals("G") && !direction.equals("D") && !direction.equals("B")) {
+ System.out.println("Veuillez choisir une direction (H / B / G / D)");
+ direction = Main.sc.next();
+ }
+
+
+ //On utilise un switch pour avancer le pion dans la direction souhaitée
+ // en prenant en compte quel joueur est actuellement en train de jouer.
+
+ switch (direction) {
+ case "H":
+
+ if (joueur == true && verifCaseLibre((pion1x - 1), pion1y) == true) { // On verifie pour quel joueur c'est le tour et si la case chosit es libre
+
+ pion1x--;
+ recoCaseL = true;
+
+ } else if (joueur == false && verifCaseLibre((pion2x - 1), pion2y) == true) {
+
+ pion2x--;
+ recoCaseL = true;
+ }
+ break;
+ case "G":
+ if (joueur == true && verifCaseLibre(pion1x, (pion1y - 1)) == true) {
+ pion1y--;
+ recoCaseL = true;
+ System.out.println("o" + pion1y);
+ } else if (joueur == false && verifCaseLibre(pion2x, (pion2y - 1)) == true) {
+ pion2y--;
+ recoCaseL = true;
+ System.out.println("P" + pion2y);
+ }
+ break;
+ case "D":
+ if (joueur == true && verifCaseLibre(pion1x, (pion1y + 1)) == true) {
+ pion1y++;
+ recoCaseL = true;
+ } else if (joueur == false && verifCaseLibre(pion2x, (pion2y + 1)) == true) {
+ pion2y++;
+ recoCaseL = true;
+ }
+ break;
+ case "B":
+ if (joueur == true && verifCaseLibre((pion1x + 1), pion1y) == true) {
+ pion1x++;
+ recoCaseL = true;
+ } else if (joueur == false && verifCaseLibre((pion2x + 1), pion2y) == true) {
+
+ pion2x++;
+ recoCaseL = true;
+ }
+ break;
+ }
+ }while (recoCaseL == false);
+
+ if(joueur == true){
+ pasDeCase(pion1x, pion1y);
+
+ }
+ else{
+ pasDeCase(pion2x, pion2y);
+ }
+ do {
+
+ System.out.println("Rentrer une coordonné x : ");
+ Main.corX = Main.sc.nextInt();
+
+ System.out.println("Rentrer une coordonné y : ");
+ Main.corY = Main.sc.nextInt();
+
+ if (Main.corX > 10 || Main.corX < 0 || Main.corY > 11 || Main.corY < 0) {
+ System.out.println("Entre incorrect");
+ }
+
+ } while (Main.corX > 10 || Main.corX < 0 || Main.corY > 11 || Main.corY < 0);
+
+ caseLibro = verifCaseLibre(Main.corX, Main.corY);
+
+ if (caseLibro == true){
+
+ Main.grille[Main.corX][Main.corY] = "[X]";
+ }
+ joueur = !joueur;
+ }while (jeu);
+
+
+ int numScore = 0;
+ while(Main.tableauScores[numScore] != null){
+ numScore++;
+ }
+ if(joueur){
+ Main.tableauScores[numScore] = pseudo1;
+ }
+ else{
+ Main.tableauScores[numScore] = pseudo2;
+ }
+
+
+
+
+
+ while (retourMenu != true) {
+
+ System.out.println("Pour revenir au menu taper 1");
+ Scanner a = new Scanner(System.in);
+ int b = a.nextInt();
+ if (b == 1) {
+ retourMenu = true;
+ }
+ else {
+ System.out.println("entre incorrect");
+ }
+ }
+
+
+
+
}
}
diff --git a/src/com/company/Main.java b/src/com/company/Main.java
index d9d1a8b..616a66e 100644
--- a/src/com/company/Main.java
+++ b/src/com/company/Main.java
@@ -1,8 +1,76 @@
package com.company;
+import java.util.Scanner;
+import java.util.*;
+/**
+ * Cette classe permet d'afficher le menu principal du jeu.
+ */
public class Main {
+ static Scanner sc = new Scanner(System.in);
+ // Création du plateau de jeu avec grille un tableau en 2 dimensions de taille 11x10.
+ static String[][] grille = new String[10][11];
+
+ static int corX;
+ static int corY;
+
+ static String[] tableauScores = new String[10];
+
+ /**
+ * Cette méthode permet d'afficher le menu principal du Destruct Chess ainsi que d'intéragir avec celui-ci.
+ * Il ne prend pas de paramètre et ne retourne rien.
+ */
+ public static void menuJeu(){
+
+ System.out.println(" DestroyChesss ");
+ System.out.println();
+ System.out.println();
+ System.out.println("~~~~~~~~~~~~~MENU~~~~~~~~~~~~~~~ ");
+
+ System.out.println("1. Démarrer une partie ");
+ System.out.println("2. Voir les scores");
+ System.out.println("3. Les règles");
+ System.out.println("4. Quitter le jeu");
+ System.out.println();
+ System.out.println("Choisir une entrée");
+ int entree = 0;
+ while (entree <= 0 || entree >4) {
+ Scanner reader = new Scanner(System.in);
+ entree = reader.nextInt();
+ switch (entree) {
+ case 1:
+ Joueur.main();
+ break;
+ case 2:
+ Score.main();
+ break;
+ case 3:
+ RegleDuJeu.main();
+ break;
+ case 4:
+ System.exit(0);
+ break;
+ default:
+ System.out.println("L'entree est incorrect");
+ break;
+ }
+ }
+ }
public static void main(String[] args) {
- // write your code here
+ boolean retourMenu = false;
+
+ do {
+ menuJeu();
+ }while (retourMenu != true);
+
+
+
+
+
+
+
+
}
+
+
}
diff --git a/src/com/company/RegleDuJeu.java b/src/com/company/RegleDuJeu.java
new file mode 100644
index 0000000..0576673
--- /dev/null
+++ b/src/com/company/RegleDuJeu.java
@@ -0,0 +1,38 @@
+package com.company;
+
+import java.util.Scanner;
+/**
+ * Cette classe permet d'afficher les règles du jeu.
+ */
+public class RegleDuJeu {
+
+ public static void main() {
+
+ boolean retourMenu = false;
+
+
+
+ System.out.println("~~~~~~~~~~Règle Du Jeu~~~~~~~~~~~~~");
+
+ System.out.println("Chaque tour un joueur doit se déplacer d'une case verticalement ou horizontalement");
+ System.out.println();
+ System.out.println("Il doit en suite détruire une case qui n'est pas occupé ou qui n'est pas déja détruite");
+ System.out.println();
+ System.out.println("Le premier jour à être bloqué est déclarer perdant");
+ System.out.println();
+
+ while (retourMenu != true) {
+
+ System.out.println("Pour revenir au menu taper 1");
+ Scanner a = new Scanner(System.in);
+ int b = a.nextInt();
+ if (b == 1) {
+ retourMenu = true;
+ }
+ else {
+ System.out.println("entre incorrect");
+ }
+ }
+ }
+
+}
diff --git a/src/com/company/Score.java b/src/com/company/Score.java
new file mode 100644
index 0000000..8a579e6
--- /dev/null
+++ b/src/com/company/Score.java
@@ -0,0 +1,31 @@
+package com.company;
+import com.company.Main;
+
+import java.util.Scanner;
+/**
+ * Cette classe permet d'afficher le tableau des scores.
+ */
+public class Score {
+ public static void main() {
+
+ boolean retourMenu = false;
+
+ int j = 0;
+ System.out.println("----------Tableau des scores----------");
+ for(int i = 0; i < Main.tableauScores.length; i++){
+ j = i;
+ System.out.println((j + 1) + " - " + Main.tableauScores[i]);
+ }
+
+ while (retourMenu != true) {
+
+ System.out.println("Pour revenir au menu, tapez 1");
+ Scanner a = new Scanner(System.in);
+ if (a.nextInt() == 1) {
+ retourMenu = true;
+ } else {
+ System.out.println("Entrée incorrecte");
+ }
+ }
+ }
+}