Mini-Game: πŸ’£ MineSweeper

Hey blaze comunity, I want to share with you this small experiment. is a game in wich you can play different levels and each 10 levels the difficulty increases.

Screenshot 2024-08-28 8.40.49 AM

how to play?
select the square where you want to stand.
insert the snippet, and see if you survive, or die
copy the inserted code to continue playing
use the snippet again and paste the code on the top left corner.

{note: preview=yes; insert=no}{lose=0}{a=":red_circle:"}{b=":orange_circle:"}{c=":yellow_circle:"}{d=":green_circle:"}{e=":large_blue_circle:"}{f=":purple_circle:"}{g=":brown_circle:"}{h=":black_circle:"}{i=":white_circle:"}{level=1}{loadscore=0}{loadroom=1}Load code here :floppy_disk:: {formtext: name=loadcode; default=no save}{endnote}

{note: preview=no; insert=no}
{if: loadcode = "no save"} {else}
{codeLoaded=base64decode(loadcode)}
{scorecode=codeLoaded}{levelcode=codeLoaded}{roomcode=codeLoaded}
{splitcodeIniA=search(scorecode,"Γ±A")}{preloadscore=substring(scorecode, splitcodeIniA+2, 3)}
{splitcodeIniB=search(levelcode,"Γ±B")}{level=substring(levelcode, splitcodeIniB+2, 1)}
{splitcodeIniC=search(roomcode,"Γ±C")}{loadroom=substring(roomcode, splitcodeIniC+2, 1)}
{loadscore=preloadscore+ 0}
{endif}

--Mines
{mine1=0}{mine2=0}{mine3=0}{mine4=0}{mine5=0}{mine6=0}
{mine1={random-number: min=1; max=9; rounded=yes}}{if: level>1} {mine2={random-number: min=1; max=9; rounded=yes}} {endif}{if: level>2} {mine3={random-number: min=1; max=9; rounded=yes}}{endif} {if: level>3} {mine4={random-number: min=1; max=9; rounded=yes}}{endif} {if: level>4} {mine5={random-number: min=1; max=9; rounded=yes}}{endif} {if: level>5} {mine6={random-number: min=1; max=9; rounded=yes}}{endif}
{if: mine1=1 or mine2=1 or mine3=1 or mine4=1 or mine5=1 or mine6=1}{a=":bomb:"}{endif}
{if: mine1=2 or mine2=2 or mine3=2 or mine4=2 or mine5=2 or mine6=2}{b=":bomb:"}{endif}
{if: mine1=3 or mine2=3 or mine3=3 or mine4=3 or mine5=3 or mine6=3}{c=":bomb:"}{endif}
{if: mine1=4 or mine2=4 or mine3=4 or mine4=4 or mine5=4 or mine6=4}{d=":bomb:"}{endif}
{if: mine1=5 or mine2=5 or mine3=5 or mine4=5 or mine5=5 or mine6=5}{e=":bomb:"}{endif}
{if: mine1=6 or mine2=6 or mine3=6 or mine4=6 or mine5=6 or mine6=6}{f=":bomb:"}{endif}
{if: mine1=7 or mine2=7 or mine3=7 or mine4=7 or mine5=7 or mine6=7}{g=":bomb:"}{endif}
{if: mine1=8 or mine2=8 or mine3=8 or mine4=8 or mine5=8 or mine6=8}{h=":bomb:"}{endif}
{if: mine1=8 or mine2=8 or mine3=8 or mine4=9 or mine5=9 or mine6=9}{i=":bomb:"}{endif}

{endnote}
{note: preview=yes; insert=no}

Select a square to move, survive and avoid mines :bomb:.
I will walk to {formmenu: default=:red_square:; :orange_square:; :yellow_square:; :green_square:; :blue_square:; :purple_square:; :brown_square:; :black_large_square:; :white_large_square:; name=selection} square!

:triangular_flag_on_post: SCORE: {=loadscore} :trophy: LEVEL: {=level} :house:ROOM: {=loadroom}

:brick::brick::brick::brick::brick:
:brick:{if: selection=":red_square:" }:foot:{else}:red_square:{endif}{if: selection=":orange_square:" }:foot:{else}:orange_square:{endif}{if: selection=":yellow_square:" }:foot:{else}:yellow_square:{endif}:brick:
:brick:{if: selection=":green_square:" }:foot:{else}:green_square:{endif}{if: selection=":blue_square:" }:foot:{else}:blue_square:{endif}{if: selection=":purple_square:" }:foot:{else}:purple_square:{endif}:brick:
:brick:{if: selection=":brown_square:" }:foot:{else}:brown_square:{endif}{if: selection=":black_large_square:" }:foot:{else}:black_large_square:{endif}{if: selection=":white_large_square:" }:foot:{else}:white_large_square:{endif}:brick:
:brick::brick::brick::brick::brick:

