Cov txheej txheem:

Petanque / Jeu-de-Boules Score Khaws Daim Ntawv Thov: 7 Kauj Ruam
Petanque / Jeu-de-Boules Score Khaws Daim Ntawv Thov: 7 Kauj Ruam

Video: Petanque / Jeu-de-Boules Score Khaws Daim Ntawv Thov: 7 Kauj Ruam

Video: Petanque / Jeu-de-Boules Score Khaws Daim Ntawv Thov: 7 Kauj Ruam
Video: Comment jouer à la pétanque ? Découvrez les règles du jeu ! 2024, Kaum ib hlis
Anonim
Petanque / Jeu-de-Boules Score Keeping Application
Petanque / Jeu-de-Boules Score Keeping Application
Petanque / Jeu-de-Boules Score Keeping Application
Petanque / Jeu-de-Boules Score Keeping Application
Petanque / Jeu-de-Boules Score Keeping Application
Petanque / Jeu-de-Boules Score Keeping Application

Nov yog Petanque cov qhab nia khaws daim ntawv thov (qee zaum hu ua Jeu de Boules) rau Android. Daim ntawv thov no tuaj yeem siv ib yam nkaus thiab yog thiab ua haujlwm tau zoo. Lossis nws tuaj yeem siv ua ke nrog Petanque Matrix zaub [cais cov lus qhia]. Ib feem ntawm txoj haujlwm no yooj yim vim tsis xav tau kho vajtse, tsuas yog pub dawb muaj software.

Khoom siv

  1. Lub xov tooj sib xws hauv Android (nyiam dua)
  2. Ib lub cuab yeej uas muaj internet nkag tau yooj yim dua, zoo dua lub khoos phis tawj nrog nas rau kev teeb tsa thiab tsim qauv ua haujlwm
  3. Ib tus as khauj nrog MIT App Inventor (Pub Dawb)
  4. Ib daim duab yooj yim xws li Pixlr lossis Gimp (txhua yam pub dawb)
  5. Lub cim peev txheej lub vev xaib xws li Cov khoom UI cim lossis Material.io (txhua yam pub dawb)

Software thiab Sourcecode:

Koj tuaj yeem pom qhov txuas mus rau Daim Ntawv Thov Petanque tiag nyob hauv qab ntawm nplooj ntawv no. Ntawm no koj tseem tuaj yeem pom qhov txuas mus rau qhov chaws tag nrho (thov txim rau qhov no, tab sis Cov Lus Qhia tsis tso cai rau kuv rub tawm cov ntaub ntawv.aia …).

Kauj Ruam 1: Lub cev thiab kev taw qhia ntawm App

Anatomy thiab Navigation ntawm App
Anatomy thiab Navigation ntawm App

Tus tsim thiab taw qhia ntawm lub app yog yooj yim zoo nkauj. Muaj 4 cov ntxaij vab tshaus tag nrho:

  1. Lub vijtsam tseem ceeb #1 (qhov uas peb siv sijhawm ntau ntawm peb lub sijhawm khaws cov qhab nia)
  2. Matches screen #2 (qhov uas peb pom cov npe ntawm txhua qhov ua si sib tw thiab cov qhab nia)
  3. Cov chaw tshuaj ntsuam #3 (teeb tsa rau lub app, kev tswj hwm haujlwm, debug thiab lwm yam)
  4. Txog qhov screen #0 (txog, logo thiab qhov twg kom tau txais cov lus qhia tsim xws li NO lub vev xaib)

Kev teeb tsa ntawm cov ntxaij vab tshaus thiab qhov chaw ntawm cov nyees khawm tau ua kom zoo dua rau 1 tes thiab 1 ntiv tes (ntiv tes xoo) siv. Cov nyees khawm ntawm cov ntawv qhia hauv qab coj koj mus rau cov ntxaij vab tshaus rau sab xis lossis sab laug ntawm lub vijtsam tam sim no. Yog li khawm 0 coj koj mus txog Qhov screen #0. Thiab khawm #1 coj koj rov qab mus rau lub vijtsam loj #1 thiab lwm yam, usw.

Ntshiab? Tshaj cia txuas ntxiv mus…

Kauj Ruam 2: Cov Ntaub Ntawv (hauv paus) Tsim

Cov Ntaub Ntawv (hauv paus) Tsim
Cov Ntaub Ntawv (hauv paus) Tsim
Cov Ntaub Ntawv (hauv paus) Tsim
Cov Ntaub Ntawv (hauv paus) Tsim

