Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 28-add-high-scores
  • 29-use-real-board-painter-to-draw-parameters-items
  • 32-add-block-size-limit-parameter
  • 39-improve-app-metadata
  • master
  • Release_0.0.10_10
  • Release_0.0.11_11
  • Release_0.0.12_12
  • Release_0.0.13_13
  • Release_0.0.14_14
  • Release_0.0.15_15
  • Release_0.0.16_16
  • Release_0.0.17_17
  • Release_0.0.18_18
  • Release_0.0.19_19
  • Release_0.0.1_1
  • Release_0.0.20_20
  • Release_0.0.21_21
  • Release_0.0.22_22
  • Release_0.0.23_23
  • Release_0.0.24_24
  • Release_0.0.25_25
  • Release_0.0.26_26
  • Release_0.0.27_27
  • Release_0.0.28_28
  • Release_0.0.29_29
  • Release_0.0.2_2
  • Release_0.0.30_30
  • Release_0.0.31_31
  • Release_0.0.3_3
  • Release_0.0.4_4
  • Release_0.0.5_5
  • Release_0.0.6_6
  • Release_0.0.7_7
  • Release_0.0.8_8
  • Release_0.0.9_9
  • Release_0.1.0_32
  • Release_0.1.1_33
  • Release_0.2.0_34
  • Release_0.2.1_35
  • Release_0.3.0_36
  • Release_0.3.1_37
  • Release_0.4.0_38
  • Release_0.4.1_39
  • Release_0.4.2_40
  • Release_0.5.0_41
  • Release_0.6.0_42
  • Release_0.7.0_43
  • Release_0.8.0_44
  • Release_0.8.1_45
  • Release_0.8.2_46
  • Release_0.9.0_47
52 results

Target

Select target project
  • android/org.benoitharrault.jeweled
1 result
Select Git revision
  • 28-add-high-scores
  • 29-use-real-board-painter-to-draw-parameters-items
  • 32-add-block-size-limit-parameter
  • 39-improve-app-metadata
  • master
  • Release_0.0.10_10
  • Release_0.0.11_11
  • Release_0.0.12_12
  • Release_0.0.13_13
  • Release_0.0.14_14
  • Release_0.0.15_15
  • Release_0.0.16_16
  • Release_0.0.17_17
  • Release_0.0.18_18
  • Release_0.0.19_19
  • Release_0.0.1_1
  • Release_0.0.20_20
  • Release_0.0.21_21
  • Release_0.0.22_22
  • Release_0.0.23_23
  • Release_0.0.24_24
  • Release_0.0.25_25
  • Release_0.0.26_26
  • Release_0.0.27_27
  • Release_0.0.28_28
  • Release_0.0.29_29
  • Release_0.0.2_2
  • Release_0.0.30_30
  • Release_0.0.31_31
  • Release_0.0.3_3
  • Release_0.0.4_4
  • Release_0.0.5_5
  • Release_0.0.6_6
  • Release_0.0.7_7
  • Release_0.0.8_8
  • Release_0.0.9_9
  • Release_0.1.0_32
  • Release_0.1.1_33
  • Release_0.2.0_34
  • Release_0.2.1_35
  • Release_0.3.0_36
  • Release_0.3.1_37
  • Release_0.4.0_38
  • Release_0.4.1_39
  • Release_0.4.2_40
  • Release_0.5.0_41
  • Release_0.6.0_42
  • Release_0.7.0_43
  • Release_0.8.0_44
  • Release_0.8.1_45
  • Release_0.8.2_46
  • Release_0.9.0_47
52 results
Show changes
Showing
with 162 additions and 105 deletions
Ajout d'un correcteur automatique de code. Application des corrections. Mise à jour des dépendances.
Mise à jour du plugin gradle pour flutter.
Supprime les appels à print dans le code de production.
Amélioration de la CI/CD. Suppression de "update" et désactivation de "build-debug" sur master.
Mélange les emojis en plus des couleurs.
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" ry="0" fill="#f29c38" stroke="#000" stroke-width="2"/>
<g transform="translate(11.967 8.1117)" fill="#fff" stroke="#282828" stroke-linecap="round" stroke-width="3"><rect x="18.962" y="22.818" width="12.714" height="12.714"/><rect x="31.676" y="22.818" width="12.714" height="12.714"/><rect x="44.389" y="22.818" width="12.714" height="12.714"/><rect x="18.962" y="35.531" width="12.714" height="12.714"/><rect x="31.676" y="35.531" width="12.714" height="12.714"/><rect x="44.389" y="35.531" width="12.714" height="12.714"/><rect x="18.962" y="48.245" width="12.714" height="12.714"/><rect x="31.676" y="48.245" width="12.714" height="12.714"/><rect x="44.389" y="48.245" width="12.714" height="12.714"/></g></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" ry="0" fill="#cd5542" stroke="#000" stroke-width="2"/>
<g transform="translate(6.2763 8.2075)" fill="#fff" stroke="#282828" stroke-linecap="round" stroke-width="3"><rect x="18.296" y="16.365" width="12.714" height="12.714"/><rect x="31.01" y="16.365" width="12.714" height="12.714"/><rect x="43.724" y="16.365" width="12.714" height="12.714"/><rect x="56.437" y="16.365" width="12.714" height="12.714"/><rect x="18.296" y="29.079" width="12.714" height="12.714"/><rect x="31.01" y="29.079" width="12.714" height="12.714"/><rect x="43.724" y="29.079" width="12.714" height="12.714"/><rect x="56.437" y="29.079" width="12.714" height="12.714"/><rect x="18.296" y="41.792" width="12.714" height="12.714"/><rect x="31.01" y="41.792" width="12.714" height="12.714"/><rect x="43.724" y="41.792" width="12.714" height="12.714"/><rect x="56.437" y="41.792" width="12.714" height="12.714"/><rect x="18.296" y="54.506" width="12.714" height="12.714"/><rect x="31.01" y="54.506" width="12.714" height="12.714"/><rect x="43.724" y="54.506" width="12.714" height="12.714"/><rect x="56.437" y="54.506" width="12.714" height="12.714"/></g></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" ry="0" fill="#5f41af" stroke="#000" stroke-width="2"/>
<g transform="translate(4.4197 1.4084)" fill="#fff" stroke="#282828" stroke-linecap="round" stroke-width="3"><rect x="13.796" y="16.807" width="12.714" height="12.714"/><rect x="26.51" y="16.807" width="12.714" height="12.714"/><rect x="39.223" y="16.807" width="12.714" height="12.714"/><rect x="51.937" y="16.807" width="12.714" height="12.714"/><rect x="64.651" y="16.807" width="12.714" height="12.714"/><rect x="13.796" y="29.521" width="12.714" height="12.714"/><rect x="26.51" y="29.521" width="12.714" height="12.714"/><rect x="39.223" y="29.521" width="12.714" height="12.714"/><rect x="51.937" y="29.521" width="12.714" height="12.714"/><rect x="64.651" y="29.521" width="12.714" height="12.714"/><rect x="13.796" y="42.235" width="12.714" height="12.714"/><rect x="26.51" y="42.235" width="12.714" height="12.714"/><rect x="39.223" y="42.235" width="12.714" height="12.714"/><rect x="51.937" y="42.235" width="12.714" height="12.714"/><rect x="64.651" y="42.235" width="12.714" height="12.714"/><rect x="13.796" y="54.948" width="12.714" height="12.714"/><rect x="26.51" y="54.948" width="12.714" height="12.714"/><rect x="39.223" y="54.948" width="12.714" height="12.714"/><rect x="51.937" y="54.948" width="12.714" height="12.714"/><rect x="64.651" y="54.948" width="12.714" height="12.714"/><rect x="13.796" y="67.662" width="12.714" height="12.714"/><rect x="26.51" y="67.662" width="12.714" height="12.714"/><rect x="39.223" y="67.662" width="12.714" height="12.714"/><rect x="51.937" y="67.662" width="12.714" height="12.714"/><rect x="64.651" y="67.662" width="12.714" height="12.714"/></g></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" ry="0" fill="#97c05c" stroke="#000" stroke-width="2"/>
<g transform="translate(8.8715 12.603)" fill="#fff" stroke="#282828" stroke-linecap="round" stroke-width="3"><rect x="28.415" y="24.683" width="12.714" height="12.714"/><rect x="41.128" y="24.683" width="12.714" height="12.714"/><rect x="28.415" y="37.397" width="12.714" height="12.714"/><rect x="41.128" y="37.397" width="12.714" height="12.714"/></g></svg>
......@@ -25,12 +25,6 @@ AVAILABLE_GAME_IMAGES="
placeholder
"
# Settings images
AVAILABLES_GAME_SETTINGS="
boardSize:6,10,14,20
colorsCount:5,6,7,8
"
#######################################################
# optimize svg
......@@ -73,19 +67,6 @@ function build_icon() {
optipng ${OPTIPNG_OPTIONS} ${TARGET}
}
function build_settings_icons() {
INPUT_STRING="$1"
SETTING_NAME="$(echo "${INPUT_STRING}" | cut -d":" -f1)"
SETTING_VALUES="$(echo "${INPUT_STRING}" | cut -d":" -f2 | tr "," " ")"
for SETTING_VALUE in ${SETTING_VALUES}
do
SETTING_CODE="${SETTING_NAME}_${SETTING_VALUE}"
build_icon ${CURRENT_DIR}/${SETTING_CODE}.svg ${ASSETS_DIR}/icons/${SETTING_CODE}.png
done
}
#######################################################
# Create output folders
......@@ -101,9 +82,3 @@ for GAME_IMAGE in ${AVAILABLE_GAME_IMAGES}
do
build_icon ${CURRENT_DIR}/${GAME_IMAGE}.svg ${ASSETS_DIR}/icons/${GAME_IMAGE}.png
done
# build settings images
for GAME_SETTING in ${AVAILABLES_GAME_SETTINGS}
do
build_settings_icons "${GAME_SETTING}"
done
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#97c05c" stroke="#000" stroke-width="2"/><g transform="translate(-1.0061 .33115)" aria-label="5"><path d="m63.315 55.063q0 2.2656-0.85938 4.2188-0.83984 1.9336-2.4609 3.3203-1.7969 1.4844-4.1406 2.207-2.3242 0.70312-5.3125 0.70312-3.4961-0.01953-5.918-0.56641-2.4023-0.52734-3.9258-1.1914v-6.4258h0.82031q1.7773 1.0547 3.8281 1.7578t4.082 0.70312q1.2305 0 2.6562-0.27344 1.4453-0.29297 2.2852-1.0352 0.66406-0.60547 0.99609-1.2305 0.35156-0.625 0.35156-1.9336 0-1.0156-0.46875-1.7383-0.44922-0.74219-1.1719-1.1914-1.0547-0.64453-2.5391-0.83984-1.4844-0.21484-2.6953-0.21484-1.7578 0-3.3789 0.3125-1.6016 0.29297-2.8125 0.58594h-0.85938v-16.406h20.684v5.5664h-13.633v4.7461q0.60547-0.03906 1.5234-0.05859 0.9375-0.03906 1.6406-0.03906 2.4023 0 4.2773 0.46875 1.8945 0.44922 3.2617 1.2695 1.7773 1.0742 2.7734 2.8516 0.99609 1.7578 0.99609 4.4336z"/></g><rect x="67.01" y="67.01" width="29.323" height="29.323" fill="#ff6f43" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="36.339" width="29.323" height="29.323" fill="#ffce2c" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="5.6672" width="29.323" height="29.323" fill="#359c35" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="5.6672" width="29.323" height="29.323" fill="#708cfd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="5.6672" width="29.323" height="29.323" fill="#e63a3f" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#f29c38" stroke="#000" stroke-width="2"/><g transform="translate(3.8694 .21001)" aria-label="6"><path d="m59.025 55.399q0 2.2461-0.82031 4.2188t-2.3047 3.3203q-1.582 1.4453-3.6719 2.207-2.0703 0.76172-4.8633 0.76172-2.6172 0-4.7852-0.70312-2.1484-0.72266-3.6914-2.1875-1.7773-1.6797-2.7148-4.3359t-0.9375-6.3477q0-3.8281 0.87891-6.7969t2.8711-5.2539q1.9141-2.1875 4.9609-3.3984 3.0664-1.2109 7.2852-1.2109 1.4258 0 3.125 0.19531t2.207 0.29297v5.7227h-0.74219q-0.52734-0.25391-1.7969-0.56641-1.25-0.33203-2.8516-0.33203-3.75 0-5.8398 1.8359t-2.5195 5.1172q1.5039-0.89844 3.1641-1.4453 1.6797-0.56641 3.6133-0.56641 1.6992 0 3.1445 0.39062 1.4648 0.39062 2.7148 1.25 1.6211 1.1328 2.5977 3.0469 0.97656 1.9141 0.97656 4.7852zm-8.8867 4.3945q0.60547-0.66406 0.95703-1.5625 0.37109-0.91797 0.37109-2.4805 0-1.4258-0.41016-2.3242-0.41016-0.91797-1.1328-1.4648-0.70312-0.54688-1.6602-0.74219-0.95703-0.21484-1.9727-0.21484-0.85938 0-1.7969 0.19531-0.9375 0.19531-1.7188 0.48828 0 0.19531-0.01953 0.64453t-0.01953 1.1328q0 2.4023 0.46875 3.9648 0.48828 1.543 1.2891 2.3633 0.54688 0.60547 1.2891 0.89844 0.74219 0.27344 1.6016 0.27344 0.64453 0 1.4258-0.29297t1.3281-0.87891z"/></g><rect x="36.339" y="67.01" width="29.323" height="29.323" fill="#a13cb1" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="67.01" width="29.323" height="29.323" fill="#ff6f43" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="36.339" width="29.323" height="29.323" fill="#ffce2c" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="5.6672" width="29.323" height="29.323" fill="#359c35" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="5.6672" width="29.323" height="29.323" fill="#708cfd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="5.6672" width="29.323" height="29.323" fill="#e63a3f" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#cd5542" stroke="#000" stroke-width="2"/><g transform="translate(3.9378 .2393)" aria-label="7"><path d="m58.459 42.001-13.164 23.301h-8.3594l13.672-23.516h-14.941v-5.5664h22.793z"/></g><rect x="5.6671" y="67.01" width="29.323" height="29.323" fill="#38ffff" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="67.01" width="29.323" height="29.323" fill="#a13cb1" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="67.01" width="29.323" height="29.323" fill="#ff6f43" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="36.339" width="29.323" height="29.323" fill="#ffce2c" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="5.6672" width="29.323" height="29.323" fill="#359c35" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="5.6672" width="29.323" height="29.323" fill="#708cfd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="5.6672" width="29.323" height="29.323" fill="#e63a3f" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#6041b0" stroke="#000" stroke-width="2"/><g transform="translate(4.1624 .2393)" aria-label="8"><path d="m59.123 57.177q0 3.8672-3.3008 6.3281-3.2812 2.4609-9.0234 2.4609-3.2227 0-5.5273-0.66406-2.3047-0.66406-3.8086-1.8359-1.4844-1.1523-2.207-2.6953-0.70312-1.543-0.70312-3.3203 0-2.1875 1.2695-3.8672 1.2891-1.6992 4.4336-2.9688v-0.11719q-2.5391-1.1719-3.7305-2.9492t-1.1914-4.1211q0-3.457 3.2031-5.6641 3.2031-2.207 8.3398-2.207 5.3906 0 8.4375 2.0117 3.0664 1.9922 3.0664 5.332 0 2.0703-1.2891 3.6914t-3.9453 2.7539v0.11719q3.0469 1.1523 4.5117 3.1055t1.4648 4.6094zm-8.0664-13.438q0-1.4844-1.1523-2.3633-1.1328-0.87891-3.0273-0.87891-0.70312 0-1.4453 0.17578-0.72266 0.17578-1.3281 0.50781-0.56641 0.33203-0.9375 0.87891-0.37109 0.52734-0.37109 1.2109 0 1.1523 0.64453 1.7969 0.66406 0.64453 2.1484 1.2891 0.54688 0.23438 1.4844 0.58594 0.95703 0.33203 2.3047 0.76172 0.89844-1.0547 1.2891-1.8945 0.39062-0.83984 0.39062-2.0703zm0.60547 13.77q0-1.4062-0.70312-2.1289t-2.8906-1.6602q-0.64453-0.29297-1.875-0.72266-1.2305-0.42969-2.0703-0.74219-0.83984 0.76172-1.5234 1.8555-0.66406 1.0742-0.66406 2.4219 0 2.0312 1.4453 3.2422 1.4648 1.1914 3.8086 1.1914 0.625 0 1.4648-0.17578 0.83984-0.19531 1.4453-0.58594 0.70312-0.44922 1.1328-1.0547 0.42969-0.60547 0.42969-1.6406z"/></g><rect x="5.6671" y="36.339" width="29.323" height="29.323" fill="#f2739d" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="67.01" width="29.323" height="29.323" fill="#38ffff" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="67.01" width="29.323" height="29.323" fill="#a13cb1" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="67.01" width="29.323" height="29.323" fill="#ff6f43" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="36.339" width="29.323" height="29.323" fill="#ffce2c" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="5.6672" width="29.323" height="29.323" fill="#359c35" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="5.6672" width="29.323" height="29.323" fill="#708cfd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="5.6672" width="29.323" height="29.323" fill="#e63a3f" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/></svg>
......@@ -75,5 +75,5 @@
</g>
<path d="m24.549 1119.5c0.66325 0 1.1979-0.5346 1.1979-1.1979v-0.3333c0 0.6632-0.53461 1.1978-1.1979 1.1978h-20.354c-0.66325 0-1.1979-0.5346-1.1979-1.1978v0.3333c0 0.6633 0.53461 1.1979 1.1979 1.1979z" fill="#1a237e" opacity=".2"/>
</g>
<path d="m20.837 12.744-1.8134-4.0827c-0.0382-0.08507-0.10022-0.15726-0.17848-0.20802-0.07825-0.05076-0.16949-0.07782-0.26279-0.078035h-8.4126c-0.09405-7.585e-4 -0.18638 0.025867-0.26549 0.076736-0.079231 0.05076-0.142 0.12349-0.18053 0.20932l-1.8134 4.0827c-0.037231 0.0842-0.049678 0.17718-0.035937 0.2682 0.013741 0.09103 0.053145 0.17631 0.11343 0.2458l6.0175 6.9435c0.09211 0.10769 0.22675 0.16971 0.36854 0.16971s0.27643-0.06201 0.36854-0.16971l6.0175-6.9435c0.06029-0.06948 0.09968-0.15477 0.11343-0.2458 0.01374-0.09102 0.0013-0.18399-0.03594-0.2682zm-4.1215 0.48488-2.3419 6.1045-2.3419-6.1095zm-4.5773-0.48488 2.2353-3.6416 2.2353 3.656zm2.6668-3.8791h3.5784l-1.377 3.6025zm-3.0645 3.6025-1.377-3.6075h3.5784zm2.0801 6.7883-5.222-6.0319h2.9093zm3.3942-6.0222h2.9093l-5.1979 6.0125zm0.18421-0.48488 1.3384-3.4959 1.5516 3.4862zm-7.3896-3.4959 1.3189 3.4862h-2.9093z" fill="#fff" stroke="#fffffd" stroke-width=".628"/>
<path d="m20.837 12.744-1.8134-4.0827c-0.0382-0.08507-0.10022-0.15726-0.17848-0.20802-0.07825-0.05076-0.16949-0.07782-0.26279-0.078035h-8.4126c-0.09405-7.585e-4 -0.18638 0.025867-0.26549 0.076736-0.079231 0.05076-0.142 0.12349-0.18053 0.20932l-1.8134 4.0827c-0.037231 0.0842-0.049678 0.17718-0.035937 0.2682 0.013741 0.09103 0.053145 0.17631 0.11343 0.2458l6.0175 6.9435c0.09211 0.10769 0.22675 0.16971 0.36854 0.16971s0.27643-0.06201 0.36854-0.16971l6.0175-6.9435c0.06029-0.06948 0.09968-0.15477 0.11343-0.2458 0.01374-0.09102 0.0013-0.18399-0.03594-0.2682zm-4.1215 0.48488-2.3419 6.1045-2.3419-6.1095zm-4.5773-0.48488 2.2353-3.6416 2.2353 3.656zm2.6668-3.8791h3.5784l-1.377 3.6025zm-3.0645 3.6025-1.377-3.6075h3.5784zm2.0801 6.7883-5.222-6.0319h2.9093zm3.3942-6.0222h2.9093l-5.1979 6.0125zm0.18421-0.48488 1.3384-3.4959 1.5516 3.4862zm-7.3896-3.4959 1.3189 3.4862h-2.9093z" fill="#fff" stroke="#fff" stroke-width=".628"/>
</svg>
import 'package:jeweled/utils/tools.dart';
class DefaultGameSettings {
static const List<String> availableParameters = [
'boardSize',
'colorsCount',
];
static const int defaultBoardSizeValue = 10;
static const int boardSizeValueSmall = 6;
static const int boardSizeValueMedium = 10;
static const int boardSizeValueLarge = 14;
static const int boardSizeValueExtraLarge = 18;
static const int defaultBoardSizeValue = boardSizeValueMedium;
static const List<int> allowedBoardSizeValues = [
6,
10,
14,
20,
boardSizeValueSmall,
boardSizeValueMedium,
boardSizeValueLarge,
boardSizeValueExtraLarge,
];
static const int defaultColorsCountValue = 6;
static const int colorsCountValueLow = 5;
static const int colorsCountValueMedium = 6;
static const int colorsCountValueHigh = 7;
static const int colorsCountValueVeryHigh = 8;
static const int defaultColorsCountValue = colorsCountValueMedium;
static const List<int> allowedColorsCountValues = [
5,
6,
7,
8,
colorsCountValueLow,
colorsCountValueMedium,
colorsCountValueHigh,
colorsCountValueVeryHigh,
];
static List<int> getAvailableValues(String parameterCode) {
......@@ -28,6 +40,9 @@ class DefaultGameSettings {
return DefaultGameSettings.allowedColorsCountValues;
}
printlog('Did not find any available value for game parameter "$parameterCode".');
return [];
}
static int blockMinimumCellsCount = 3;
}
import 'package:jeweled/utils/tools.dart';
class DefaultGlobalSettings {
static const List<String> availableParameters = [
'colorsTheme',
'graphicTheme',
];
static const int defaultColorsThemeValue = 1;
static const List<int> allowedColorsThemeValues = [
// 0, // 0x9D9D9D,0xFFFFFF,0xBE2633,0xE06F8B,0x493C2B,0xA46422,0xEB8931,0xF7E26B,0x2F484E,0x44891A,0xA3CE27,0x1B2632,0x005784,0x31A2F2,0xB2DCEF,// legacy
1, // 0x0e0e12,0x1a1a24,0x333346,0x535373,0x8080a4,0xa6a6bf,0xc1c1d2,0xe6e6ec, // https://lospec.com/palette-list/gothic-bit
2, // 0x615e85,0x9c8dc2,0xd9a3cd,0xebc3a7,0xe0e0dc,0xa3d1af,0x90b4de,0x717fb0, // https://lospec.com/palette-list/sweethope
3, // 0xd9af80,0xb07972,0x524352,0x686887,0x7f9bb0,0xbfd4b0,0x90b870,0x628c70, // https://lospec.com/palette-list/nostalgic-dreams
4, // 0x8bc7bf,0x5796a1,0x524bb3,0x471b6e,0x702782,0xb0455a,0xde8b6f,0xebd694, // https://lospec.com/palette-list/arjibi8
// 5, // 0x40263e,0x5979a6,0x84c2a3,0xefe8c3,0xefefef,0xcbc7d6,0xd06060,0x773971, // https://lospec.com/palette-list/kotomasho-8
// 6, // 0xf0f0eb,0xffff8f,0x7be098,0x849ad8,0xe8b382,0xd8828e,0xa776c1,0x545155, // https://lospec.com/palette-list/desatur8
// 7, // 0x211d38,0x2e2a4f,0x3b405e,0x60556e,0x9a6278,0xc7786f,0xcfa98a,0xcdd4a5, // https://lospec.com/palette-list/purplemorning8
// 8, // 0x332422,0xc95b40,0xff9b5e,0xfcdf76,0x4c2f7f,0x3a66ad,0x39cec2,0xfafff9, // https://lospec.com/palette-list/cold-war-8
// 9, // 0x111323,0x374566,0x50785d,0x8497b3,0xe8dcd8,0xcfb463,0xb35447,0x692e4b, // https://lospec.com/palette-list/low-8
];
static const int graphicThemeSolidBackground = 0;
static const int graphicThemeGradientAndBorder = 1;
static const int graphicThemeEmojis = 2;
static const int graphicThemePatterns = 3;
static const int defaultGraphicThemeValue = graphicThemeSolidBackground;
static const List<int> allowedGraphicThemeValues = [
graphicThemeSolidBackground,
graphicThemeGradientAndBorder,
graphicThemeEmojis,
graphicThemePatterns,
];
static const List<String> graphicThemeContentEmojiStrings = [
'🍏',
'🤍',
'🦋',
'🐞',
'⭐',
'🍄',
'🍒',
'🐤',
];
static const List<String> graphicThemeContentPatternStrings = [
'✖',
'✚',
'▲',
'■',
'●',
'◆',
'━',
'⧧',
];
static List<int> getAvailableValues(String parameterCode) {
switch (parameterCode) {
case 'colorsTheme':
return DefaultGlobalSettings.allowedColorsThemeValues;
case 'graphicTheme':
return DefaultGlobalSettings.allowedGraphicThemeValues;
}
printlog('Did not find any available value for global parameter "$parameterCode".');
return [];
}
}
......@@ -2,9 +2,12 @@ import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:jeweled/config/default_game_settings.dart';
import 'package:jeweled/models/game.dart';
import 'package:jeweled/models/cell_location.dart';
import 'package:jeweled/models/game_settings.dart';
import 'package:jeweled/models/settings_game.dart';
import 'package:jeweled/models/settings_global.dart';
import 'package:jeweled/utils/tools.dart';
part 'game_state.dart';
......@@ -23,7 +26,9 @@ class GameCubit extends HydratedCubit<GameState> {
void refresh() {
final Game game = Game(
board: state.currentGame.board,
settings: state.currentGame.settings,
gameSettings: state.currentGame.gameSettings,
globalSettings: state.currentGame.globalSettings,
shuffledColors: state.currentGame.shuffledColors,
isRunning: state.currentGame.isRunning,
isFinished: state.currentGame.isFinished,
availableBlocksCount: state.currentGame.availableBlocksCount,
......@@ -46,30 +51,34 @@ class GameCubit extends HydratedCubit<GameState> {
}
void increaseMovesCount() {
this.state.currentGame.increaseMovesCount();
state.currentGame.increaseMovesCount();
refresh();
}
void increaseScore(int increment) {
this.state.currentGame.increaseScore(increment);
state.currentGame.increaseScore(increment);
refresh();
}
void updateAvailableBlocksCount() {
this.state.currentGame.updateAvailableBlocksCount();
state.currentGame.updateAvailableBlocksCount();
refresh();
}
void updateGameIsFinished(bool gameIsFinished) {
this.state.currentGame.updateGameIsFinished(gameIsFinished);
state.currentGame.updateGameIsFinished(gameIsFinished);
refresh();
}
void shuffleColors(final int colorsTheme) {
state.currentGame.shuffleColorsAgain(colorsTheme);
}
moveCellsDown() {
final Game currentGame = this.state.currentGame;
final Game currentGame = state.currentGame;
final int boardSizeHorizontal = currentGame.settings.boardSize;
final int boardSizeVertical = currentGame.settings.boardSize;
final int boardSizeHorizontal = currentGame.gameSettings.boardSize;
final int boardSizeVertical = currentGame.gameSettings.boardSize;
for (int row = 0; row < boardSizeVertical; row++) {
for (int col = 0; col < boardSizeHorizontal; col++) {
......@@ -77,11 +86,11 @@ class GameCubit extends HydratedCubit<GameState> {
if (currentGame.getCellValue(CellLocation.go(row, col)) == null) {
// move cells down
for (int r = row; r > 0; r--) {
this.updateCellValue(CellLocation.go(r, col),
updateCellValue(CellLocation.go(r, col),
currentGame.getCellValue(CellLocation.go(r - 1, col)));
}
// fill top empty cell
this.updateCellValue(
updateCellValue(
CellLocation.go(0, col), currentGame.getFillValue(CellLocation.go(row, col)));
}
}
......@@ -92,53 +101,57 @@ class GameCubit extends HydratedCubit<GameState> {
// Sort cells from top to bottom
block.sort((cell1, cell2) => cell1.row.compareTo(cell2.row));
// Delete all cells
block.forEach((CellLocation blockItemToDelete) {
this.updateCellValue(blockItemToDelete, null);
});
// Gravity!
this.moveCellsDown();
for (CellLocation blockItemToDelete in block) {
updateCellValue(blockItemToDelete, null);
}
}
int getScoreFromBlock(int blockSize) {
return 3 * (blockSize - 2);
}
void tapOnCell(CellLocation tappedCellLocation) {
final Game currentGame = this.state.currentGame;
List<CellLocation> tapOnCell(CellLocation tappedCellLocation) {
final Game currentGame = state.currentGame;
final int? cellValue = currentGame.getCellValue(tappedCellLocation);
print('Tap on cell: col=' +
tappedCellLocation.col.toString() +
' ; row=' +
tappedCellLocation.row.toString() +
' ; value=' +
cellValue.toString());
if (cellValue != null) {
List<CellLocation> block = currentGame.getSiblingCells(tappedCellLocation, []);
print('block size: ' + block.length.toString());
if (block.length >= 3) {
this.deleteBlock(block);
this.increaseMovesCount();
this.increaseScore(getScoreFromBlock(block.length));
this.updateAvailableBlocksCount();
List<CellLocation> blockCells = currentGame.getSiblingCells(tappedCellLocation, []);
if (blockCells.length >= DefaultGameSettings.blockMinimumCellsCount) {
deleteBlock(blockCells);
increaseMovesCount();
increaseScore(getScoreFromBlock(blockCells.length));
return blockCells;
}
}
if (!currentGame.hasAtLeastOneAvailableBlock()) {
print('no more block found. finish game.');
this.updateGameIsFinished(true);
return [];
}
void postAnimate() {
moveCellsDown();
updateAvailableBlocksCount();
refresh();
if (!state.currentGame.hasAtLeastOneAvailableBlock()) {
printlog('no more block found. finish game.');
updateGameIsFinished(true);
}
}
void startNewGame(GameSettings settings) {
void startNewGame({
required GameSettings gameSettings,
required GlobalSettings globalSettings,
}) {
Game newGame = Game.createNew(
gameSettings: settings,
gameSettings: gameSettings,
globalSettings: globalSettings,
);
newGame.dump();
updateState(newGame);
postAnimate();
}
@override
......
......@@ -2,19 +2,20 @@ import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:jeweled/models/game_settings.dart';
import 'package:jeweled/models/settings_game.dart';
import 'package:jeweled/utils/tools.dart';
part 'settings_state.dart';
part 'settings_game_state.dart';
class SettingsCubit extends HydratedCubit<SettingsState> {
SettingsCubit() : super(SettingsState(settings: GameSettings.createDefault()));
class GameSettingsCubit extends HydratedCubit<GameSettingsState> {
GameSettingsCubit() : super(GameSettingsState(settings: GameSettings.createDefault()));
void setValues({
int? boardSize,
int? colorsCount,
}) {
emit(
SettingsState(
GameSettingsState(
settings: GameSettings(
boardSize: boardSize ?? state.settings.boardSize,
colorsCount: colorsCount ?? state.settings.colorsCount,
......@@ -34,8 +35,8 @@ class SettingsCubit extends HydratedCubit<SettingsState> {
}
void setParameterValue(String code, int value) {
print('SettingsCubit.setParameterValue');
print('code: ' + code + ' / value: ' + value.toString());
printlog('GameSettingsCubit.setParameterValue');
printlog('code: $code / value: $value');
int boardSize = code == 'boardSize' ? value : getParameterValue('boardSize');
int colorsCount = code == 'colorsCount' ? value : getParameterValue('colorsCount');
......@@ -47,11 +48,11 @@ class SettingsCubit extends HydratedCubit<SettingsState> {
}
@override
SettingsState? fromJson(Map<String, dynamic> json) {
GameSettingsState? fromJson(Map<String, dynamic> json) {
int boardSize = json['boardSize'] as int;
int colorsCount = json['colorsCount'] as int;
return SettingsState(
return GameSettingsState(
settings: GameSettings(
boardSize: boardSize,
colorsCount: colorsCount,
......@@ -60,7 +61,7 @@ class SettingsCubit extends HydratedCubit<SettingsState> {
}
@override
Map<String, dynamic>? toJson(SettingsState state) {
Map<String, dynamic>? toJson(GameSettingsState state) {
return <String, dynamic>{
'boardSize': state.settings.boardSize,
'colorsCount': state.settings.colorsCount,
......
part of 'settings_cubit.dart';
part of 'settings_game_cubit.dart';
@immutable
class SettingsState extends Equatable {
const SettingsState({
class GameSettingsState extends Equatable {
const GameSettingsState({
required this.settings,
});
......