Cov txheej txheem:

Yuav Ua Li Cas Microbit Game: 25 Kauj Ruam
Yuav Ua Li Cas Microbit Game: 25 Kauj Ruam

Video: Yuav Ua Li Cas Microbit Game: 25 Kauj Ruam

Video: Yuav Ua Li Cas Microbit Game: 25 Kauj Ruam
Video: ТАКОВ МОЙ ПУТЬ В L4D2 2024, Kaum ib hlis
Anonim
Yuav Ua Li Cas Microbit Game
Yuav Ua Li Cas Microbit Game

Nyob zoo, kuv lub npe yog Mohammed thiab hauv cov lus qhia no, Kuv yuav qhia koj yuav ua li cas rau tus lej me ntsis kev ua si ib qib zuj zus nrog block editor tus game yog me ntsis zoo li Tetris.

Khoom siv

Ib lub computer thiab ib qho me me teeb

Kauj Ruam 1: BUTTON A

Khawm A
Khawm A

Ua ntej, koj pib los ntawm kev mus rau "qeb nkag" thiab xaiv "On button A press".

Kauj Ruam 2: NPAJ KAUJ RUAM 2

KAUJ RUAM 2
KAUJ RUAM 2

Tom ntej no, mus rau qeb "logic" thiab xaiv "yog tias yog" Tom ntej no, "yog tias muaj tseeb ces" sab hauv, "ntawm khawm A nias". tom qab ntawd mus rau qeb "logic" thiab nqes mus rau qhov sib piv. xaiv thawj qhov koj pom (0 = 0). ces muab (0 = 0) sab hauv qhov tseeb hauv "yog tias yog"

Kauj Ruam 3: NPAJ KAUJ RUAM 3

KAUJ RUAM 3
KAUJ RUAM 3

Tom qab koj ua tiav. Mus rau "kev hloov pauv" thiab ua kom muaj qhov sib txawv (Kuv qhia koj kom ua poz rau koj qhov sib txawv. Uas txhais tau tias txoj haujlwm). muab qhov sib txawv ntawd tso rau tus lej sab laug ntawm "yog qhov tseeb" thiab ua kom qhov sib txawv ntau dua li lwm tus lej (teeb tus lej raug rau 0).

Kauj Ruam 4: KOOB TSHUAJ KAUJ RUAM 4

KAUJ RUAM 4
KAUJ RUAM 4

tom qab ntawd mus rau qeb "LED" thiab xaiv "unplot x y" thiab muab tso rau hauv "yog tias muaj tseeb ces".

Kauj Ruam 5: KAUJ RUAM 5

Khawm Kauj Ruam 5
Khawm Kauj Ruam 5

Tom qab koj ua tiav nrog qhov ntawd mus rau "qhov sib txawv" thiab xaiv qhov sib txawv poz (lossis ib qho twg uas koj tau xaiv rau ib qho dhau los) thiab muab qhov sib txawv ntawd tso rau sab laug (x). Tom qab ntawd hloov qhov raug rau 4 (y).

Kauj Ruam 6: Khawm Kauj Ruam 6

Khawm STEP 6
Khawm STEP 6

Thaum koj ua tiav nrog qhov ntawd mus rau "hloov pauv" thiab xaiv. "hloov pauv (poz) los ntawm tus lej" muab "hloov pauv (poz) los ntawm tus lej" hauv qab "unplot x y". teeb tus lej rau -1 thiab lub thawv sib txawv rau txhua yam uas koj tau xaiv rau "unplot x y" (poz).

Kauj Ruam 7: KAUJ RUAM 7

Khawm STEP 7
Khawm STEP 7

Tom ntej no, mus rau qeb "LED" thiab xaiv "phiaj x y". muab "phiaj x y" hauv qab "hloov pauv los ntawm tus lej". rau x mus rau qhov hloov pauv thiab xaiv qhov sib txawv rau qib dhau los (poz) thiab rau y teeb nws rau 4.

Kauj Ruam 8: Khawm B

Khawm B
Khawm B
Khawm B
Khawm B

Tam sim no koj tau ua tiav nrog BUTTON A. right-click BUTTON A (koj tau ua dab tsi rau cov kauj ruam dhau los) thiab theej tawm BUTTON A.

Kauj Ruam 9: Khawm B KAUJ RUAM 2

Khawm B KAUJ RUAM 2
Khawm B KAUJ RUAM 2

Tom qab koj tau theej tawm BUTTON A. hloov ON BUTTON A PRESS to ON BUTTON B PRESS.

Kauj Ruam 10: Khawm B KAUJ RUAM 3

Khawm B KAUJ RUAM 3
Khawm B KAUJ RUAM 3

tom ntej no, hloov tus lej hauv "yog tias muaj tseeb" rau 4, "rho tawm x y" tus lej rau 4, "hloov pauv los ntawm tus lej" tus lej rau 1 thiab "phiaj x y" tus lej rau 4.

Kauj Ruam 11: Khawm B KAUJ RUAM 4

Khawm B KAUJ RUAM 4
Khawm B KAUJ RUAM 4

yog tias koj tau ua raws cov kauj ruam dhau los kom raug koj yuav tsum ua tiav nrog BUTTON B.

Kauj Ruam 12: Pib

NTUJ
NTUJ

tam sim no koj tau ua tiav nrog BUTTON B, cia peb pib nrog ON START. ua ntej, mus rau "theem pib" thiab xaiv "ON START", tom ntej no mus rau qeb "hloov pauv" thiab xaiv "teeb tsa sib txawv rau tus lej" thiab muab "teeb tsa sib txawv rau tus lej" sab hauv, ON START. hloov tus lej rau 2 thiab hloov pauv mus rau qhov koj muab rau BUTTON A (poz).

Kauj Ruam 13: NYOB QHIA KAUJ RUAM 2

NYOB HAUV STEP 2
NYOB HAUV STEP 2

Tom ntej no, mus rau qeb "hloov pauv" thiab ua qhov hloov pauv tshiab hu ua qhab nia (qhov ntawd yog qhov kuv pom zoo kom koj tso). thaum koj ua tiav nrog qhov ntawd mus rau qeb "hloov pauv" thiab xaiv "teeb tsa sib txawv rau tus lej" muab "teeb tsa sib txawv rau tus lej" hauv thawj "teeb sib txawv rau tus lej". tom qab ntawd hloov tus lej rau 0 thiab qhov sib txawv kom tau qhab nia rau qhov thib ob "teeb tsa sib txawv rau tus lej".

Kauj Ruam 14: NTAWV KAUJ RUAM 3

NYOB HAUV STEP 3
NYOB HAUV STEP 3
NYOB HAUV STEP 3
NYOB HAUV STEP 3

Tom ntej no, mus rau qeb "LED" thiab xaiv lub pob ntxiv. tom qab ntawd nyem rau "teeb ci rau tus lej" muab qhov ntawd nyob hauv qhov thib ob "teeb tsa sib txawv rau tus lej" thiab hloov qhov ci ci rau qhov koj xav tau tab sis kuv pom zoo 1000.

Kauj Ruam 15: NYOB HAUV STEP 4

NYOB HAUV STEP 4
NYOB HAUV STEP 4

tom ntej no, mus rau qeb "LED" thiab xaiv "zaj lus x y" muab "zaj lus x y" hauv qab "teeb ci rau tus lej". tom qab ntawd mus rau qhov sib txawv thiab xaiv poz (lossis xijpeem koj xaiv rau koj thawj qhov sib txawv) thiab muab qhov sib txawv ntawd "x" thiab teeb "y" rau 4.

Kauj Ruam 16: QHOV TSEEB TSHIAB

MAIN GAME
MAIN GAME

Tam sim no koj tau ua tiav nrog pib peb tuaj yeem pib nrog QHOV KEV UA SI. xub mus rau qeb "hauv paus" thiab xaiv mus ib txhis.

Kauj Ruam 17: QHOV TSEEM CEEB TSHAJ PLAWS KAUJ RUAM 2

MAIN GAME STEP 2
MAIN GAME STEP 2

Tom ntej no mus rau qeb "hloov pauv" thiab xaiv "teeb tsa sib txawv rau tus lej" muab "teeb tsa sib txawv rau tus lej" sab hauv "mus ib txhis". thaum koj ua tiav nrog qhov ntawd mus rau qeb "hloov pauv" dua thiab ua qhov hloov pauv tshiab hu ua khoob. tom ntej no mus rau qeb hu ua "lej" thiab xaiv "xaiv tus lej tsis raug rau tus lej" thiab muab "xaiv tus lej tsis raug rau tus lej" sab hauv tus lej "teeb tsa sib txawv rau tus lej". hloov pauv tus lej tom ntej "xaiv tus lej random rau tus lej" rau 0 rau tus lej thawj thiab 4 rau tus lej thib ob.

Kauj Ruam 18: QHOV TSEEB QHOV TSEEB KAUJ RUAM 3

MAIN GAME KAUJ RUAM 3
MAIN GAME KAUJ RUAM 3

tom qab koj ua tiav nrog qhov ntawd mus rau qeb "loops" thiab xaiv "rau qhov sib txawv los ntawm 0 rau tus lej ua" muab "rau qhov sib txawv los ntawm 0 rau tus lej ua" hauv qab "teeb tsa sib txawv rau tus lej". hloov tus lej rau 4. tom ntej no mus rau qeb "hloov pauv" thiab ua qhov hloov pauv tshiab hu ua "a" muab "a" hauv qhov sib txawv ntawm "rau qhov sib txawv ntawm 0 rau tus lej ua".

Kauj Ruam 19: QHOV TSEEB QHOV TSEEB KAUJ RUAM 4

MAIN GAME STEP 4
MAIN GAME STEP 4

tom ntej no mus rau qeb "loops" dua thiab xaiv "rau qhov sib txawv los ntawm 0 rau tus lej ua" muab "rau qhov sib txawv los ntawm 0 rau tus lej ua" sab hauv thawj "rau qhov sib txawv ntawm 0 rau tus lej ua". hloov tus lej rau 4. tom ntej no mus rau qeb "hloov pauv" thiab ua qhov hloov pauv tshiab hu ua "ind" muab "ind" hauv qhov sib txawv ntawm qhov thib ob "rau qhov sib txawv ntawm 0 rau tus lej ua". tom ntej no mus rau qeb "logic" thiab xaiv "yog qhov tseeb" "tso" yog qhov tseeb "hauv qhov thib ob" rau qhov sib txawv ntawm 0 rau tus lej ua " thiab tom qab ntawd mus rau qeb "logic" thiab nqes mus rau qhov sib piv. xaiv thawj qhov koj pom (0 = 0). ces muab (0 = 0) sab hauv qhov tseeb hauv "yog tias yog" tom qab ntawd rau thawj 0 hloov nws mus rau qhov sib txawv "khoob" thiab qhov thib ob 0 rau qhov sib txawv "ind" tom qab ntawd ua rau lub siab nyob nruab nrab ntawm ob qhov kev hloov pauv hais tias "tsis sib npaug" (zoo li yog = sigh nrog kab nruab nrab). tom ntej no mus rau qeb "LED" thiab xaiv "zaj lus x y" muab "zaj lus x y" sab hauv "yog tias yog" hloov "x" rau qhov sib txawv "ind" thiab "y" rau qhov sib txawv "a"

Kauj Ruam 20: QHOV TSEEB QHOV TSEEB KAUJ RUAM 5

MAIN GAME STEP 5
MAIN GAME STEP 5

tom ntej no mus rau qeb "yooj yim" thiab xaiv "ncua (ms) tus lej" muab "ncua" (tus lej) tus lej "hauv qab qhov thib ob" rau qhov sib txawv ntawm 0 rau tus lej ua ". tom qab ntawd mus rau qeb "lej" thiab xaiv "tus lej rho tus lej" muab "tus lej rho tus lej" sab hauv qhov tseeb hauv "yog tias yog" ua thawj tus lej sib npaug rau 300 thiab muab qhov sib txawv "qhab nia" ntawm tus lej thib ob.

Kauj Ruam 21: QHOV TSEEB QHOV TSEEB KAUJ RUAM 6

MAIN GAME STEP 6
MAIN GAME STEP 6

tom ntej no mus rau qeb "loops" dua thiab xaiv "rau qhov sib txawv los ntawm 0 rau tus lej ua" muab "rau qhov sib txawv los ntawm 0 rau tus lej ua" hauv qab "ncua (ms) tus lej". hloov tus naj npawb ntawm "rau qhov sib txawv ntawm 0 rau tus lej ua" rau 4. tom ntej tso "ind" hauv qhov sib txawv ntawm tus thib peb "rau qhov sib txawv ntawm 0 rau tus lej ua". tom ntej no mus rau qeb "logic" thiab xaiv "yog qhov tseeb" "tso" yog qhov tseeb "hauv qhov thib peb" rau qhov sib txawv los ntawm 0 rau tus lej ua " thiab tom qab ntawd mus rau qeb "logic" thiab nqes mus rau qhov sib piv. xaiv thawj qhov koj pom (0 = 0). ces muab (0 = 0) sab hauv qhov tseeb hauv "yog tias yog" tom qab ntawd rau thawj 0 hloov nws mus rau qhov sib txawv "khoob" thiab qhov thib ob 0 rau qhov sib txawv "ind" tom qab ntawd ua rau lub siab nyob nruab nrab ntawm ob qhov kev hloov pauv hais tias "tsis sib npaug" (zoo li yog = sigh nrog kab nruab nrab). tom ntej no mus rau qeb "LED" thiab xaiv "unplot x y" muab "unplot x y" sab hauv "yog tias yog" hloov "x" rau qhov sib txawv "ind" thiab "y" rau qhov sib txawv "a"

Kauj Ruam 22: QHOV TSEEB QHOV TSEEB KAUJ RUAM 7

HAUV QAB SIAB KAUJ RUAM 7
HAUV QAB SIAB KAUJ RUAM 7

tom ntej no mus rau qeb "logic" thiab xaiv "yog qhov tseeb" "tso" yog tias yog "tom qab qhov thib peb" rau qhov sib txawv ntawm 0 rau tus lej ua " tom qab ntawd mus rau qeb "logic" thiab nqes mus rau "Boolean" thiab xaiv "blank and blank" ces mus rau qeb "logic" dua thiab coj 2 "tus lej = rau tus lej" tsim qhov sib piv. tom qab ntawd muab txhua tus ntawm "tus lej = rau tus lej" ntawm txhua sab ntawm qhov khoob ua "khoob thiab khoob". thiab tom qab ntawd muab tso rau hauv "yog tias muaj tseeb". txuas ntxiv rau sab laug "tus lej = rau tus lej" tso tus lej sib txawv "a" ntawm tus lej sab laug thiab 4 rau tus lej sab xis thiab nruab nrab qhov = xyu thiab rau sab xis "tus lej = rau tus lej" muab qhov sib txawv "poz "ntawm tus lej sab laug thiab qhov sib txawv" khoob "rau tus lej raug thiab nyob hauv nruab nrab tsis yog = rau siab. (yog tias koj me ntsis tsis meej pem yuav ua li cas thiaj zoo li saib daim duab)

Kauj Ruam 23: QHOV TSEEB QHOV TSEEB KAUJ RUAM 8

MAIN GAME STEP 8
MAIN GAME STEP 8

tom ntej (xaiv tau) mus rau qeb "suab paj nruag" thiab xaiv "pib suab paj nruag (nkauj) rov ua dua (ntau npaum li cas)" tso "pib suab paj nruag (suab paj nruag) rov ua dua (ntau zaus)" hauv qhov thib peb "yog tias yog". hloov qhov rov ua dua mus rau "ib zaug" thiab suab paj nruag rau "dadadum". tom ntej no mus rau qeb "yooj yim" thiab xaiv "qhia lub cim" tso "qhia lub cim" (ua lub cim rau hauv X) hauv qab "pib suab paj nruag (nkauj) rov ua dua (ntau zaus)", tom qab ntawd mus rau qeb "yooj yim" "dua thiab mus rau" ntau dua "tom qab ntawd xaiv" lub vijtsam meej "muab" lub vijtsam ntshiab "nyob hauv" qhia lub cim ". tom ntej no mus rau qeb "yooj yim" thiab xaiv "qhia tus lej 0" muab "qhia tus lej 0" hauv qab "tshuaj ntsuam ntshiab". hloov 0 hauv "qhia tus lej 0" mus rau qhov sib txawv "qhab nia". tom ntej no mus rau qeb "hloov pauv" thiab xaiv "teeb tsa sib txawv rau tus lej" muab "teeb tsa sib txawv rau tus lej" hauv qab "qhia tus lej 0". tom qab ntawd hloov qhov sib txawv hauv "teeb tsa hloov pauv mus rau tus lej" rau "qhab nia" thiab tus lej hauv "teeb tsa hloov mus rau tus lej" rau 0. tom ntej no mus rau qeb "hloov pauv" thiab xaiv "teeb tsa sib txawv rau tus lej" muab "teeb tsa sib txawv rau tus lej "hauv thawj" teeb tsa sib txawv rau tus lej ". tom qab ntawd hloov qhov sib txawv hauv qhov thib ob "teeb tsa sib txawv rau tus lej" rau "poz" thiab tus lej hauv qhov thib ob "teeb tsa sib txawv rau tus lej" rau 2. tom ntej no mus rau qeb "LED" thiab xaiv "phiaj xy" muab " zaj lus xy "nyob hauv qhov thib ob" teeb tsa sib txawv rau tus lej ". tom qab ntawd hloov qhov "x" hauv "zaj lus xy" rau "poz" thiab "y" hauv "zaj lus xy" mus rau 4. tom ntej no mus rau qeb theem pib thiab xaiv "ncua (ms) tus lej" tso "ncua (ms) tus lej "under" plot xy ". tom qab ntawd hloov tus lej ntawm "ncua (tus lej) tus lej" mus rau 2000.

Kauj Ruam 24: QHOV TSEEB QHOV TSEEB KAUJ RUAM 9

MAIN GAME STEP 9
MAIN GAME STEP 9

tom ntej no mus rau qeb "game" tsim lub pob qib siab thiab xaiv "hloov pauv tus lej los ntawm tus lej" muab "hloov pauv tus lej los ntawm tus lej" hauv-ntawm thawj "rau qhov sib txawv los ntawm 0 rau tus lej" thiab "mus ib txhis". yog tias koj tau ua raws cov lus qhia no kom raug koj yuav tsum ua tiav nrog MAIN GAME (yog tias koj tsis meej pem ntawm ib qho lus qhia saib ntawm daim duab).

Kauj Ruam 25: BACKGROUND MUSIC (OPTIONAL)

BACKGROUND MUSIC (YOOJ YIM)
BACKGROUND MUSIC (YOOJ YIM)

tom ntej no mus rau "tswj" uas yog nyob rau hauv ntu qib siab thiab xaiv "khiav hauv keeb kwm yav dhau". tom qab ntawd mus rau nkauj thiab xaiv "pib suab paj nruag (suab paj nruag) rov ua dua (ntau npaum li cas)" muab "pib suab paj nruag (nkauj) rov ua dua (ntau zaus)" sab hauv "khiav hauv keeb kwm yav dhau". tom qab ntawd ua "suab paj nruag" hauv "pib suab paj nruag (suab paj nruag) rov ua dua (ntau npaum li cas)" txhua yam koj xav tau (Kuv tau ua funk) thiab rov hais dua hauv "pib suab paj nruag (suab paj nruag) rov ua dua (ntau zaus)" rau "mus ib txhis hauv keeb kwm yav dhau ".

Pom zoo: