We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Depends on:
The (one) ball starts at the top-center of the screen
The text was updated successfully, but these errors were encountered:
Link design document line to #25
4129c47
Test pseudocode:
// Create a game // Get the ball position // Get the (intended) screen width // The ball center position must be at coordinat (width / 2, 0)
Sorry, something went wrong.
True test code:
const game g; const auto screen_size{get_screen_size(g)}; const auto ball_coordinat{get_ball_center_coordinat(g)}; const auto screen_width{get_width(screen_size)}; const auto half_screen_width{screen_width / 2.0}; const auto ball_center_x{get_x(ball_coordinat)}; const auto ball_center_y{get_y(ball_coordinat)}; // Don't: never compare floating point values // assert(ball_center_x == half_screen_width); // assert(ball_center_y == 0.0); // Do: add some room for rounding errors assert(is_more_or_less_equal(ball_center_x, half_screen_width)); assert(is_more_or_less_equal(ball_center_y, 0.0));
Expose #25
3d6c908
No branches or pull requests
Depends on:
The (one) ball starts at the top-center of the screen
The text was updated successfully, but these errors were encountered: