dotnet / dotnet-console-games

Game examples implemented as .NET console applications primarily for providing education and inspiration. :)
https://dotnet.github.io/dotnet-console-games/
MIT License
834 stars 123 forks source link

`Website` code generator for porting console games to blazor webassembly #23

Open ZacharyPatten opened 2 years ago

ZacharyPatten commented 2 years ago

Currently the process of porting console to blazor webassembly is a manual process. For the most part you just copy-paste the console code into the Website project and add public readonly BlazorConsole Console = new(); and await in front of the Console member invocations. This should be easy to make a code generator for.

If there are any changes to the console games, it requires the same change be applied to the ports. However, if the ports were generated, we could just make any changes to the original console games and the generator would carry over any changes to the ports automatically.

A source generator would be good for this topic. :)

ZacharyPatten commented 2 years ago

I'm marking this issue as help wanted because I won't have time to touch this topic for the foreseeable future. If you have the spare time to attempt it, go for it. :)