Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
org.benoitharrault.jeweled
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
android
org.benoitharrault.jeweled
Commits
0c80758a
Commit
0c80758a
authored
Aug 24, 2022
by
Benoît Harrault
Browse files
Options
Downloads
Patches
Plain Diff
Create minimal playable game
parent
ccd35f47
No related branches found
No related tags found
1 merge request
!2
Resolve "Create minimal playable game"
Pipeline
#3604
passed
Oct 7, 2022
Stage: update
Stage: build-debug
Changes
42
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/utils/game_utils.dart
+5
-0
5 additions, 0 deletions
lib/utils/game_utils.dart
pubspec.lock
+1
-1
1 addition, 1 deletion
pubspec.lock
with
6 additions
and
1 deletion
lib/utils/game_utils.dart
+
5
−
0
View file @
0c80758a
import
'package:jeweled_game/provider/data.dart'
;
import
'package:jeweled_game/utils/board_utils.dart'
;
// import 'package:jeweled_game/utils/board_utils.dart';
class
GameUtils
{
static
Future
<
void
>
quitGame
(
Data
myProvider
)
async
{
...
...
@@ -11,6 +13,7 @@ class GameUtils {
print
(
'- size: '
+
myProvider
.
parameterSize
);
myProvider
.
resetGame
();
BoardUtils
.
createNewBoard
(
myProvider
);
myProvider
.
updateGameIsRunning
(
true
);
}
...
...
@@ -27,6 +30,8 @@ class GameUtils {
myProvider
.
setParameterValue
(
'size'
,
savedState
[
'size'
]);
myProvider
.
setParameterValue
(
'skin'
,
savedState
[
'skin'
]);
// myProvider.updateCells(
// BoardUtils.createBoardFromSavedState(myProvider, savedState['board']));
myProvider
.
updateGameIsRunning
(
true
);
}
catch
(
e
)
{
print
(
'Failed to resume game. Will start new one instead.'
);
...
...
This diff is collapsed.
Click to expand it.
pubspec.lock
+
1
−
1
View file @
0c80758a
...
...
@@ -134,7 +134,7 @@ packages:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.
4
"
version: "2.0.
5
"
path_provider_windows:
dependency: transitive
description:
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
Next
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