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
99e7d665ea0e8ec9ed8337e2885b6d120c33c5e0 to 2a0d8eca1442a830909de25bc6d753c729d12aa1
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
2a0d8eca1442a830909de25bc6d753c729d12aa1
Select Git revision
Branches
main
1 result
Swap
Target
sdelplan/application-2048
Select target project
sdelplan/application-2048
1 result
99e7d665ea0e8ec9ed8337e2885b6d120c33c5e0
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)
Génération de 2 ou de 4
· a236e345
Delplanque Sara
authored
3 months ago
a236e345
Merge branch 'main' of
https://gitlab.ec-lyon.fr/sdelplan/application-2048
· 2a0d8eca
Delplanque Sara
authored
3 months ago
2a0d8eca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.DS_Store
+0
-0
0 additions, 0 deletions
.DS_Store
applicationQT2048/gamemanager.cpp
+6
-1
6 additions, 1 deletion
applicationQT2048/gamemanager.cpp
with
6 additions
and
1 deletion
.DS_Store
View file @
2a0d8eca
No preview for this file type
This diff is collapsed.
Click to expand it.
applicationQT2048/gamemanager.cpp
View file @
2a0d8eca
...
...
@@ -243,7 +243,12 @@ void GameManager::addRandomElement() {
int
col
=
emptyCells
[
randomIndex
].
second
;
// Placer un '2' dans cette case
int
randValue
=
std
::
rand
()
%
100
;
if
(
randValue
<
75
)
{
grid
[
row
][
col
]
=
2
;
}
else
{
grid
[
row
][
col
]
=
4
;
};
}
}
...
...
This diff is collapsed.
Click to expand it.