Skip to content
Snippets Groups Projects
Commit b9ebc285 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Shuffle emojis too

parent fc7f08f1
No related branches found
No related tags found
1 merge request!31Resolve "Shuffle emojis"
Pipeline #5437 passed
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
app.versionName=0.0.28 app.versionName=0.0.29
app.versionCode=28 app.versionCode=29
Shuffle emojis like colors.
Mélange les emojis en plus des couleurs.
...@@ -186,8 +186,12 @@ class GameBoardPainter extends CustomPainter { ...@@ -186,8 +186,12 @@ class GameBoardPainter extends CustomPainter {
// draw content // draw content
if (contentStrings != null) { if (contentStrings != null) {
final int emojiIndex =
cellValue - 1 + game.shuffledColors[0] + 2 * game.shuffledColors[1];
final String text = contentStrings[emojiIndex % contentStrings.length];
final textSpan = TextSpan( final textSpan = TextSpan(
text: contentStrings[cellValue - 1], text: text,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 4 + cellSize / 2, fontSize: 4 + cellSize / 2,
......
...@@ -353,10 +353,10 @@ packages: ...@@ -353,10 +353,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: "1d9158c616048c38f712a6646e317a3426da10e884447626167240d45209cbad" sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.0" version: "0.5.1"
win32: win32:
dependency: transitive dependency: transitive
description: description:
......
...@@ -3,7 +3,7 @@ description: Jeweled Game ...@@ -3,7 +3,7 @@ description: Jeweled Game
publish_to: 'none' publish_to: 'none'
version: 0.0.28+28 version: 0.0.29+29
environment: environment:
sdk: '^3.0.0' sdk: '^3.0.0'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment