# Is my code good

**URL:** <https://forum.makecode.com/t/is-my-code-good/34743>\
**Category:** micro:bit\
**Tags:** game\
**Created:** [March 20, 2025, 12:47pm UTC](https://forum.makecode.com/t/is-my-code-good/34743 "2025-03-20T12:47:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AD1340](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ad1340/32/20625_2.png) [@AD1340](https://forum.makecode.com/u/AD1340)\
**Post date:** [March 20, 2025, 12:47pm UTC](https://forum.makecode.com/t/is-my-code-good/34743/1 "2025-03-20T12:47:36Z")

</div>

> **[carnival game project](https://makecode.microbit.org/S57087-26104-30307-06124)**
>
> Made with ❤️ in Microsoft MakeCode for micro:bit.

---

<div class="post-metadata">

**Author:** ![Don](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/don/32/17989_2.png) [@Don](https://forum.makecode.com/u/Don)\
**Post date:** [March 20, 2025, 1:44pm UTC](https://forum.makecode.com/t/is-my-code-good/34743/2 "2025-03-20T13:44:53Z")

</div>

The function switch\_and\_setup\_state could be broken down into smaller helper functions. Name the functions based on what they do for the game. That way switch\_and\_setup\_state makes the algorithm easier to understand.

---

<div class="post-metadata">

**Author:** ![AD1340](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ad1340/32/20625_2.png) [@AD1340](https://forum.makecode.com/u/AD1340)\
**Post date:** [March 20, 2025, 2:30pm UTC](https://forum.makecode.com/t/is-my-code-good/34743/3 "2025-03-20T14:30:31Z")

</div>

wat do u mean

---

<div class="post-metadata">

**Author:** ![AD1340](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ad1340/32/20625_2.png) [@AD1340](https://forum.makecode.com/u/AD1340)\
**Post date:** [March 20, 2025, 2:30pm UTC](https://forum.makecode.com/t/is-my-code-good/34743/4 "2025-03-20T14:30:41Z")

</div>

when it runz it supposed to run all the code its supposed to when da state variable is changed to the thingy

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [March 20, 2025, 9:00pm UTC](https://forum.makecode.com/t/is-my-code-good/34743/5 "2025-03-20T21:00:37Z")

</div>

What exactly are we supposed to do here?

---

<div class="post-metadata">

**Author:** ![AD1340](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ad1340/32/20625_2.png) [@AD1340](https://forum.makecode.com/u/AD1340)\
**Post date:** [March 20, 2025, 10:36pm UTC](https://forum.makecode.com/t/is-my-code-good/34743/6 "2025-03-20T22:36:15Z")

</div>

oops new link [https://makecode.microbit.org/S03331-24666-95631-15522](https://makecode.microbit.org/S03331-24666-95631-15522)
