Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
projetcppqt
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Durand Ulysse
projetcppqt
Commits
4889a44a
Commit
4889a44a
authored
3 months ago
by
Ulysse Durand
Browse files
Options
Downloads
Patches
Plain Diff
plus de bug ?
parent
272040a2
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
motus/Main.qml
+1
-0
1 addition, 0 deletions
motus/Main.qml
motus/brain.cpp
+1
-6
1 addition, 6 deletions
motus/brain.cpp
motus/jeu.cpp
+1
-1
1 addition, 1 deletion
motus/jeu.cpp
with
3 additions
and
7 deletions
motus/Main.qml
+
1
−
0
View file @
4889a44a
...
@@ -38,6 +38,7 @@ Window {
...
@@ -38,6 +38,7 @@ Window {
y
:
624
y
:
624
mouseArea.onClicked
:
{
mouseArea.onClicked
:
{
pageLoader
.
source
=
"
GameWindow.qml
"
;
pageLoader
.
source
=
"
GameWindow.qml
"
;
jeu
.
startGame
();
jeu
.
startGame
();
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
motus/brain.cpp
+
1
−
6
View file @
4889a44a
...
@@ -4,8 +4,6 @@
...
@@ -4,8 +4,6 @@
#include
<iostream>
#include
<iostream>
#include
<filesystem>
#include
<filesystem>
#include
"fullligneexception.h"
#include
"fullligneexception.h"
#include
<QString>
using
namespace
std
;
using
namespace
std
;
namespace
fs
=
std
::
filesystem
;
namespace
fs
=
std
::
filesystem
;
...
@@ -94,7 +92,7 @@ void Brain::trouveMot() {
...
@@ -94,7 +92,7 @@ void Brain::trouveMot() {
mot
=
listeMots
.
at
(
randomindex
);
mot
=
listeMots
.
at
(
randomindex
);
}
}
void
Brain
::
setFichierDico
(
string
fichierDico
)
{
dico
=
"./"
+
fichierDico
;}
void
Brain
::
setFichierDico
(
string
fichierDico
)
{
dico
=
fichierDico
;}
void
Brain
::
setNombreEssais
(
int
nbEssais
)
{
mNbEssaisMax
=
nbEssais
;}
void
Brain
::
setNombreEssais
(
int
nbEssais
)
{
mNbEssaisMax
=
nbEssais
;}
void
Brain
::
setTailleMots
(
int
tailleMot
)
{
mTailleMot
=
tailleMot
;}
void
Brain
::
setTailleMots
(
int
tailleMot
)
{
mTailleMot
=
tailleMot
;}
string
Brain
::
getMot
()
{
return
mot
;}
string
Brain
::
getMot
()
{
return
mot
;}
...
@@ -107,9 +105,6 @@ void Brain::initGame() {
...
@@ -107,9 +105,6 @@ void Brain::initGame() {
lignes
.
push_back
(
new
Ligne
(
getMot
()));
lignes
.
push_back
(
new
Ligne
(
getMot
()));
lignes
[
i
]
->
initLigne
();
lignes
[
i
]
->
initLigne
();
}
}
// Convertir std::string (getMot()) en QString
QString
motQString
=
QString
::
fromStdString
(
getMot
());
// Conversion de std::string en QString
}
catch
(
NoWordException
e
)
{
}
catch
(
NoWordException
e
)
{
cout
<<
e
.
what
()
<<
endl
;
cout
<<
e
.
what
()
<<
endl
;
}
}
...
...
This diff is collapsed.
Click to expand it.
motus/jeu.cpp
+
1
−
1
View file @
4889a44a
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
Jeu
::
Jeu
(
QObject
*
parent
)
:
QObject
(
parent
)
{
Jeu
::
Jeu
(
QObject
*
parent
)
:
QObject
(
parent
)
{
brain
=
new
Brain
(
"./"
);
}
}
// void Jeu::setMot(const QString& mot) {
// void Jeu::setMot(const QString& 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