# A bug for C++ in Pong Pong

**URL:** <https://discourse.codecombat.com/t/a-bug-for-c-in-pong-pong/24074>\
**Category:** Bugs\
**Created:** [September 13, 2020, 2:25am UTC](https://discourse.codecombat.com/t/a-bug-for-c-in-pong-pong/24074 "2020-09-13T02:25:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheOrbitals](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/theorbitals/32/28144_2.png) [@TheOrbitals](https://discourse.codecombat.com/u/TheOrbitals)\
**Post date:** [September 13, 2020, 2:25am UTC](https://discourse.codecombat.com/t/a-bug-for-c-in-pong-pong/24074/1 "2020-09-13T02:25:57Z")

</div>

One of the goals is to complete the level in under six lines.  
It is indeed doable in Python, Javascript, or Coffeescript.  
However, I’m using C++, and apart from the commanding code, you’ll need one more line: `void(main)`. So the least amount of lines of code you can use is 7, not six.  
Btw here is my code:

```python
void main() {
    hero.say("fetch");
    while(true) {
        hero.attack("ball2");
        hero.moveRight(3);
        hero.attack("ball2");
        hero.moveLeft(3);
    }
}

```

All of the 30 lines, 9 lines, and 6 lines of code or less should be turned into 31, 10, and 7 lines of code or less when the player is using C++.  
~ Orb  
(also I was messing around and made this +\_= wink wink)

---

<div class="post-metadata">

**Author:** ![TheOrbitals](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/theorbitals/32/28144_2.png) [@TheOrbitals](https://discourse.codecombat.com/u/TheOrbitals)\
**Post date:** [September 13, 2020, 2:26am UTC](https://discourse.codecombat.com/t/a-bug-for-c-in-pong-pong/24074/2 "2020-09-13T02:26:11Z")

</div>

@Chaboi_3000 (20 char)

---

<div class="post-metadata">

**Author:** ![Speedypickle1](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@Speedypickle1](https://discourse.codecombat.com/u/Speedypickle1)\
**Post date:** [October 28, 2020, 8:27pm UTC](https://discourse.codecombat.com/t/a-bug-for-c-in-pong-pong/24074/4 "2020-10-28T20:27:33Z")

</div>

I think those might be optional goals
