jetbrains-academy / CppBasics

Learn fundamentals of C/C++ while developing simple arcade game
MIT License
4 stars 1 forks source link

Should be west border not east border Warm Up/Moving On/Draw a Line #17

Closed edutools-service closed 12 months ago

edutools-service commented 1 year ago

For example, the check and adjustment against the east border should look like this:

if (result.x - RADIUS < WEST_BORDER) { result.x = WEST_BORDER + RADIUS; }

Actually it should be the check and adjustment against the west border.

DaniilBogdanovJB commented 1 year ago

Hello,

According to the variables, the proposed solution seems legit: const float NORTH_BORDER = 0.0f; const float SOUTH_BORDER = 600.0f; const float WEST_BORDER = 0.0f; const float EAST_BORDER = 800.0f;

Could you please elaborate on your suggestion?

eupp commented 12 months ago

@DaniilBogdanovJB

The borders constanst definitions are fine. The problem was with the example in one of the test task descriptions. Anyway, I just fixed that.