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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Delplanque Sara
Application 2048
Compare revisions
a9cb3ad3bab53c286e1c9e93a8c9aa12e7570cbf to bdd11a357df89991bf7b2e92f3b75c3b6aad6223
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
sdelplan/application-2048
Select target project
No results found
bdd11a357df89991bf7b2e92f3b75c3b6aad6223
Select Git revision
Branches
main
1 result
Swap
Target
sdelplan/application-2048
Select target project
sdelplan/application-2048
1 result
a9cb3ad3bab53c286e1c9e93a8c9aa12e7570cbf
Select Git revision
Branches
main
1 result
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
menu mise à jour
· c392be23
Breitwiller Josephine
authored
3 months ago
c392be23
Merge branch 'main' of
https://gitlab.ec-lyon.fr/sdelplan/application-2048
· bdd11a35
Breitwiller Josephine
authored
3 months ago
bdd11a35
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
applicationQT2048/MenuPage.qml
+77
-40
77 additions, 40 deletions
applicationQT2048/MenuPage.qml
applicationQT2048/gamemanager.cpp
+1
-4
1 addition, 4 deletions
applicationQT2048/gamemanager.cpp
with
78 additions
and
44 deletions
applicationQT2048/MenuPage.qml
View file @
bdd11a35
...
...
@@ -14,9 +14,19 @@ Rectangle {
y
:
70
}
Text
{
text
:
"
Design du jeu
"
font.bold
:
true
color
:
"
grey
"
font.pixelSize
:
25
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
120
}
MenuBar
{
y
:
22
0
y
:
18
0
anchors.horizontalCenter
:
parent
.
horizontalCenter
background
:
Rectangle
{
color
:
"
#BBADA0
"
;
radius
:
5
}
...
...
@@ -25,7 +35,7 @@ Rectangle {
MenuItem
{
text
:
"
Arial
"
background
:
Rectangle
{
color
:
"
black
"
;
radius
:
5
}
// Fond et coins arrondis
background
:
Rectangle
{
color
:
"
grey
"
;
radius
:
5
}
// Fond et coins arrondis
}
}
...
...
@@ -33,7 +43,7 @@ Rectangle {
}
MenuBar
{
y
:
30
0
y
:
24
0
anchors.horizontalCenter
:
parent
.
horizontalCenter
background
:
Rectangle
{
color
:
"
#BBADA0
"
;
radius
:
5
}
...
...
@@ -43,15 +53,20 @@ Rectangle {
}
Rectangle
{
color
:
"
red
"
width
:
90
;
height
:
30
Text
{
text
:
"
Fonctionnalitées
"
font.bold
:
true
color
:
"
grey
"
font.pixelSize
:
25
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
150
radius
:
5
y
:
300
}
MenuBar
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
350
background
:
Rectangle
{
color
:
"
#BBADA0
"
;
radius
:
5
}
Menu
{
title
:
"
mode de jeu
"
...
...
@@ -69,21 +84,24 @@ Rectangle {
}
}
}
Rectangle
{
Text
{
text
:
"
accès à l'historique des parties
"
width
:
90
;
height
:
30
color
:
"
grey
"
font.pixelSize
:
20
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
250
radius
:
5
y
:
390
}
MenuBar
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
450
background
:
Rectangle
{
color
:
"
#BBADA0
"
;
radius
:
5
}
Menu
{
title
:
"
Charger une ancienne partie
"
Repeater
{
model
:
gameManager
.
partieHistorique
MenuItem
{
...
...
@@ -96,14 +114,33 @@ Rectangle {
}
Rectangle
{
color
:
"
#BBADA0
"
width
:
150
;
height
:
30
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
510
radius
:
5
Text
{
anchors.centerIn
:
parent
text
:
"
Supprimer l'historique
"
color
:
"
black
"
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
gameManager
.
supprimerHistorique
()
}
}
Rectangle
{
color
:
"
blue
"
width
:
90
;
height
:
30
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
5
1
0
y
:
5
6
0
radius
:
5
Text
{
...
...
This diff is collapsed.
Click to expand it.
applicationQT2048/gamemanager.cpp
View file @
bdd11a35
...
...
@@ -437,9 +437,8 @@ void GameManager::chargerPartie(QString partieName){
}
emit
gridChanged
();
// Notifiez que la grille a changé
file
.
close
();
calculscore
();
}
int
GameManager
::
score
()
const
{
...
...
@@ -448,8 +447,6 @@ int GameManager::score() const {
void
GameManager
::
calculscore
(){
if
(
m_gameOver
)
{
// Si la partie est terminée, ne calcule pas le score
return
;
...
...
This diff is collapsed.
Click to expand it.