| 127 | } |
| 128 | |
| 129 | void PongLayer::doStep(float delta) |
| 130 | { |
| 131 | _ball->move(delta); |
| 132 | |
| 133 | for (auto&& paddle : _paddles) |
| 134 | { |
| 135 | _ball->collideWithPaddle(paddle); |
| 136 | } |
| 137 | |
| 138 | if (_ball->getPosition().y > VisibleRect::top().y - kStatusBarHeight + _ball->radius()) |
| 139 | resetAndScoreBallForPlayer(kLowPlayer); |
| 140 | else if (_ball->getPosition().y < VisibleRect::bottom().y - _ball->radius()) |
| 141 | resetAndScoreBallForPlayer(kHighPlayer); |
| 142 | } |
| 143 | |
| 144 | #define _Info_Formatter "Current force value : {:.02f}, maximum possible force : {:.02f}" |
| 145 | char formatBuffer[256] = { |
nothing calls this directly
no test coverage detected