Dogeku 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +39 -0
  4. data/app/Historique/Action.rb +29 -0
  5. data/app/Historique/ChangerCase.rb +44 -0
  6. data/app/Historique/HistoriqueAction.rb +114 -0
  7. data/app/components/CaseDessin.rb +325 -0
  8. data/app/components/GrilleDessin.rb +235 -0
  9. data/app/components/Header.rb +194 -0
  10. data/app/config/app.yml +0 -0
  11. data/app/config/database.yml +2 -0
  12. data/app/controller/ApprentissageControleur.rb +75 -0
  13. data/app/controller/ChargerControleur.rb +41 -0
  14. data/app/controller/JeuLibreControleur.rb +244 -0
  15. data/app/controller/MenuControleur.rb +57 -0
  16. data/app/controller/NiveauControleur.rb +54 -0
  17. data/app/controller/NouvellePartieControleur.rb +34 -0
  18. data/app/controller/PrincipaleControleur.rb +30 -0
  19. data/app/controller/PseudoControleur.rb +95 -0
  20. data/app/controller/ReglagesControleur.rb +86 -0
  21. data/app/controller/ReglesControleur.rb +34 -0
  22. data/app/controller/ScoresControleur.rb +42 -0
  23. data/app/controller/StatistiquesControleur.rb +64 -0
  24. data/app/core/Conf.rb +26 -0
  25. data/app/core/Controller.rb +180 -0
  26. data/app/core/Core.rb +186 -0
  27. data/app/core/Model.rb +159 -0
  28. data/app/core/View.rb +56 -0
  29. data/app/db/main.sqlite3 +0 -0
  30. data/app/model/Configuration.rb +180 -0
  31. data/app/model/Grille.rb +180 -0
  32. data/app/model/Jeu.rb +74 -0
  33. data/app/model/Score.rb +100 -0
  34. data/app/model/Utilisateur.rb +113 -0
  35. data/app/utils/DSubset.rb +98 -0
  36. data/app/utils/Generateur.rb +171 -0
  37. data/app/utils/HPTriple.rb +75 -0
  38. data/app/utils/Peche.rb +46 -0
  39. data/app/utils/SCandidate.rb +86 -0
  40. data/app/utils/SCell.rb +73 -0
  41. data/app/utils/Technique.rb +202 -0
  42. data/app/utils/TechniqueUsine.rb +25 -0
  43. data/app/utils/XWing.rb +203 -0
  44. data/app/view/Fenetre.rb +424 -0
  45. data/app/view/FenetreApprentissage.rb +272 -0
  46. data/app/view/FenetreCharger.rb +31 -0
  47. data/app/view/FenetreJeuLibre.rb +468 -0
  48. data/app/view/FenetreMenu.rb +198 -0
  49. data/app/view/FenetreNiveau.rb +105 -0
  50. data/app/view/FenetreNouvellePartie.rb +92 -0
  51. data/app/view/FenetrePrincipale.rb +45 -0
  52. data/app/view/FenetrePseudo.rb +115 -0
  53. data/app/view/FenetreReglages.rb +209 -0
  54. data/app/view/FenetreRegles.rb +111 -0
  55. data/app/view/FenetreScores.rb +120 -0
  56. data/app/view/FenetreStatistiques.rb +134 -0
  57. data/assets/css/style.css +69 -0
  58. data/assets/img/eraser.png +0 -0
  59. data/assets/img/fond.jpg +0 -0
  60. data/assets/img/iconApp.png +0 -0
  61. data/assets/img/logoS.jpeg +0 -0
  62. data/assets/img/sudokuIntro.jpg +0 -0
  63. data/assets/img/user.png +0 -0
  64. data/bin/dogeku +19 -0
  65. data/doc/Action.html +309 -0
  66. data/doc/ApprentissageControleur.html +568 -0
  67. data/doc/CaseDessin.html +2405 -0
  68. data/doc/ChangerCase.html +405 -0
  69. data/doc/ChargerControleur.html +342 -0
  70. data/doc/Conf.html +378 -0
  71. data/doc/Configuration.html +1115 -0
  72. data/doc/Controller.html +1008 -0
  73. data/doc/Core.html +1191 -0
  74. data/doc/DSubset.html +647 -0
  75. data/doc/Fenetre.html +2631 -0
  76. data/doc/FenetreApprentissage.html +1175 -0
  77. data/doc/FenetreCharger.html +343 -0
  78. data/doc/FenetreJeuLibre.html +1859 -0
  79. data/doc/FenetreMenu.html +900 -0
  80. data/doc/FenetreNiveau.html +626 -0
  81. data/doc/FenetreNouvellePartie.html +602 -0
  82. data/doc/FenetrePrincipale.html +371 -0
  83. data/doc/FenetrePseudo.html +695 -0
  84. data/doc/FenetreReglages.html +946 -0
  85. data/doc/FenetreRegles.html +636 -0
  86. data/doc/FenetreScores.html +650 -0
  87. data/doc/FenetreStatistiques.html +672 -0
  88. data/doc/Generateur.html +1015 -0
  89. data/doc/Grille.html +1348 -0
  90. data/doc/GrilleDessin.html +1281 -0
  91. data/doc/HPTriple.html +593 -0
  92. data/doc/Header.html +1253 -0
  93. data/doc/HistoriqueAction.html +792 -0
  94. data/doc/Jeu.html +923 -0
  95. data/doc/JeuLibreControleur.html +1445 -0
  96. data/doc/MenuControleur.html +522 -0
  97. data/doc/Model.html +996 -0
  98. data/doc/NiveauControleur.html +451 -0
  99. data/doc/NouvellePartieControleur.html +330 -0
  100. data/doc/Peche.html +396 -0
  101. data/doc/PrincipaleControleur.html +320 -0
  102. data/doc/PseudoControleur.html +695 -0
  103. data/doc/ReglagesControleur.html +747 -0
  104. data/doc/ReglesControleur.html +330 -0
  105. data/doc/SCandidate.html +617 -0
  106. data/doc/SCell.html +587 -0
  107. data/doc/Score.html +926 -0
  108. data/doc/ScoresControleur.html +346 -0
  109. data/doc/StatistiquesControleur.html +390 -0
  110. data/doc/Technique.html +543 -0
  111. data/doc/TechniqueUsine.html +252 -0
  112. data/doc/Utilisateur.html +806 -0
  113. data/doc/View.html +844 -0
  114. data/doc/XWing.html +1031 -0
  115. data/doc/_index.html +478 -0
  116. data/doc/class_list.html +51 -0
  117. data/doc/css/common.css +1 -0
  118. data/doc/css/full_list.css +58 -0
  119. data/doc/css/style.css +492 -0
  120. data/doc/file.README.html +141 -0
  121. data/doc/file_list.html +56 -0
  122. data/doc/frames.html +17 -0
  123. data/doc/index.html +141 -0
  124. data/doc/js/app.js +243 -0
  125. data/doc/js/full_list.js +216 -0
  126. data/doc/js/jquery.js +4 -0
  127. data/doc/method_list.html +2523 -0
  128. data/doc/top-level-namespace.html +112 -0
  129. data/test/Generateur/grilleCorrecte.rb +198 -0
  130. data/test/Model/scoreCorrecte.rb +55 -0
  131. data/test/Model/utilisateurCorrecte.rb +68 -0
  132. data/test/test_helper.rb +2 -0
  133. data/test/unitTest.rb +72 -0
  134. metadata +187 -0
@@ -0,0 +1,330 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: ReglesControleur
8
+
9
+ &mdash; Documentation by YARD 0.9.8
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "ReglesControleur";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (R)</a> &raquo;
40
+
41
+
42
+ <span class="title">ReglesControleur</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: ReglesControleur
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Controller.html" title="Controller (class)">Controller</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Controller.html" title="Controller (class)">Controller</a></span></li>
78
+
79
+ <li class="next">ReglesControleur</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>app/controller/ReglesControleur.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Classe permettant de créer un contrôleur pour la vue FenetreRegles</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>
124
+ Instance Method Summary
125
+ <small><a href="#" class="summary_toggle">collapse</a></small>
126
+ </h2>
127
+
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; ReglesControleur </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+ <span class="note title constructor">constructor</span>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'>
150
+ <p>Initialize.</p>
151
+ </div></span>
152
+
153
+ </li>
154
+
155
+
156
+ <li class="public ">
157
+ <span class="summary_signature">
158
+
159
+ <a href="#run-instance_method" title="#run (instance method)">#<strong>run</strong> &#x21d2; Object </a>
160
+
161
+
162
+
163
+ </span>
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ <span class="summary_desc"><div class='inline'>
174
+ <p>Méthode à définir dans tous les cas !.</p>
175
+ </div></span>
176
+
177
+ </li>
178
+
179
+
180
+ </ul>
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Controller.html" title="Controller (class)">Controller</a></span></h3>
193
+ <p class="inherited"><span class='object_link'><a href="Controller.html#inherited-class_method" title="Controller.inherited (method)">inherited</a></span>, <span class='object_link'><a href="Controller.html#loadFile-instance_method" title="Controller#loadFile (method)">#loadFile</a></span>, <span class='object_link'><a href="Controller.html#loadModel-instance_method" title="Controller#loadModel (method)">#loadModel</a></span>, <span class='object_link'><a href="Controller.html#render-instance_method" title="Controller#render (method)">#render</a></span>, <span class='object_link'><a href="Controller.html#set_properties-instance_method" title="Controller#set_properties (method)">#set_properties</a></span></p>
194
+ <div id="constructor_details" class="method_details_list">
195
+ <h2>Constructor Details</h2>
196
+
197
+ <div class="method_details first">
198
+ <h3 class="signature first" id="initialize-instance_method">
199
+
200
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="ReglesControleur (class)">ReglesControleur</a></span></tt>
201
+
202
+
203
+
204
+
205
+
206
+ </h3><div class="docstring">
207
+ <div class="discussion">
208
+
209
+ <p>Initialize</p>
210
+
211
+
212
+ </div>
213
+ </div>
214
+ <div class="tags">
215
+
216
+
217
+ </div><table class="source_code">
218
+ <tr>
219
+ <td>
220
+ <pre class="lines">
221
+
222
+
223
+ 15
224
+ 16
225
+ 17
226
+ 18
227
+ 19
228
+ 20
229
+ 21
230
+ 22
231
+ 23
232
+ 24</pre>
233
+ </td>
234
+ <td>
235
+ <pre class="code"><span class="info file"># File 'app/controller/ReglesControleur.rb', line 15</span>
236
+
237
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='rparen'>)</span>
238
+ <span class='comment'>#charge le modèle utilisateur
239
+ </span> <span class='id identifier rubyid_loadModel'>loadModel</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Utilisateur</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
240
+ <span class='comment'>#paramètres fenêtre
241
+ </span> <span class='ivar'>@title</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Sudoku - Règles</span><span class='tstring_end'>&quot;</span></span>
242
+ <span class='ivar'>@width</span> <span class='op'>=</span> <span class='int'>600</span>
243
+ <span class='ivar'>@height</span> <span class='op'>=</span> <span class='int'>550</span>
244
+ <span class='ivar'>@resizable</span> <span class='op'>=</span> <span class='kw'>false</span>
245
+ <span class='ivar'>@position</span><span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>CENTER_ALWAYS</span><span class='tstring_end'>&quot;</span></span>
246
+ <span class='kw'>end</span></pre>
247
+ </td>
248
+ </tr>
249
+ </table>
250
+ </div>
251
+
252
+ </div>
253
+
254
+
255
+ <div id="instance_method_details" class="method_details_list">
256
+ <h2>Instance Method Details</h2>
257
+
258
+
259
+ <div class="method_details first">
260
+ <h3 class="signature first" id="run-instance_method">
261
+
262
+ #<strong>run</strong> &#x21d2; <tt>Object</tt>
263
+
264
+
265
+
266
+
267
+
268
+ </h3><div class="docstring">
269
+ <div class="discussion">
270
+
271
+ <p>Méthode à définir dans tous les cas !</p>
272
+
273
+
274
+ </div>
275
+ </div>
276
+ <div class="tags">
277
+
278
+ <p class="tag_title">Returns:</p>
279
+ <ul class="return">
280
+
281
+ <li>
282
+
283
+
284
+ <span class='type'></span>
285
+
286
+
287
+
288
+
289
+ <div class='inline'>
290
+ <p>self</p>
291
+ </div>
292
+
293
+ </li>
294
+
295
+ </ul>
296
+
297
+ </div><table class="source_code">
298
+ <tr>
299
+ <td>
300
+ <pre class="lines">
301
+
302
+
303
+ 31
304
+ 32
305
+ 33</pre>
306
+ </td>
307
+ <td>
308
+ <pre class="code"><span class="info file"># File 'app/controller/ReglesControleur.rb', line 31</span>
309
+
310
+ <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='rparen'>)</span>
311
+ <span class='kw'>return</span> <span class='kw'>self</span>
312
+ <span class='kw'>end</span></pre>
313
+ </td>
314
+ </tr>
315
+ </table>
316
+ </div>
317
+
318
+ </div>
319
+
320
+ </div>
321
+
322
+ <div id="footer">
323
+ Generated on Sat Apr 22 22:47:32 2017 by
324
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
325
+ 0.9.8 (ruby-2.3.3).
326
+ </div>
327
+
328
+ </div>
329
+ </body>
330
+ </html>
@@ -0,0 +1,617 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: SCandidate
8
+
9
+ &mdash; Documentation by YARD 0.9.8
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "SCandidate";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (S)</a> &raquo;
40
+
41
+
42
+ <span class="title">SCandidate</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: SCandidate
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Technique.html" title="Technique (class)">Technique</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Technique.html" title="Technique (class)">Technique</a></span></li>
78
+
79
+ <li class="next">SCandidate</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>app/utils/SCandidate.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Classe pour la technique &#39;Single Candidate&#39;.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>
124
+ Class Method Summary
125
+ <small><a href="#" class="summary_toggle">collapse</a></small>
126
+ </h2>
127
+
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#creer-class_method" title="creer (class method)">.<strong>creer</strong> &#x21d2; Object </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'>
148
+ <p>Constructeur de la classe SCandidate.</p>
149
+ </div></span>
150
+
151
+ </li>
152
+
153
+
154
+ </ul>
155
+
156
+ <h2>
157
+ Instance Method Summary
158
+ <small><a href="#" class="summary_toggle">collapse</a></small>
159
+ </h2>
160
+
161
+ <ul class="summary">
162
+
163
+ <li class="public ">
164
+ <span class="summary_signature">
165
+
166
+ <a href="#combienEtape-instance_method" title="#combienEtape (instance method)">#<strong>combienEtape</strong> &#x21d2; Object </a>
167
+
168
+
169
+
170
+ </span>
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <span class="summary_desc"><div class='inline'>
181
+ <p>Retourne le nombre d&#39;étapes pour faire la technique.</p>
182
+ </div></span>
183
+
184
+ </li>
185
+
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#etape-instance_method" title="#etape (instance method)">#<strong>etape</strong>(n) &#x21d2; Object </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ <span class="summary_desc"><div class='inline'>
205
+ <p>Retourne les étapes pour faire la technique.</p>
206
+ </div></span>
207
+
208
+ </li>
209
+
210
+
211
+ <li class="public ">
212
+ <span class="summary_signature">
213
+
214
+ <a href="#solution-instance_method" title="#solution (instance method)">#<strong>solution</strong>(grille) &#x21d2; Object </a>
215
+
216
+
217
+
218
+ </span>
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+ <span class="summary_desc"><div class='inline'>
229
+ <p>Recherche une solution pour la technique utilisée.</p>
230
+ </div></span>
231
+
232
+ </li>
233
+
234
+
235
+ </ul>
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+ <div id="class_method_details" class="method_details_list">
247
+ <h2>Class Method Details</h2>
248
+
249
+
250
+ <div class="method_details first">
251
+ <h3 class="signature first" id="creer-class_method">
252
+
253
+ .<strong>creer</strong> &#x21d2; <tt>Object</tt>
254
+
255
+
256
+
257
+
258
+
259
+ </h3><div class="docstring">
260
+ <div class="discussion">
261
+
262
+ <p>Constructeur de la classe SCandidate</p>
263
+
264
+
265
+ </div>
266
+ </div>
267
+ <div class="tags">
268
+
269
+ <p class="tag_title">Returns:</p>
270
+ <ul class="return">
271
+
272
+ <li>
273
+
274
+
275
+ <span class='type'></span>
276
+
277
+
278
+
279
+
280
+ <div class='inline'>
281
+ <p>Une instance de la classe SCandidate</p>
282
+ </div>
283
+
284
+ </li>
285
+
286
+ </ul>
287
+
288
+ </div><table class="source_code">
289
+ <tr>
290
+ <td>
291
+ <pre class="lines">
292
+
293
+
294
+ 16
295
+ 17
296
+ 18</pre>
297
+ </td>
298
+ <td>
299
+ <pre class="code"><span class="info file"># File 'app/utils/SCandidate.rb', line 16</span>
300
+
301
+ <span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="SCandidate (class)">SCandidate</a></span></span><span class='period'>.</span><span class='id identifier rubyid_creer'>creer</span><span class='lparen'>(</span><span class='rparen'>)</span>
302
+ <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='rparen'>)</span>
303
+ <span class='kw'>end</span></pre>
304
+ </td>
305
+ </tr>
306
+ </table>
307
+ </div>
308
+
309
+ </div>
310
+
311
+ <div id="instance_method_details" class="method_details_list">
312
+ <h2>Instance Method Details</h2>
313
+
314
+
315
+ <div class="method_details first">
316
+ <h3 class="signature first" id="combienEtape-instance_method">
317
+
318
+ #<strong>combienEtape</strong> &#x21d2; <tt>Object</tt>
319
+
320
+
321
+
322
+
323
+
324
+ </h3><div class="docstring">
325
+ <div class="discussion">
326
+
327
+ <p>Retourne le nombre d&#39;étapes pour faire la technique</p>
328
+
329
+
330
+ </div>
331
+ </div>
332
+ <div class="tags">
333
+
334
+ <p class="tag_title">Returns:</p>
335
+ <ul class="return">
336
+
337
+ <li>
338
+
339
+
340
+ <span class='type'></span>
341
+
342
+
343
+
344
+
345
+ <div class='inline'>
346
+ <p>Le nombre d&#39;étapes</p>
347
+ </div>
348
+
349
+ </li>
350
+
351
+ </ul>
352
+
353
+ </div><table class="source_code">
354
+ <tr>
355
+ <td>
356
+ <pre class="lines">
357
+
358
+
359
+ 64
360
+ 65
361
+ 66</pre>
362
+ </td>
363
+ <td>
364
+ <pre class="code"><span class="info file"># File 'app/utils/SCandidate.rb', line 64</span>
365
+
366
+ <span class='kw'>def</span> <span class='id identifier rubyid_combienEtape'>combienEtape</span><span class='lparen'>(</span><span class='rparen'>)</span>
367
+ <span class='kw'>return</span> <span class='int'>2</span>
368
+ <span class='kw'>end</span></pre>
369
+ </td>
370
+ </tr>
371
+ </table>
372
+ </div>
373
+
374
+ <div class="method_details ">
375
+ <h3 class="signature " id="etape-instance_method">
376
+
377
+ #<strong>etape</strong>(n) &#x21d2; <tt>Object</tt>
378
+
379
+
380
+
381
+
382
+
383
+ </h3><div class="docstring">
384
+ <div class="discussion">
385
+
386
+ <p>Retourne les étapes pour faire la technique</p>
387
+
388
+
389
+ </div>
390
+ </div>
391
+ <div class="tags">
392
+ <p class="tag_title">Parameters:</p>
393
+ <ul class="param">
394
+
395
+ <li>
396
+
397
+ <span class='name'>n</span>
398
+
399
+
400
+ <span class='type'></span>
401
+
402
+
403
+
404
+ &mdash;
405
+ <div class='inline'>
406
+ <p>Le numéro de la technique</p>
407
+ </div>
408
+
409
+ </li>
410
+
411
+ </ul>
412
+
413
+ <p class="tag_title">Returns:</p>
414
+ <ul class="return">
415
+
416
+ <li>
417
+
418
+
419
+ <span class='type'></span>
420
+
421
+
422
+
423
+
424
+ <div class='inline'>
425
+ <p>Un texte expliquant l&#39;étape sinon nil</p>
426
+ </div>
427
+
428
+ </li>
429
+
430
+ </ul>
431
+
432
+ </div><table class="source_code">
433
+ <tr>
434
+ <td>
435
+ <pre class="lines">
436
+
437
+
438
+ 75
439
+ 76
440
+ 77
441
+ 78
442
+ 79
443
+ 80
444
+ 81
445
+ 82
446
+ 83
447
+ 84
448
+ 85</pre>
449
+ </td>
450
+ <td>
451
+ <pre class="code"><span class="info file"># File 'app/utils/SCandidate.rb', line 75</span>
452
+
453
+ <span class='kw'>def</span> <span class='id identifier rubyid_etape'>etape</span><span class='lparen'>(</span><span class='id identifier rubyid_n'>n</span><span class='rparen'>)</span>
454
+
455
+ <span class='kw'>case</span><span class='lparen'>(</span><span class='id identifier rubyid_n'>n</span><span class='rparen'>)</span>
456
+ <span class='kw'>when</span> <span class='int'>1</span>
457
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Bienvenue sur l&#39;explication de la technique </span><span class='tstring_end'>&quot;</span></span><span class='op'>+</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='op'>+</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span>
458
+ <span class='kw'>when</span> <span class='int'>2</span>
459
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Recherchez les candidats possibles pour chaque case d&#39;une ligne/colonne. Remarquez que dans certaines, un candidat n&#39;est possible que dans une seule case de la ligne/colonne.</span><span class='tstring_end'>&quot;</span></span>
460
+ <span class='kw'>end</span>
461
+
462
+ <span class='kw'>return</span> <span class='kw'>nil</span>
463
+ <span class='kw'>end</span></pre>
464
+ </td>
465
+ </tr>
466
+ </table>
467
+ </div>
468
+
469
+ <div class="method_details ">
470
+ <h3 class="signature " id="solution-instance_method">
471
+
472
+ #<strong>solution</strong>(grille) &#x21d2; <tt>Object</tt>
473
+
474
+
475
+
476
+
477
+
478
+ </h3><div class="docstring">
479
+ <div class="discussion">
480
+
481
+ <p>Recherche une solution pour la technique utilisée</p>
482
+
483
+
484
+ </div>
485
+ </div>
486
+ <div class="tags">
487
+ <p class="tag_title">Parameters:</p>
488
+ <ul class="param">
489
+
490
+ <li>
491
+
492
+ <span class='name'>grille</span>
493
+
494
+
495
+ <span class='type'></span>
496
+
497
+
498
+
499
+ &mdash;
500
+ <div class='inline'>
501
+ <p>La grille</p>
502
+ </div>
503
+
504
+ </li>
505
+
506
+ </ul>
507
+
508
+ <p class="tag_title">Returns:</p>
509
+ <ul class="return">
510
+
511
+ <li>
512
+
513
+
514
+ <span class='type'></span>
515
+
516
+
517
+
518
+
519
+ <div class='inline'>
520
+ <p>res, les informations pour aider l&#39;utilisateur ou nil si la méthode ne
521
+ trouve rien</p>
522
+ </div>
523
+
524
+ </li>
525
+
526
+ </ul>
527
+
528
+ </div><table class="source_code">
529
+ <tr>
530
+ <td>
531
+ <pre class="lines">
532
+
533
+
534
+ 27
535
+ 28
536
+ 29
537
+ 30
538
+ 31
539
+ 32
540
+ 33
541
+ 34
542
+ 35
543
+ 36
544
+ 37
545
+ 38
546
+ 39
547
+ 40
548
+ 41
549
+ 42
550
+ 43
551
+ 44
552
+ 45
553
+ 46
554
+ 47
555
+ 48
556
+ 49
557
+ 50
558
+ 51
559
+ 52
560
+ 53
561
+ 54
562
+ 55
563
+ 56
564
+ 57</pre>
565
+ </td>
566
+ <td>
567
+ <pre class="code"><span class="info file"># File 'app/utils/SCandidate.rb', line 27</span>
568
+
569
+ <span class='kw'>def</span> <span class='id identifier rubyid_solution'>solution</span><span class='lparen'>(</span><span class='id identifier rubyid_grille'>grille</span><span class='rparen'>)</span>
570
+ <span class='id identifier rubyid_grilleIndice'>grilleIndice</span> <span class='op'>=</span> <span class='id identifier rubyid_indice'>indice</span><span class='lparen'>(</span><span class='id identifier rubyid_grille'>grille</span><span class='rparen'>)</span>
571
+
572
+ <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span><span class='int'>2</span><span class='comma'>,</span><span class='int'>3</span><span class='comma'>,</span><span class='int'>4</span><span class='comma'>,</span><span class='int'>5</span><span class='comma'>,</span><span class='int'>6</span><span class='comma'>,</span><span class='int'>7</span><span class='comma'>,</span><span class='int'>8</span><span class='comma'>,</span><span class='int'>9</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lbrace'>{</span><span class='id identifier rubyid_rand'>rand</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_numero'>numero</span><span class='op'>|</span>
573
+ <span class='id identifier rubyid_grilleIndice'>grilleIndice</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lbrace'>{</span><span class='id identifier rubyid_rand'>rand</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='comma'>,</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span>
574
+ <span class='id identifier rubyid_cpt'>cpt</span><span class='op'>=</span><span class='int'>0</span>
575
+ <span class='id identifier rubyid_ytmp'>ytmp</span><span class='op'>=</span><span class='int'>0</span>
576
+ <span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lbrace'>{</span><span class='id identifier rubyid_rand'>rand</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='comma'>,</span><span class='id identifier rubyid_y'>y</span><span class='op'>|</span>
577
+ <span class='kw'>if</span> <span class='id identifier rubyid_c'>c</span><span class='lbracket'>[</span><span class='id identifier rubyid_numero'>numero</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='kw'>then</span>
578
+ <span class='id identifier rubyid_cpt'>cpt</span> <span class='op'>+=</span><span class='int'>1</span>
579
+ <span class='id identifier rubyid_ytmp'>ytmp</span> <span class='op'>=</span> <span class='id identifier rubyid_y'>y</span>
580
+ <span class='kw'>end</span>
581
+ <span class='rbrace'>}</span>
582
+ <span class='kw'>if</span> <span class='id identifier rubyid_cpt'>cpt</span> <span class='op'>==</span> <span class='int'>1</span> <span class='kw'>then</span> <span class='kw'>return</span> <span class='lbracket'>[</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span><span class='id identifier rubyid_ytmp'>ytmp</span><span class='comma'>,</span><span class='id identifier rubyid_numero'>numero</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='kw'>end</span>
583
+ <span class='rbrace'>}</span>
584
+
585
+ <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span><span class='int'>1</span><span class='comma'>,</span><span class='int'>2</span><span class='comma'>,</span><span class='int'>3</span><span class='comma'>,</span><span class='int'>4</span><span class='comma'>,</span><span class='int'>5</span><span class='comma'>,</span><span class='int'>6</span><span class='comma'>,</span><span class='int'>7</span><span class='comma'>,</span><span class='int'>8</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lbrace'>{</span><span class='id identifier rubyid_rand'>rand</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_y'>y</span><span class='op'>|</span>
586
+ <span class='id identifier rubyid_cpt'>cpt</span><span class='op'>=</span><span class='int'>0</span>
587
+ <span class='id identifier rubyid_xtmp'>xtmp</span><span class='op'>=</span><span class='int'>0</span>
588
+ <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span><span class='int'>1</span><span class='comma'>,</span><span class='int'>2</span><span class='comma'>,</span><span class='int'>3</span><span class='comma'>,</span><span class='int'>4</span><span class='comma'>,</span><span class='int'>5</span><span class='comma'>,</span><span class='int'>6</span><span class='comma'>,</span><span class='int'>7</span><span class='comma'>,</span><span class='int'>8</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lbrace'>{</span><span class='id identifier rubyid_rand'>rand</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span>
589
+ <span class='kw'>if</span> <span class='id identifier rubyid_grilleIndice'>grilleIndice</span><span class='lbracket'>[</span><span class='id identifier rubyid_x'>x</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_y'>y</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_numero'>numero</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='kw'>then</span>
590
+ <span class='id identifier rubyid_cpt'>cpt</span> <span class='op'>+=</span><span class='int'>1</span>
591
+ <span class='id identifier rubyid_xtmp'>xtmp</span> <span class='op'>=</span> <span class='id identifier rubyid_x'>x</span>
592
+ <span class='kw'>end</span>
593
+ <span class='rbrace'>}</span>
594
+ <span class='kw'>if</span> <span class='id identifier rubyid_cpt'>cpt</span> <span class='op'>==</span> <span class='int'>1</span> <span class='kw'>then</span> <span class='kw'>return</span> <span class='lbracket'>[</span><span class='id identifier rubyid_xtmp'>xtmp</span><span class='comma'>,</span><span class='id identifier rubyid_y'>y</span><span class='comma'>,</span><span class='id identifier rubyid_numero'>numero</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='kw'>end</span>
595
+ <span class='rbrace'>}</span>
596
+ <span class='rbrace'>}</span>
597
+
598
+ <span class='kw'>return</span> <span class='kw'>nil</span>
599
+ <span class='kw'>end</span></pre>
600
+ </td>
601
+ </tr>
602
+ </table>
603
+ </div>
604
+
605
+ </div>
606
+
607
+ </div>
608
+
609
+ <div id="footer">
610
+ Generated on Sat Apr 22 22:47:31 2017 by
611
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
612
+ 0.9.8 (ruby-2.3.3).
613
+ </div>
614
+
615
+ </div>
616
+ </body>
617
+ </html>