# Case 10: Finger-guessing game ## Purpose Use the Smart Coding Kit to create a finger-guessing game ## Products Link 1 x [ELECFREAKS micro:bit Smart Coding Watch Kit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-smart-coding-watch-kit-without-micro-bit-board?_pos=2&_sid=ce4e7cb69&_ss=r) ![](./images/smart_coding_kit_case_10_01.png) ## Software [MicroSoftmakecode](https://makecode.microbit.org/#) ## Programming ### Step 1 Set both the variables "i" and "k" as 0 and show the on start icon Set the wireless group While pressing button A or/and B, set the variable "k" as the equivalent number and send it to show the icon accordingly After receiving the data, save the data as variable "i" ![](./images/smart_coding_kit_case_10_02.png) ### Step 2 In the Forever block, judge the value of "i" and "k", if they are not 0, it means both the players give a “fist" The winner will be judged by the comparasion of "i" and "k" Set both the varibles "i" and "k" as 0 and be prepared for the next round ![](./images/smart_coding_kit_case_10_03.png) ### Link Link:[https://makecode.microbit.org/_0HpEjy3Dj8vY](https://makecode.microbit.org/_0HpEjy3Dj8vY) You can also download it direcly below:
## Result Choose to give a "fist" through button A or/and B, the results will be given accordingly, the winner has a smile face and the loser has a cry face on the micro:bit. ## Exploration ## FAQ ## Relevant File