Tam sim no, ua ntej peb tsim thawj lub vijtsam peb xav tau qee qhov chaw khaws tag nrho cov ntaub ntawv uas lub app no yuav siv. Txog qhov no peb yuav siv daim ntawv yooj yim tshaj plaws uas MIT App Inventor tau muab: TinyDB. Qhov no yog qhov txwv txij li nws tsuas tuaj yeem khaws tus Key/Tus khub, tab sis nrog kev pab me ntsis thiab qee qhov dag peb tuaj yeem ua qhov no ua txhua yam peb xav tau.

Muaj 2 hom txiaj ntsig uas peb yuav khaws:

  • Peb yuav khaws 10 qhov tseem ceeb yooj yim/tus nqi app thoob qhov tseem ceeb (raws li qhia hauv 'CreateIgnoreList' ua haujlwm saum toj no).
  • Thiab qhov nyuaj dua qhov tseem ceeb/tus nqi khaws cia txhua qhov ua tiav cov ntaub ntawv ua si hauv ib txoj hlua nrog qhov 'CurrentMatch' qhov tseem ceeb/tus nqi ua tus Thawj Tseem Ceeb * (raws li qhia hauv 'SaveScore' ua haujlwm saum toj no). Cov teb no nyob hauv ib qho tseem ceeb/tus khub sib cais los ntawm qhov tsis pom kev tswj tus cwj pwm '\ t'. Qhov kev tswj hwm tus cwj pwm no yuav pab peb hauv Matches screen #2 kom rov qab tau txhua qhov txiaj ntsig rau hauv nws cov khoom sib cais thiab tso tawm thiab txheeb lawv. Tab sis ntau ntxiv txog qhov ntawd hauv ntu Screen 2 (ntais ntawv).

* Xav paub ntau ntxiv txog yuav ua li cas thiaj tsim PrimaryKey rau TinyDb hauv AppInventor hauv YouTube.

Kauj Ruam 3: Screen 1 (Qhov Tseem Ceeb)

Screen 1 (Qhov Tseem Ceeb)
Screen 1 (Qhov Tseem Ceeb)
Screen 1 (Qhov Tseem Ceeb)
Screen 1 (Qhov Tseem Ceeb)
Screen 1 (Qhov Tseem Ceeb)
Screen 1 (Qhov Tseem Ceeb)

Nov yog peb lub vijtsam 'ua haujlwm' uas peb yuav siv sijhawm ntau los ua tus siv lub app. Nws tseem yog qhov pib rau peb MIT App Inventor app.