{if: selection=":red_square:" and a=":bomb:"}{lose=1}{a=":bomb:"}{endif}{if: selection=":orange_square:" and b=":bomb:"}{lose=1}{b=":bomb:"}{endif}{if: selection=":yellow_square:" and c=":bomb:"}{lose=1}{c=":bomb:"}{endif}{if: selection=":green_square:" and d=":bomb:"}{lose=1}{d=":bomb:"}{endif}{if: selection=":blue_square:" and e=":bomb:"}{lose=1}{e=":bomb:"}{endif}{if: selection=":purple_square:" and f=":bomb:"}{lose=1}{f=":bomb:"}{endif}{if: selection=":brown_square:" and g=":bomb:"}{lose=1}{g=":bomb:"}{endif}{if: selection=":black_large_square:" and h=":bomb:"}{lose=1}{h=":bomb:"}{endif}{if: selection=":white_large_square:" and i=":bomb:"}{lose=1}{i=":bomb:"}{endif}
{endnote}
{note: preview=no; insert=yes}
:brick::brick::brick::brick::brick:
:brick:{if: selection=":red_square:" }:foot:{else}:red_square:{endif}{if: selection=":orange_square:" }:foot:{else}:orange_square:{endif}{if: selection=":yellow_square:" }:foot:{else}:yellow_square:{endif}:brick:
:brick:{if: selection=":green_square:" }:foot:{else}:green_square:{endif}{if: selection=":blue_square:" }:foot:{else}:blue_square:{endif}{if: selection=":purple_square:" }:foot:{else}:purple_square:{endif}:brick:
:brick:{if: selection=":brown_square:" }:foot:{else}:brown_square:{endif}{if: selection=":black_large_square:" }:foot:{else}:black_large_square:{endif}{if: selection=":white_large_square:" }:foot:{else}:white_large_square:{endif}:brick:
:brick::brick::brick::brick::brick:

:foot: you steeped on : {=selection} {wait: delay=+0.3s}.{wait: delay=+0.3s}.
{wait: delay=+0.3s}.
:brick::brick::brick::brick::brick:.
:brick:{wait: delay=+0.5s}{=a}{wait: delay=+0.7s}{=b}{wait: delay=+0.5s}{=c}:brick:.
:brick:{wait: delay=+0.7s}{=d}{wait: delay=+0.5s}{=e}{wait: delay=+0.3s}{=f}:brick:.
:brick:{wait: delay=+0.6s}{=g}{wait: delay=+0.4s}{=h}{wait: delay=+0.7s}{=i}:brick:.
:brick::brick::brick::brick::brick:.
{wait: delay=+1s}.

{if: lose=1}
:boom::skull:GAME OVER​:skull::boom:
Your final score: {=loadscore}

{else}

{newscore=loadscore+1}
{if: loadroom+1>9}{newroom=1}{newlevel=level+1}{else}{newroom=loadroom+1}{newlevel=level}{endif}
YOU SURVIVE! {random-text: :sweat_smile:, :grin:, :face_holding_back_tears:, :face_with_peeking_eye:, :scream:, :dotted_line_face:, :cold_sweat:, :face_with_spiral_eyes:, :confounded:}
SCORE: {=newscore}
{wait: delay=+0.3s}
{if: level<newlevel}:trophy: New level unlock!: {wait: delay=+0.3s} +1​:bomb:{endif}
{fixedscore=substring(concat("000", newscore), -3, 3)}
{savehash=concat("Γ±A", fixedscore, "Γ±B", newlevel, "Γ±C", newroom)} {savecode=base64encode(savehash)}
:floppy_disk: Saved Code: {cursor}{=savecode}
{endif}
{endnote}

3 Likes

This is super super creative :smiley:

Can you post the snippet here by clicking the gear icon and then pasting the snippet contents? That will allow people to copy the snippet more easily.

1 Like

thanks for the advice, updating with snippet!

Hi @Yesue_Pachon_Gil.

Thanks for sharing this creative content. Please note that we're currently experiencing issues with previewing snippets in the community that are included with emojis. We're working hard to get that fixed as soon as possible.

Meanwhile, please keep up that amazing work! :slight_smile:

1 Like