Rewriting a Minesweeper - Part 1

Rewriting a Minesweeper  - Part 1

I am going to being this series of post on how I found my 4 year old Minesweeper game project written in Objective-C and process to start converting it into Swift. My goals for this project are as follows:

  1. Make sure to bring this project in stable state - As in I should be able to compile and run it on most recent Xcode 10.1
  2. Get rid of as much as external dependencies as possible
  3. Divide the project into their own logic sections
  4. Start thinking each section as its own brain independent of other parts
  5. Step 4 is vital, as it will allow me to convert old Objective-C code into Swift piecemeal
  6. Combine each Swift section to form unified module
  7. Start writing unit tests. This is only easy and possible if I have already written highly stable code with good architecture

Day 1:

I had worked on this project few weeks ago while using Xcode 9.3. I ran into bunch of errors, mostly due to deprecated libraries and incompatibility with newer Xcode. However, after many days of struggle, I was able to bring it into the compiling state. I also ran it successfully so first step is done and refactor is ready to get resumed.

Here's the beautiful logo of app,

and this is the screenshot takes from the home screen,

Blasting Minesweeper - Home Screen

Looking at the screenshot, it has so many features. My goal while I rewrite this whole thing is to strip all the fancy features and include only base functionality which is needed. Eventually I will add them one by one, but for now I want to keep overhead to its minimum level.

Next step is to get rid of all the dependencies. This should be easier than I expected. I am not planning to refactor the existing code, but will be building a separate Swift project to start building app from scratch while reusing the logic from existing Objective-C codebase.