But when I run this code, the player coordinates are hardly greater when the new window size is greater than its previous size, and when the new window size is smaller than its previous size, the player's place is always in the left-top corner of the window.
What's wrong with my code?
I tried your suggestions, but my program still not work. For example, when I move to the right edge of the window, then resize it, the player's spaceship stay on its old place, although it should be at the edge of the bigger window.
Yeah! Now it works! In case of window width there is some difference from the right edge, but this difference is acceptable.
Thank you, Coder777!
Now this is my piece of code: