Coding Style

For better or worse, I've coded Solitaire online using an old fashioned coding style, loosely based on the way games *used* to be structured.

To be fair, back in the day I was coding in C, and frequently used pointers referring to structures containing data. This was common in those days. and was often a rather better structure than I have ended up creating here.

Regardless, the code works pretty well, doesn't rely on any external libraries and it is easy to add further games.

However, it is a total mess, and while I can add further games without any difficulty, it would be difficult to make substantial improvements. Even though in reality I'm unlikely to need or want to do this, the fact remains that the structure I have used is poor. It is a C/C++ programmers first attempt to use javascript and this shows.

I have decided to learn/use Javascript properly for my next project, or more accurately Typescript, and do things in a more standard way.

I'm not rushing with this as I want to add many more games of Solitaire/Patience to this site before moving on, but I'm thinking about quietly learning more about Typescript in the background.