Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Application 2048
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
Delplanque Sara
Application 2048
Commits
b55b753e
Commit
b55b753e
authored
2 months ago
by
Breitwiller Josephine
Browse files
Options
Downloads
Patches
Plain Diff
Update gamemanager.cpp
parent
a0c0de4d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
applicationQT2048/gamemanager.cpp
+2
-12
2 additions, 12 deletions
applicationQT2048/gamemanager.cpp
with
2 additions
and
12 deletions
applicationQT2048/gamemanager.cpp
+
2
−
12
View file @
b55b753e
#include
"gamemanager.h"
#include
"random"
#include
<QFileInfo>
#include
<QInputDialog>
#include
<QLineEdit>
#include
<QDebug>
GameManager
::
GameManager
(
QObject
*
parent
)
:
QObject
(
parent
),
grid
(
4
,
std
::
vector
<
int
>
(
4
,
0
))
{
...
...
@@ -189,16 +188,7 @@ void GameManager::restartGame() {
//demander pour sauvergarder la partie précédente
bool
ok
;
QString
nomPartie
=
QInputDialog
::
getText
(
nullptr
,
"Sauvegarde"
,
"Entrez le nom de la partie :"
,
QLineEdit
::
Normal
,
""
,
&
ok
);
if
(
ok
&&
!
nomPartie
.
isEmpty
())
{
qDebug
()
<<
"Nom de la partie sauvegardée :"
<<
nomPartie
;
enregistrerPartie
(
nomPartie
);
// Appelle la fonction de sauvegarde
}
else
{
qDebug
()
<<
"Saisie annulée ou vide."
;
}
enregistrerPartie
(
"partie1"
);
// Réinitialisation des variables
...
...
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