Sunday, January 12, 2020

Now on GitHub!

Hello, everyone!

A few days ago I have published the source code of the SpaceStrategy on GitHub. Feel free to take a look and leave some comments!

I've published the code on GitHub mainly to sharpen my GitHub skills. But don't expect much as the code is pretty old, and now even I am terrified looking at some parts of it. But let's be positive and get some benefits from this situation! It is a great chance to practice some heavy code refactoring and restyling.

First of all, I have decided to bring a code formatting and style into an order:

  • newlines and spaces;
  • ordering of members;
  • naming and typos;
  • etc.

The solution being 130+ files with a style all over the place it is a tough task to accomplish by hand. So I decided to try out some tools.

At first I wanted to try out something new and selected the most recent and the most downloadable tool of the Visual Studio Marketplace for the task. It happened to be the CodeMaid. It was easy to configure and produced good formatting results. The "automatic cleanup on save" feature proved to be quite useful. But in the end, I wasn't able to configure automatic formatting to my liking. Personally, the most troubling was the formatting of properties.

Being a little bit disappointed, I turned back to the Resharper. It not only allowed me minutely configure almost every imaginable setting for automatic code formatting, but also provided a lot of features for manual code refactoring: spellchecking, quick-fixes, recommendations and more. It helped me to automate an enormous amount of tedious work, and I was able to cleanup my code in a matter of hours. Just take a look at recent commits in my SpaceStrategy repository on GitHub and see the results for yourself.

Stay tuned and I will try to provide some new exciting materials about programming my game.

No comments:

Post a Comment