Cov txheej txheem:

Memory Puzzle Game Siv BBC MicroBit: 7 Kauj Ruam
Memory Puzzle Game Siv BBC MicroBit: 7 Kauj Ruam

Video: Memory Puzzle Game Siv BBC MicroBit: 7 Kauj Ruam

Video: Memory Puzzle Game Siv BBC MicroBit: 7 Kauj Ruam
Video: Chimp vs Human! | Memory Test | BBC Earth 2024, Kaum ib hlis
Anonim
Image
Image

Yog tias koj tsis paub tias BBC MicroBit yog dab tsi, nws yog ib qho cuab yeej me me tiag tiag uas koj tuaj yeem ua haujlwm tau kom muaj cov tswv yim thiab tawm tswv yim. Kindof zoo li Arduino, tab sis ntau fleshed tawm.

Qhov kuv nyiam tiag tiag txog MicroBit yog tias nws muaj ob lub khawm ua hauv thiab 5 x 5 coj matrix!

Yog li, kuv xav, vim li cas ho tsis tsim qhov yooj yim los ua, tab sis nyuaj rau ua si nco kev ua si puzzle!

ps: Yog tias koj tsis xav tau tus lej, kuv yuav xa cov ntaub ntawv.hex mus ncaj qha upload rau MicroBit.

Khoom siv

Txhua yam koj xav tau yog

1) BBC MicroBit

2) Lub khoos phis tawj lossis lub khoos phis tawj kom ua haujlwm Microbit

3) Qee qhov ua siab ntev!

Kauj Ruam 1: Tsim txoj haujlwm Siv Online Block Based Coding Platform, Makecode

Mus rau https://makecode.microbit.org/ thiab tsim txoj haujlwm tshiab. Nov yog qhov uas peb yuav tsim cov cai rau peb cov game.

Nov yog kuv tus lej txuas:

Kauj Ruam 2: Dab Tsi Yog Game?

Zoo, xav txog qhov no ua ob lub khawm Simon Says game.

Lub vijtsam yuav qhia txog kev sib xyaw ua ke ntawm A thiab B thiab tus neeg uas ua ntawv yuav tsum tau cim ntu ua ntu zus thiab tom qab ntawd nkag nws siv A thiab B khawm ntawm MicroBit.

Txhawm rau ua kom qhov kev ua si nyuaj dua, peb yuav nce tus lej los ntawm 2 txhua qhov puag ncig thiab tseem txo lub sijhawm uas txhua tus ntawv nyob ntawm qhov screen.

Cia mus!

Kauj ruam 3: Nws yog lub sijhawm CODING !

Zoo, tsis yog. Raws li lub vev xaib makercode yog tus pib zoo tiag tiag thiab muaj qee yam hu ua block coding. Ntawm no, peb tsuas yog siv cov block, thiab ua ke nrog ntau lub thaiv! Amazing, Ua tsaug!

Zoo ua ntej peb yuav tsum nkag siab tias peb xav tau dab tsi rau tus lej.

Hauv qhov pib thaiv, peb yuav ntxiv qhov hloov pauv thoob ntiaj teb, thiab hloov qhov ci ci yog xav tau.

"qib" = 1, "Ncua" = 500, "set.score" = 0.

Peb yuav siv cov qhab nia ua haujlwm kom taug qab cov qhab nia.

Hauv peb qhov kev ua si, thawj qib yog xaiv cov ntawv tsis raug: A lossis B.

Peb tuaj yeem ua qhov no los ntawm kev xaiv thawj zaug ntawm 1 thiab 2 thiab tom qab ntawd muab A rau 1 thiab B rau 2 thiab khaws cia hauv qhov sib txawv "AB".

Voila!

tam sim no, rau txhua lub sijhawm peb xaiv A lossis B, peb yuav tso nws tawm ntawm lub vijtsam rau lub sijhawm "qeeb" ms.

qhov no yog qhov sib txawv raws qib, peb yuav txo qhov "Ncua" los ntawm 50 ms, txog thaum nws yog 50 ms, los ntawm kev pib qib 1 nrog 500 ms.

Kauj Ruam 4: Rov Ua Dua Qhov no rau Txhua Qib Nrog Kev nce ntawm Ob Tsab Ntawv

Peb ua tiav qhov no los ntawm kev rov ua qhov thaiv "Ntev" pes tsawg lub sijhawm nyob qhov twg

Ntev = 2 + (qib - 1) x 2.

Qhov no ua dab tsi yog, yog tias peb muaj qib = 1 thaum pib ntawm lub voj, thiab peb nce qib los ntawm 1, peb qhov ntev ib qib dhau los ua 2, 4, 6, 8 thiab ntxiv rau.

Tam sim no, tom qab peb tsim tsab ntawv, peb xav khaws nws ib yam. Yog li, peb teeb kab blanl "Lus Nug" ua "Lus Nug" + "AB"

Qhov no yuav muab rau peb txhua txoj hlua uas peb tau tsim tsab ntawv los ntawm tsab ntawv.

peb kuj xav tau qee yam kev qhia kom pom tias lub voj no tau xaus lossis tsis yog li peb tuaj yeem tau txais cov lus teb los ntawm cov neeg ua si. peb ua qhov no los ntawm kev teeb tsa qhov sib txawv hu ua "cond" thaum pib ua 0, thiab tom qab ntawd hloov nws mus rau 1 raws li lub voj xaus. yooj yim!

peb kuj yuav tsum ntxiv qhov xwm txheej so rau lub voj. Yog tias qhov kev ua si dhau mus, tom qab ntawd peb xav tau nws txhawm rau tawm ntawm lub voj thiab tsis tsim cov tsiaj ntawv ntau ntxiv.

Peb yuav muab txhua yam no tso rau hauv ib txoj haujlwm hu ua "Tsim", ntxiv qee cov duab pib, pov rau hauv cov duab nyob ntawd, ntxiv? thaum kawg, thiab boom!

Kauj ruam 5: Tau Txais Cov Lus Teb

Thaum tus neeg siv nias A lossis B, peb yuav tsum khaws cov ntaub ntawv ntawd thiab ua ib txoj hlua "Teb" kom peb tuaj yeem sib piv nws rau "Lus Nug".

Peb ua qhov no los ntawm kev tau txais cov lus tawm tsuas yog thaum "cond" = 1 txhawm rau tiv thaiv tus neeg siv nkag los teb cov lus teb raws li "Cov Lus Nug" tab tom tshwm.

Peb mam li muab cov ntawv nkag rau hauv ib txoj hlua raws li txuag nws "Teb".

Nkag siab?

Kauj Ruam 6: Txheeb Cov Lus Teb

Tam sim no, peb tsuas yog sib piv "Cov Lus Nug" peb tsim tawm rau "Cov Lus Teb" uas tau muab los ntawm tus neeg ua si.

Yog tias lawv sib phim, ces peb mus rau qib tom ntej, lwm yam…. GAME OVER !!!

Thiab peb tso cov qhab nia ntawm qhov kawg.

Qhov no kuj peb yuav khaws hauv txoj haujlwm hu ua "Txheeb Xyuas" uas yuav raug hu yog "cond" = 1 thaum tau txais cov lus qhia, lwm yam …. GAME OVER!

Kauj ruam 7: Ua tiav

Tam sim no, txhua yam peb yuav tsum tau ua yog upload cov cai rau MicroBit, thiab tom qab ntawd sim txhua tus uas koj paub!

Pom zoo: