Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Louis FUNCK BRENTANO
Sudoku
Commits
d5785595
Commit
d5785595
authored
May 28, 2021
by
Maël RENAULT
Browse files
Update IHM_Sudoku.py
parent
cd05d8bc
Changes
1
Show whitespace changes
Inline
Side-by-side
IHM_Sudoku.py
View file @
d5785595
...
...
@@ -98,10 +98,16 @@ class Grille_sudoku(QWidget):
item
,
ok
=
QInputDialog
.
getItem
(
self
,
"Choix du Chiffre"
,
"Chiffres"
,
items
,
0
,
False
)
if
ok
and
item
:
ordi
=
Ordinateur
()
ordi
.
solve
(
self
.
grille_utilise
)
grille_solution
=
ordi
.
solution
[
0
]
pos
=
list
(
locate
(
self
.
digitButtons
,
lambda
x
:
x
==
clickedButton
))
pos
=
pos
[
0
]
self
.
grille_utilise
[
pos
//
9
,
pos
-
9
*
(
pos
//
9
)]
=
item
if
grille_solution
[
pos
%
9
,
pos
//
9
]
==
int
(
item
):
self
.
grille_utilise
[
pos
%
9
,
pos
//
9
]
=
int
(
item
)
clickedButton
.
setText
(
item
)
else
:
print
(
"erreur"
)
def
nouvelle_grille
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment