PYTHON — Splitting Space Rocks With Python
<p>In the current version of the game, when you hit a rock with a bullet, the rock disappears, which is not very realistic. In this lesson, we will modify the <code>Rock</code> constructor to handle the splitting of rocks. We will also introduce different rock sizes.</p>
<p>Let’s start by creating a factory method within the <code>Rock</code> class. This method, called <code>.create_random()</code>, will be responsible for constructing and returning a rock object. This approach makes the code clearer and easier to read.</p>
<p><a href="https://medium.com/paulacy-pulse/python-splitting-space-rocks-with-python-77b2123fb989"><strong>Click Here</strong></a></p>