Raws li koj tuaj yeem pom los ntawm (daim duab #1) saum toj no txawm hais tias lub vijtsam yooj yim hauv kev teeb tsa, muaj qee qhov kev sib tham sib zais, kev ua yuam kev, rub tawm, sib cais-tshuaj ntsuam, cov ntawv qhia zaub mov ntab, swiping gestures, tiv thaiv kev ua yuam kev, cov tswv yim tsis raug thiab txawm tias rov zoo los ntawm kev sib tsoo Rau tag nrho cov yam ntxwv no thov saib cov ncauj lus kom ntxaws code rau txhua lub vijtsam. Yog li koj tuaj yeem ua dab tsi ntawm no:

  • Nias 'Team 1' thiab koj yuav tau txais Ntawv Ceeb Toom uas yuav pab koj hloov lub npe ntawm 'Team 1'. Thaum hloov qhov no yuav hloov qhov 'Pab Pawg 1' rau lub npe koj tau xaiv. Qhov no kuj yog lub npe uas yuav siv los cuam tshuam koj qhov 'game' thiab 'match' score (hauv cov ntxaij vab tshaus tom ntej).
  • Qhov 'qhab nia ntawm Pab Pawg 1' thiab 'qhab nia ntawm Pab Pawg 2' hloov pauv raws li '+' thiab '-' cov nyees khawm nias rau hauv qab ntawm txhua pab pawg. Yog tias tus qhab nia yog 0 thiab '-' raug nias lub suab thiab pom lub teeb pom kev zoo tab sis cov qhab nia tseem 0 (tau kawg).
  • Yog tias 'tus qhab nia' nce mus txog 13 ob peb yam tshwm sim: muaj lub teeb pom kev zoo, lub qhov rai ceeb toom qhia pom cov txiaj ntsig (daim duab #2) thiab muab kev xaiv rau koj los pib ua si tshiab lossis sib tw tshiab (thiab tau kawg kev ua si). Txawm li cas los xij koj tau xaiv tsis yog qhov qhab nia Petanque qub tab sis 2-qhov sib tw sib tw (uas tuaj yeem xaiv hauv qhov chaw teeb tsa #3) dua li nyob ntawm qhov sib txawv ntawm ob pab pawg ib leeg yuav tshaj tawm tus yeej (raws li pom hauv daim duab #3)).
  • Qhov 'qhab nia' hauv qhov kev sib tw tam sim no tau qhia nyob hauv nruab nrab ntawm lub vijtsam ntawm 'Team 1' thiab 'Team 2' cov qhab nia. Thiab qhov no yuav khaws cia kom txog rau thaum qhov kev sib tw tshiab tau pib.
  • Txhawm rau mus rau lwm cov ntxaij vab tshaus koj kuj tseem tuaj yeem 'so sab laug' los qhia txog Lub vijtsam Hais txog #0 lossis 'Los so Txoj Cai' kom pom qhov sib piv screen #2.

Thaum kawg ntawm hauv qab yog cov ntawv qhia kev taw qhia. Qhov no ib txwm nyob ntawm qhov qis kawg ntawm lub vijtsam, tsis muaj teeb meem dab tsi qhov loj ntawm lub vijtsam yog. Txawm hais tias Android 'Split screen' ua haujlwm tau siv. Cov ntawv qhia hauv qab hauv qab muaj 3 khawm:

  1. Hauv qab-sab laug: tus '?' khawm yuav mus rau sab laug thiab qhia qhov pib ua ntej Txog ntawm lub vijtsam (#0) dua.
  2. Hauv qab qhov chaw: khawm rov pib dua (uas zoo li '@' nrog tus xub xub) yuav ua rau koj pib qhov kev ua si tshiab lossis kev sib tw tshiab ntawm 'txhua lub sijhawm' hauv qhov kev ua si tsuas yog nias hauv qab nruab nrab 'Pib dua' khawm. Qhov no tseem yuav yog leej twg lub qhov rai ceeb toom uas yuav nug koj kom pib qhov kev ua si tshiab lossis kev sib tw tshiab.
  3. Hauv qab-txoj cai: Lub '->' khawm yuav mus rau sab xis thiab qhia qhov kev pom ntawm txhua qhov kev sib tw screen (#2).

Kauj Ruam 4: Screen 2 (Sib phim)

Screen 2 (Sib phim)
Screen 2 (Sib phim)
Screen 2 (Sib phim)
Screen 2 (Sib phim)
Screen 2 (Sib phim)
Screen 2 (Sib phim)

Txawm hais tias yooj yim heev hauv kev pleev qhov muag, lub vijtsam no muaj cov lej ntxim nyiam hauv nws dua li lwm cov ntxaij vab tshaus. Tab sis ua ntej peb mus rau hauv uas cia saib dab tsi nws tshuaj ntsuam ua:

Hauv qab daim ntawv 'Pab Pawg 1' thiab 'Pab Pawg 2' yog cov npe ntawm txhua qhov Kev Sib Tw thiab lawv cov qhab nias tag nrho. Nov yog cov npe teev tseg nrog 'sib tw ua si zaum kawg' nyob rau saum toj thiab 'ua si qub tshaj plaws ua si' hauv qab.

Hauv nruab nrab, nruab nrab ntawm 'Pab Pawg 1' thiab 'Pab Pawg 2', yog lub pob uas tuaj yeem siv los txheeb cov npe sib tw hauv ob qho tib si Ascending lossis Descending order. Lub cim yuav hloov pauv nyob ntawm qhov kev xaiv xaiv uas tau xaiv.

Txhawm rau mus rau lwm cov ntxaij vab tshaus koj kuj tseem tuaj yeem 'so sab laug' los qhia lub vijtsam loj #1 lossis 'Los so Txoj Cai' los qhia qhov screen nqis #3.

Thaum kawg ntawm hauv qab yog cov ntawv qhia kev taw qhia. Qhov no ib txwm nyob ntawm qhov qis kawg ntawm lub vijtsam, tsis muaj teeb meem dab tsi qhov loj ntawm lub vijtsam yog. Txawm hais tias Android 'Split screen' ua haujlwm tau siv (raws li qhia hauv Duab #2). Cov ntawv qhia hauv qab hauv qab muaj 3 khawm:

  1. Hauv qab-sab laug: tus '?' khawm yuav mus rau sab laug thiab qhia qhov pib ua ntej Txog ntawm lub vijtsam (#0) dua.
  2. Hauv qab qhov chaw: khawm rov pib dua (uas zoo li '@' nrog tus xub xub) yuav ua rau koj pib qhov kev ua si tshiab lossis kev sib tw tshiab ntawm 'txhua lub sijhawm' hauv qhov kev ua si tsuas yog nias hauv qab nruab nrab 'Pib dua' khawm. Qhov no tseem yuav yog leej twg lub qhov rai ceeb toom uas yuav nug koj kom pib qhov kev ua si tshiab lossis kev sib tw tshiab.
  3. Hauv qab-txoj cai: Lub '->' khawm yuav mus rau sab xis thiab qhia qhov kev pom ntawm txhua qhov kev sib tw screen (#2).

Nruab nrab cov npe ntawm Kev Sib Tw ntawm qhov screen:

Kuv xav qhia cov npe ntawm Kev Sib Tw nyob rau ntawm qhov screen nrog lub '-' faib ua qhov chaw. Tam sim no, vim tias cov naj npawb ntawm cov kev ua si uas pab pawg tau yeej tuaj yeem yog 1 lossis ntau tus lej thiab lub npe tiag ntawm txhua pab pawg tuaj yeem sib txawv hauv qhov loj me peb tsis tuaj yeem tso qhov no hauv 1 daim ntawv teev npe. Nws yuav zoo li txhua yam zoo li no:

Pab Pawg 10 - 1 Pab Pawg 2

Foo 1 - 42 FooBar

Yog li daim ntawv lo rau '-' tus faib yuav tsum tau muab nruab nrab. Nrog 'Pab Pawg 1 lub npe' thiab 'Pab Pawg 1 tau qhab nia' txoj cai sib koom mus rau sab laug ntawm '-' faib tawm. Thiab 'Team 2 score' thiab 'Team 2 name' sab laug ua ke mus rau sab xis ntawm '-' divider. Yog li peb xaus li no:

"Team 10" "-" "1 Team 2" "Foo 1" "-" "42 FooBar"

Thiab txij li kuv tsis paub ntev npaum li cas peb cov npe ntawm Cov Ntawv Sib Tw yuav yog kuv tso tag nrho 'Pab Pawg 1 lub npe' thiab 'Pab Pawg 1 tau qhab nia' rau hauv tib daim ntawv HTMLFormat thiab tom qab txhua qhov kev sib tw kuv ntxig ib qho thiab muab ib qho ntxiv rau ntawm NewLine.

Npaj cov khoom npaj rau sorting:

Raws li tau hais hauv Cov Ntaub Ntawv (hauv paus) Tsim cov kauj ruam Kuv tsuas tuaj yeem khaws ib tus nqi nkaus xwb. Yog li kuv khaws cov txiaj ntsig ntawm 'Team 1 name', 'Team 1 score', 'Team 2 score' thiab 'Team 2 name' cais los ntawm qhov tsis pom kev tswj tus cwj pwm '\ t'. Tam sim no kuv yuav tsum xub coj lawv tawm ntawm cov ntaub ntawv khaws tseg (raws li qhia hauv daim duab #3).

Cov lej ntawv qhia pom tias peb xub tshuaj xyuas yog tias Debug-chij tau teeb tsa (qhov no tau ua tiav hauv txhua lub vijtsam ntawm daim ntawv thov no. Peb tsuas yog txaus siab nyob rau hauv 'Match' cov ntaub ntawv, tsis muaj dab tsi ntxiv.

  1. PrimaryKey (nco ntsoov qhov no yog Tus Naj Npawb uas qhia tus lej sib tw, pib nrog Match #1)
  2. Ib txoj hlua uas muaj qhov tseem ceeb rau 'Team 1 name', 'Team 1 score', 'Team 2 score' thiab 'Team 2 name'

Tom qab ntawd peb mus hla Daim Ntawv Teev Npe thiab tsim ib Daim Ntawv Teev Npe tshiab uas cov haujlwm ib leeg tau faib ua cov khoom ib leeg (raws li pom hauv daim duab #4):

DataToSort -> List index 1 -> List index 1 (PK naj npawb)

-> Sau cov npe 2 (Pab pawg npe 1) -> Sau cov npe 3 (Pab pawg qhab nia 1) -> Sau cov npe 4 (Pab pawg qhab nia 2) -> Sau cov npe 5 (Pab pawg npe 2) -> Sau cov npe 2 -> Sau cov npe 1 (PK tus lej) -> Sau cov npe 2 (Pab pawg npe 1) ->… ->…

Tom qab ntawd peb qhia qee cov ntaub ntawv debug yog tias Debug chij muaj tseeb. Thiab tam sim no peb tuaj yeem thaum kawg txheeb peb Cov Npe (ntawm Cov Npe).

BubbleSort* Cov Npe Ntawm Cov Npe:

Daim duab #5 qhia tag nrho cov npe rau BubbleSort* peb Daim Ntawv Teev Npe. Qhov txheej txheem no tuaj yeem siv tau rau txhua qhov loj Cov npe ntawm cov npe tsis muaj teeb meem pes tsawg Index nyob tam sim no.

* Xav paub ntau ntxiv txog qhov yooj yim npaum li cas BubbleSort nyob hauv YouTube.

Kauj ruam 5: Screen 3 (Chaw)

Screen 3 (Chaw)
Screen 3 (Chaw)

Lub vijtsam no zoo li tsis khoom ntau thiab muaj ntau qhov tsim qauv pom. Tab sis thaum kawg tsuas muaj 5 Toggle keyboards:

  1. 'Fred Scoring': Yog tias hloov 'On' nws hloov pauv tus cwj pwm thiab txiav txim siab tus yeej raws li 2 qhov sib txawv ntawm 13 thiab tsis yog thawj tus mus txog 13.
  2. 'Bluetooth Pairing': (thaum ua haujlwm) yog hloov 'On' ua rau kev sib txuas nrog ntawm daim ntawv thov no nrog Sab Nraud Petanque Zaub.
  3. 'Reset Matches': Yog tias hloov 'On' nws yuav rov pib dua/tshem tawm txhua qhov kev sib tw thiab pib nrog Match 1.
  4. 'Pib DB': Yog tias hloov 'On' nws yuav Rho tawm/Rov pib dua txhua qhov kev sib tw thiab txhua lwm daim ntawv thov teeb tsa rov qab mus rau qhov qub teeb tsa suav nrog cov qhab nia tam sim no, qhov sib tw, npe pab pawg, teeb meem debug, cais kev txiav txim, teeb tsa Bluetooth (thaum qhib) thiab lwm yam.
  5. 'Debug': Yog hloov 'On' nws yuav qhia Debug cov ntaub ntawv thoob plaws hauv app nruab nrab ntawm kab zauv ''. Tej yam xws li 'Tag nrho cov ntaub ntawv teev tseg, Tus naj npawb ntawm qhov sib txawv, Tus lej sib tw tam sim no, Tus lej PK Game, thiab lwm yam.

Thaum kawg ntawm hauv qab yog cov ntawv qhia kev taw qhia. Qhov no ib txwm nyob ntawm qhov qis kawg ntawm lub vijtsam, tsis muaj teeb meem dab tsi qhov loj ntawm lub vijtsam yog. Txawm hais tias Android 'Split screen' ua haujlwm tau siv lossis lub vijtsam tsuas yog siab dua lub vijtsam tuaj yeem tso tawm vim muaj cov khoom ntawm lub vijtsam. Qhov no yog rooj plaub koj ib txwm tuaj yeem txav los ntawm swiping Up thiab Down. Cov ntawv qhia hauv qab hauv qab no tsuas muaj 1 khawm:

Hauv qab-sab laug: lub '<-' khawm yuav mus rau sab laug thiab qhia qhov pib pom qhov kev pom ntawm txhua qhov kev sib tw screen (#2)

Kauj Ruam 6: Screen 0 (Txog)

Screen 0 (Txog)
Screen 0 (Txog)

Qhov kawg screen. Tsuas yog cov ntaub ntawv, tsis muaj dab tsi ntxiv.

Lub vijtsam no tau qhia thawj zaug uas daim ntawv thov no tau pib. Tom qab ntawd nws yuav tsis tshwm dua, tshwj tsis yog koj tau xaiv ua los ntawm nias lub '?' khawm ntawm lub vijtsam loj #1.

Cov ntawv qhia hauv qab hauv qab tsuas yog muaj 1 khawm thiab qhov no coj koj rov qab mus rau lub vijtsam tseem ceeb #1.

Kauj Ruam 7: Software Thiab/lossis Qhov Code

Software Thiab/lossis Qhov Code
Software Thiab/lossis Qhov Code

Thaum kawg.

Koj tuaj yeem rub tawm Daim Ntawv Thov los ntawm qhov chaw Google Drive no.

Koj tuaj yeem rub tawm cov cai los ntawm MIT App Inventor Gallery nkag rau Pentaque (daim duab #1). Qhov no yuav pab koj txuag txoj haujlwm rau koj tus kheej MIT App Inventor account (koj tuaj yeem hloov nws mus rau txhua yam koj xav tau). Los ntawm qhov ntawd koj tuaj yeem pom txhua txoj cai hauv Blocks editor, cov ntxaij vab tshaus hauv Designer editor thiab txhua qhov xov xwm thiab cov peev txheej siv rau txoj haujlwm no.

Koj tseem tuaj yeem rub tawm qhov chaws (ib.aia cov ntaub ntawv, uas yog qhov tseeb.zip ntawv) los ntawm Google Drive qhov chaw no.

Pom zoo: