Snake in C# - player can scale window - dividing manual-scaled window into identical squares
<p>As part of my self-education of programming I decided to make a snake in C#. The problem I have is about the client size of the game form.</p>

<p>I want player to be able to scale the window of the game, which is divided into 25 x 25 grid (every coordinate is like "one pixel") - it means, that at any moment, the window is divided into 25 x 25 identical squares.</p>

<p>The problem I get is near this code:</p>

<pre><code>int SquareSide = (ClientSize.Width / 25);
</code></pre>

<p>When I set the <code>ClientSize</code> strictly to for example 600 x 600, which is a multiple of 25, everything goes OK. But when I don't (for example by manual resizing, which can change the size to, for example, 711 x 711), it creates at the right side a 'strip', which seems to be the rest of pixels, which can't be used because we are dividing to integer number.</p>

<p>My question is - is there any not-extremely-hard way to achieve dividing ANY client size of form into 25 x 25 grid without this problem? I tried using <code>double</code>, but <code>FillRectangle</code> method doesn't accept it.</p>

<p>I hope my question is understandable and thank you for replies.</p>
