Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Momomotus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pouchet Pierre
Momomotus
Commits
1eacbc89
Commit
1eacbc89
authored
1 month ago
by
Massies Alexandre
Browse files
Options
Downloads
Patches
Plain Diff
animation fonctionnelle
parent
1c7034b2
Loading
Loading
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Motus/Main.qml
+5
-4
5 additions, 4 deletions
Motus/Main.qml
Motus/motusgame.cpp
+1
-1
1 addition, 1 deletion
Motus/motusgame.cpp
with
6 additions
and
5 deletions
Motus/Main.qml
+
5
−
4
View file @
1eacbc89
...
@@ -60,10 +60,10 @@ Window {
...
@@ -60,10 +60,10 @@ Window {
if
(
indice_case
===
nb_lettres
)
{
if
(
indice_case
===
nb_lettres
)
{
var
mot_entre
=
""
;
var
mot_entre
=
""
;
for
(
var
i
=
0
;
i
<
nb_lettres
;
i
++
){
for
(
var
i
=
0
;
i
<
nb_lettres
;
i
++
){
mot_entre
+=
caseArray
[
current_essai
*
nb_lettres
+
indice_case
];
mot_entre
+=
caseArray
[
current_essai
*
nb_lettres
+
indice_case
]
.
_textText
;
}
}
if
(
motusGame
.
existWord
(
mot_entre
)){
if
(
motusGame
.
existWord
(
mot_entre
.
toUpperCase
()
)){
// Vérification de la proposition sur la ligne actuelle
// Vérification de la proposition sur la ligne actuelle
for
(
i
=
0
;
i
<
nb_lettres
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_lettres
;
i
++
)
{
var
case_verif
=
caseArray
[
current_essai
*
nb_lettres
+
i
];
var
case_verif
=
caseArray
[
current_essai
*
nb_lettres
+
i
];
...
@@ -112,8 +112,9 @@ Window {
...
@@ -112,8 +112,9 @@ Window {
repeat
:
false
// Ne se répète pas
repeat
:
false
// Ne se répète pas
onTriggered
:
{
onTriggered
:
{
// Réinitialiser la couleur
// Réinitialiser la couleur
for
(
i
=
0
;
i
<
nb_lettres
;
i
++
)
{
console
.
log
(
'
coucou
'
);
case_verif
=
caseArray
[
current_essai
*
nb_lettres
+
i
];
for
(
var
ind
=
0
;
ind
<
nb_lettres
;
ind
++
)
{
var
case_verif
=
caseArray
[
current_essai
*
nb_lettres
+
ind
];
case_verif
.
rectangleColor
=
"
#323232
"
;
case_verif
.
rectangleColor
=
"
#323232
"
;
case_verif
.
rectangleBordercolor
=
"
#ffffff
"
;
case_verif
.
rectangleBordercolor
=
"
#ffffff
"
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Motus/motusgame.cpp
+
1
−
1
View file @
1eacbc89
...
@@ -76,7 +76,7 @@ bool MotusGame::existWord(const QString &word) {
...
@@ -76,7 +76,7 @@ bool MotusGame::existWord(const QString &word) {
// Supposons que wordsByLength est un QMap<int, QStringList>
// Supposons que wordsByLength est un QMap<int, QStringList>
const
QStringList
&
list
=
wordsByLength
[
n
];
const
QStringList
&
list
=
wordsByLength
[
n
];
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
{
if
(
list
[
i
]
==
word
)
{
if
(
list
[
i
]
.
toUpper
()
==
word
)
{
exists
=
true
;
exists
=
true
;
break
;
// On arrête la recherche dès qu'on trouve le mot
break
;
// On arrête la recherche dès qu'on trouve le mot
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment