473 lines
34 KiB
HTML
473 lines
34 KiB
HTML
<!DOCTYPE HTML>
|
|
<html lang="fr">
|
|
<head>
|
|
<!-- Generated by javadoc (21) on Sun Feb 02 23:54:14 CET 2025 -->
|
|
<title>Sudoku</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="dc.created" content="2025-02-02">
|
|
<meta name="description" content="declaration: package: sudoku.structure, class: Sudoku">
|
|
<meta name="generator" content="javadoc/ClassWriterImpl">
|
|
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
|
<script type="text/javascript" src="../../script.js"></script>
|
|
<script type="text/javascript" src="../../script-dir/jquery-3.6.1.min.js"></script>
|
|
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
|
</head>
|
|
<body class="class-declaration-page">
|
|
<script type="text/javascript">var pathtoroot = "../../";
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<div class="flex-box">
|
|
<header role="banner" class="flex-header">
|
|
<nav role="navigation">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button>
|
|
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
|
|
<li><a href="../../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="nav-bar-cell1-rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../help-doc.html#class">Help</a></li>
|
|
</ul>
|
|
<ul class="sub-nav-list-small">
|
|
<li>
|
|
<p>Summary:</p>
|
|
<ul>
|
|
<li>Nested</li>
|
|
<li>Field</li>
|
|
<li><a href="#constructor-summary">Constr</a></li>
|
|
<li><a href="#method-summary">Method</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<p>Detail:</p>
|
|
<ul>
|
|
<li>Field</li>
|
|
<li><a href="#constructor-detail">Constr</a></li>
|
|
<li><a href="#method-detail">Method</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="sub-nav">
|
|
<div id="navbar-sub-list">
|
|
<ul class="sub-nav-list">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor-summary">Constr</a> | </li>
|
|
<li><a href="#method-summary">Method</a></li>
|
|
</ul>
|
|
<ul class="sub-nav-list">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor-detail">Constr</a> | </li>
|
|
<li><a href="#method-detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="nav-list-search"><a href="../../search.html">SEARCH</a>
|
|
<input type="text" id="search-input" disabled placeholder="Search">
|
|
<input type="reset" id="reset-button" disabled value="reset">
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<span class="skip-nav" id="skip-navbar-top"></span></nav>
|
|
</header>
|
|
<div class="flex-content">
|
|
<main role="main">
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">sudoku.structure</a></div>
|
|
<h1 title="Class Sudoku" class="title">Class Sudoku</h1>
|
|
</div>
|
|
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
|
|
<div class="inheritance">sudoku.structure.Sudoku</div>
|
|
</div>
|
|
<section class="class-description" id="class-description">
|
|
<hr>
|
|
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">Sudoku</span>
|
|
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
|
|
<div class="block">Class : Sudoku
|
|
Brief : Représent un Sudoku</div>
|
|
</section>
|
|
<section class="summary">
|
|
<ul class="summary-list">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<li>
|
|
<section class="constructor-summary" id="constructor-summary">
|
|
<h2>Constructor Summary</h2>
|
|
<div class="caption"><span>Constructors</span></div>
|
|
<div class="summary-table two-column-summary">
|
|
<div class="table-header col-first">Constructor</div>
|
|
<div class="table-header col-last">Description</div>
|
|
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.util.List,java.util.List,java.util.List)" class="member-name-link">Sudoku</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="Cell.html" title="class in sudoku.structure">Cell</a>> cells,
|
|
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="Block.html" title="class in sudoku.structure">Block</a>> blocks,
|
|
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="../constraint/IConstraint.html" title="interface in sudoku.constraint">IConstraint</a>> constraints)</code></div>
|
|
<div class="col-last even-row-color"> </div>
|
|
</div>
|
|
</section>
|
|
</li>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<li>
|
|
<section class="method-summary" id="method-summary">
|
|
<h2>Method Summary</h2>
|
|
<div id="method-summary-table">
|
|
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
|
|
<div id="method-summary-table.tabpanel" role="tabpanel">
|
|
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
|
|
<div class="table-header col-first">Modifier and Type</div>
|
|
<div class="table-header col-second">Method</div>
|
|
<div class="table-header col-last">Description</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#canBePlaced(int,int,int)" class="member-name-link">canBePlaced</a><wbr>(int x,
|
|
int y,
|
|
int value)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Teste si on peut placer la value dans la Cell aux coordonnées x, y d'après
|
|
les contraintes du Sudoku.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><wbr><<a href="Block.html" title="class in sudoku.structure">Block</a>></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getBlocks()" class="member-name-link">getBlocks</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getBlockWidth()" class="member-name-link">getBlockWidth</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Cell.html" title="class in sudoku.structure">Cell</a></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCell(int)" class="member-name-link">getCell</a><wbr>(int i)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Cell.html" title="class in sudoku.structure">Cell</a></code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCell(int,int)" class="member-name-link">getCell</a><wbr>(int x,
|
|
int y)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Renvoie la Cell aux coordonées données.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><wbr><<a href="Cell.html" title="class in sudoku.structure">Cell</a>></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCells()" class="member-name-link">getCells</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><wbr><<a href="../constraint/IConstraint.html" title="interface in sudoku.constraint">IConstraint</a>></code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getConstraints()" class="member-name-link">getConstraints</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Cell.html" title="class in sudoku.structure">Cell</a></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getFirstEmptyCell()" class="member-name-link">getFirstEmptyCell</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Renvoie la 1re Cell vide du Sudoku.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSize()" class="member-name-link">getSize</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hasConstraint(sudoku.constraint.Constraint)" class="member-name-link">hasConstraint</a><wbr>(<a href="../constraint/Constraint.html" title="enum class in sudoku.constraint">Constraint</a> constraint)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isSolved()" class="member-name-link">isSolved</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Vérifie si le Sudoku est résolue, soit complet et cohérent avec ses
|
|
contraintes.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isValidCoords(int)" class="member-name-link">isValidCoords</a><wbr>(int index)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Vérifie que l'index correspond bien à une Cell dans le Sudoku.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isValidCoords(int,int)" class="member-name-link">isValidCoords</a><wbr>(int x,
|
|
int y)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Vérifie que des coordonnées correspondent bien à une Cell dans le Sudoku.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setBlockWidth(int)" class="member-name-link">setBlockWidth</a><wbr>(int blockWidth)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setCellsSymbol(java.util.List)" class="member-name-link">setCellsSymbol</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>> values)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Place les symboles d'index contenus dans values dans les cases du Sudoku.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Cell.html" title="class in sudoku.structure">Cell</a></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setCellSymbol(int,int,int)" class="member-name-link">setCellSymbol</a><wbr>(int x,
|
|
int y,
|
|
int value)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Place le symbole d'index value dans la Cell de coordonnées précisées.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setImmutableCellsSymbol(java.util.List)" class="member-name-link">setImmutableCellsSymbol</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>> values)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Place les symboles d'index contenus dans values dans les cases du Sudoku et
|
|
rend ces cases immuables.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Coordinate.html" title="class in sudoku.structure">Coordinate</a></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toCoords(int)" class="member-name-link">toCoords</a><wbr>(int index)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Transforme un index de Cell en Coordinate.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toIndex(int,int)" class="member-name-link">toIndex</a><wbr>(int x,
|
|
int y)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Transforme des coordonées d'une Cell en index.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="inherited-list">
|
|
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
|
|
<code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="details">
|
|
<ul class="details-list">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<li>
|
|
<section class="constructor-details" id="constructor-detail">
|
|
<h2>Constructor Details</h2>
|
|
<ul class="member-list">
|
|
<li>
|
|
<section class="detail" id="<init>(java.util.List,java.util.List,java.util.List)">
|
|
<h3>Sudoku</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Sudoku</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="Cell.html" title="class in sudoku.structure">Cell</a>> cells,
|
|
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="Block.html" title="class in sudoku.structure">Block</a>> blocks,
|
|
<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="../constraint/IConstraint.html" title="interface in sudoku.constraint">IConstraint</a>> constraints)</span></div>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<li>
|
|
<section class="method-details" id="method-detail">
|
|
<h2>Method Details</h2>
|
|
<ul class="member-list">
|
|
<li>
|
|
<section class="detail" id="toCoords(int)">
|
|
<h3>toCoords</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Coordinate.html" title="class in sudoku.structure">Coordinate</a></span> <span class="element-name">toCoords</span><wbr><span class="parameters">(int index)</span></div>
|
|
<div class="block">Transforme un index de Cell en Coordinate.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>index</code> - int, index d'une Cell.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>Coordinate, correspondante à l'index donné.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="toIndex(int,int)">
|
|
<h3>toIndex</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">toIndex</span><wbr><span class="parameters">(int x,
|
|
int y)</span></div>
|
|
<div class="block">Transforme des coordonées d'une Cell en index.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>x</code> - int, abscisse.</dd>
|
|
<dd><code>y</code> - int, ordonnée.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>int, index correspondant.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="isValidCoords(int,int)">
|
|
<h3>isValidCoords</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isValidCoords</span><wbr><span class="parameters">(int x,
|
|
int y)</span></div>
|
|
<div class="block">Vérifie que des coordonnées correspondent bien à une Cell dans le Sudoku.</div>
|
|
<dl class="notes">
|
|
<dt>Returns:</dt>
|
|
<dd>boolean, valant true si les coordonnées sont dans les bornes du
|
|
Sudoku, false sinon.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="isValidCoords(int)">
|
|
<h3>isValidCoords</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isValidCoords</span><wbr><span class="parameters">(int index)</span></div>
|
|
<div class="block">Vérifie que l'index correspond bien à une Cell dans le Sudoku.</div>
|
|
<dl class="notes">
|
|
<dt>Returns:</dt>
|
|
<dd>boolean, valant true si l'index est dans les bornes du Sudoku, false
|
|
sinon.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="canBePlaced(int,int,int)">
|
|
<h3>canBePlaced</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">canBePlaced</span><wbr><span class="parameters">(int x,
|
|
int y,
|
|
int value)</span></div>
|
|
<div class="block">Teste si on peut placer la value dans la Cell aux coordonnées x, y d'après
|
|
les contraintes du Sudoku.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>x</code> - int, abscisse de la Cell voulue.</dd>
|
|
<dd><code>y</code> - int, ordonnée de la Cell voulue.</dd>
|
|
<dd><code>value</code> - int, index du symbole qu'on veut placer.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>boolean, true si on peut la placer et false sinon.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="isSolved()">
|
|
<h3>isSolved</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isSolved</span>()</div>
|
|
<div class="block">Vérifie si le Sudoku est résolue, soit complet et cohérent avec ses
|
|
contraintes.</div>
|
|
<dl class="notes">
|
|
<dt>Returns:</dt>
|
|
<dd>boolean, valant true si le Sudoku est résolu, false sinon.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getCell(int,int)">
|
|
<h3>getCell</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Cell.html" title="class in sudoku.structure">Cell</a></span> <span class="element-name">getCell</span><wbr><span class="parameters">(int x,
|
|
int y)</span></div>
|
|
<div class="block">Renvoie la Cell aux coordonées données.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>x</code> - int, abscisse.</dd>
|
|
<dd><code>y</code> - int, ordonnée.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>Cell, si une Cell existe aux coordonnées données, null sinon.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getFirstEmptyCell()">
|
|
<h3>getFirstEmptyCell</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Cell.html" title="class in sudoku.structure">Cell</a></span> <span class="element-name">getFirstEmptyCell</span>()</div>
|
|
<div class="block">Renvoie la 1re Cell vide du Sudoku.</div>
|
|
<dl class="notes">
|
|
<dt>Returns:</dt>
|
|
<dd>Cell, une Cell vide, ou null s'il n'y en a pas.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="setCellSymbol(int,int,int)">
|
|
<h3>setCellSymbol</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Cell.html" title="class in sudoku.structure">Cell</a></span> <span class="element-name">setCellSymbol</span><wbr><span class="parameters">(int x,
|
|
int y,
|
|
int value)</span></div>
|
|
<div class="block">Place le symbole d'index value dans la Cell de coordonnées précisées.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>x</code> - int, abscisse de la Cell voulue.</dd>
|
|
<dd><code>y</code> - int, coordonnée de la Cell voulue.</dd>
|
|
<dd><code>value</code> - int, index du symbole à placer.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>Cell, la Cell qui a été modifiée.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="setCellsSymbol(java.util.List)">
|
|
<h3>setCellsSymbol</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">setCellsSymbol</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>> values)</span></div>
|
|
<div class="block">Place les symboles d'index contenus dans values dans les cases du Sudoku.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>values</code> - List~Integer~, liste des index des symboles à placer.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>boolean, vaut true si les symboles ont été placés, false sinon.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="setImmutableCellsSymbol(java.util.List)">
|
|
<h3>setImmutableCellsSymbol</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">setImmutableCellsSymbol</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>> values)</span></div>
|
|
<div class="block">Place les symboles d'index contenus dans values dans les cases du Sudoku et
|
|
rend ces cases immuables.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>values</code> - List~Integer~, liste des index des symboles à placer.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>boolean, vaut true si les symboles ont été placés, false sinon.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="hasConstraint(sudoku.constraint.Constraint)">
|
|
<h3>hasConstraint</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">hasConstraint</span><wbr><span class="parameters">(<a href="../constraint/Constraint.html" title="enum class in sudoku.constraint">Constraint</a> constraint)</span></div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getCell(int)">
|
|
<h3>getCell</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Cell.html" title="class in sudoku.structure">Cell</a></span> <span class="element-name">getCell</span><wbr><span class="parameters">(int i)</span></div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getSize()">
|
|
<h3>getSize</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getSize</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getCells()">
|
|
<h3>getCells</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="Cell.html" title="class in sudoku.structure">Cell</a>></span> <span class="element-name">getCells</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getBlocks()">
|
|
<h3>getBlocks</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="Block.html" title="class in sudoku.structure">Block</a>></span> <span class="element-name">getBlocks</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getConstraints()">
|
|
<h3>getConstraints</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="../constraint/IConstraint.html" title="interface in sudoku.constraint">IConstraint</a>></span> <span class="element-name">getConstraints</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getBlockWidth()">
|
|
<h3>getBlockWidth</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getBlockWidth</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="setBlockWidth(int)">
|
|
<h3>setBlockWidth</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setBlockWidth</span><wbr><span class="parameters">(int blockWidth)</span></div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="toString()">
|
|
<h3>toString</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">toString</span>()</div>
|
|
<dl class="notes">
|
|
<dt>Overrides:</dt>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a></code> in class <code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|