Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.5.07 BALL_COUNT should be 0 at first #13

Closed
Gabriel-Bowater opened this issue Dec 16, 2015 · 2 comments
Closed

1.5.07 BALL_COUNT should be 0 at first #13

Gabriel-Bowater opened this issue Dec 16, 2015 · 2 comments

Comments

@Gabriel-Bowater
Copy link

The extension work has already been done in the base project meaning that the program renders 10000 balls right away. Needs to be set to 0 to just render a single ball for the initialize challenge, or rewritten to have no handling for multiple balls to leave it for students to figure out.

@xyclos
Copy link

xyclos commented Dec 31, 2015

the for loop should initialize i to be 1 rather than 0, so the BALL_COUNT can be the literal number of balls rather than the number of balls - 1;

@JeremySilverTongue
Copy link
Contributor

Whoops. Fixed the ball counts to 1 for the exercise, and 10000 for the solution. As for the loop, you're talking about this one, right?

    for (int i = 0; i < BALL_COUNT; i++) {
        balls.add(new BouncingBall(viewport));
    }

I think this one behaves as you want it to, @xyclos, where BALL_COUNT is indeed the literal number. That look right to you? If not, please reopen. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants