Cov txheej txheem:

Microbit Tic Tac Toe Game: 4 Kauj Ruam (nrog Duab)
Microbit Tic Tac Toe Game: 4 Kauj Ruam (nrog Duab)

Video: Microbit Tic Tac Toe Game: 4 Kauj Ruam (nrog Duab)

Video: Microbit Tic Tac Toe Game: 4 Kauj Ruam (nrog Duab)
Video: How POSERS push for speed?! #skateboarding #skate #sk8 #shorts 2024, Hlis ntuj nqeg
Anonim
Image
Image

Txog qhov haujlwm no, kuv tus neeg ua haujlwm ua haujlwm - @descartez thiab kuv tau tsim qhov kev ua si zoo tic tac ntiv taw siv xov tooj cua ua haujlwm ntawm microbits. Yog tias koj tsis tau hnov txog microbits ua ntej, lawv yog qhov txaus microcontroller tsim los qhia cov menyuam txoj haujlwm. Lawv muaj TON ntawm kev ua haujlwm nrog rau yam peb tau siv rau txoj haujlwm no; LED matrix, 2 khawm, thiab muaj peev xwm siv xov tooj cua. Qhov kev ua si ua haujlwm yooj yim heev, peb muaj 3x3 daim phiaj ntawm cov neeg ua haujlwm mirco: cov khoom uas xa lub teeb liab ntawm X lossis O rau tus tswv micro: me ntsis uas taug qab txhua qhov kev yeej hauv xeev thiab tseem rov ua qhov kev ua si. Peb muaj peev xwm ua kom tiav txoj haujlwm no tsawg dua 24 teev thiab nthuav tawm nws thaum lub sijhawm tshwm sim rau lub asthiv tom ntej uas nws tau siv hnyav! Thiab tib neeg zoo li txaus siab rau nws! Pom tseeb, thaum koj ua raws, koj yuav pom qhov twg peb yuav tau txiav qee lub ces kaum kom ua tiav lub sijhawm, tab sis peb xav tias yam peb muaj kom deb li deb yog qhov zoo nkauj. Qhia peb koj cov tic tac ntiv taw ua si, lossis qee qhov chaw peb tuaj yeem txhim kho!

Khoom siv

Kauj ruam 1: Cov ntaub ntawv

Khoom siv
Khoom siv
  • 10 tus tswj hwm me me (Txhua qhov ua ke qhov no nyob ib puag ncig $ 150, uas yog ntau heev!
  • micropython IDE
  • Laum nrog 1/4 hauv ntsis
  • 4 daim ntawm 12 x 24 "1/8 plywood
  • 3 6m 20mm ntsia liaj qhov rooj
  • 16m 40mm taub
  • 46mm cev

Kauj Ruam 2: Kev Tsim Game

Kauj Ruam 1: Txiav txim cov cai rau Tic Tac Toe

Peb tau siv cov no

Kauj Ruam 2: Tus lej rau tus neeg ua haujlwm: khoom

Txhua tus neeg ua haujlwm: muab me ntsis ua haujlwm

(0, 0) (0, 1) (0, 2)

(1, 0) (1, 1) (1, 2)

(2, 0) (2, 1) (2, 2)

  • Qhov kev sib koom tes no tau hloov kho hauv kab saum toj kawg nkaus ntawm cov cai rau tus neeg ua haujlwm: khoom.

    • cov_x = 0
    • cov_y = 0
  • Txhua tus neeg ua haujlwm muaj ob yam. 1) Thaum khawm A tau nias LED matrix flashes X thiab lub xov tooj cua teeb liab xa mus rau tus tswv hais tias 'X raug nias ntawm microbit (0, 0)', thiab zoo ib yam rau khawm B.

Kauj ruam 3: Code rau tus tswv micro: ntsis

  • Tus tswv micro: me ntsis paub ntau yam.

    • Nws paub txhua lub xeev yeej

      • Kab

        • (0, 0)(1, 0)(2, 0)
        • (0, 1)(1, 1)(2, 1)
        • (0, 2)(1, 2)(2, 2)
      • Kab

        • (0, 0)(0, 1)(0, 2)
        • (1, 0)(1, 1)(1, 2)
        • (2, 0)(2, 1)(2, 2)
      • Kab pheeb ces kaum

        • (0, 0)(1, 1)(2, 2)
        • (0, 2)(1, 1)(2, 0)
    • Nws paub tias tsuas muaj 9: khoom, thiab qhov kev ua si xaus tam sim tom qab lub xeev yeej raug xa mus
    • Nws tuaj yeem rov ua qhov kev ua si, thiab tshem tawm txhua tus neeg ua haujlwm: khoom

      Nov yog peb qhov kev daws teeb meem rau txhua qhov ntawm qhov hauv qhov chaws, vim tias peb tau ua txoj haujlwm no sai heev. Yog tias muaj miv's game, cov neeg siv yuav tsum ntaus rov pib dua. Txwv tsis pub, peb yuav tsum tau ntxiv rau hauv ib qho ntxiv ntawm cov cai rau txhua Tie game xeev, thiab peb tsuas yog tsis muaj sijhawm los ua qhov ntawd

Txuas mus rau Descartez tus lej ntawm Github

Kauj Ruam 3: Tsim Kev Ruaj Ntseg

Tsim Qhov Ruaj Ntseg
Tsim Qhov Ruaj Ntseg
Tsim Qhov Ruaj Ntseg
Tsim Qhov Ruaj Ntseg
Tsim Qhov Ruaj Ntseg
Tsim Qhov Ruaj Ntseg

Kuv paub hauv kev ua qhov haujlwm no uas kuv xav kom muaj peev xwm nthuav tawm qhov no, thiab tias kuv yuav tsis muaj peev xwm siv tau. Qhov no yog ob qho koob hmoov thiab teeb meem vim tias nws txhais tau tias txhua lub micro: me ntsis yuav xav tau lub roj teeb txuas nrog. Txoj kev daws teeb meem yooj yim tshaj plaws yog muab txhua yam tso rau hauv ib lub thawv. Txog qhov no, kuv tsim ib qho siv makercase.com. Kuv tsim nws loj txaus uas nws tuaj yeem tuav lub micro: cov khoom thiab lawv cov roj teeb, nrog rau muaj qee cov lus qhia sau.

Kuv kuj paub tias kuv xav tau kev txhawb nqa rau micro: cov khoom kom tsis poob rau hauv, yog li kuv laser txiav ib qho me me kom haum tom qab micro: khoom. Cov khoom no tau ruaj ntseg screws. Lub nraub qaum thiab ob sab tau sib koom ua ke, tab sis sab saum toj tau muab cais tawm thiab tsuas yog ruaj nrog cov ntsia hlau, yog li kuv tuaj yeem nkag mus rau sab hauv raws li xav tau. Kuv siv daim kab xev los tuav lub vaj huam sib luag sab hauv. Thiab xev lawv rau phaj pem hauv ntej kom lawv tsis poob lossis nqis.

Nws yog qhov nyuaj me ntsis, tab sis kuv tau txais tag nrho cov microbits ntsaws nrog lawv cov roj teeb thiab kaw rau hauv. Ntawm 3 lub ces kaum kuv siv me me 6m ntsia hlau kom ruaj ntseg rau pem hauv ntej vaj huam sib luag thiab sab hauv vaj huam sib luag ua ke. Ntawm lub ces kaum kawg, Kuv tau siv cov ntsia hlau ntev los ntswj tag nrho txoj hauv kev los ntawm lub npov kom tuav lub hau.

Kauj ruam 4: Playtesting

Kev sim ua si
Kev sim ua si
Kev sim ua si
Kev sim ua si
Kev sim ua si
Kev sim ua si
Kev sim ua si
Kev sim ua si

Qhov kev ua si no tau tsoo ntawm peb qhov kev tshwm sim lis xaus! Cov menyuam yaus thiab cov laus ob leeg zoo li txaus siab tiag tiag los sim ua qhov tshwm sim, ntxiv rau, yam khoom siv tau siv. Txoj haujlwm no tsuas yog coj peb hmo ua ke, thiab nws tsim nyog nws. Qhia peb koj cov qauv tsim, thiab qhia rau peb paub tias koj tau tweaks dab tsi!

Pom zoo: