Hey ho there! I love this site! I’m currently working on the Mars Lander, and it’s and incredibly satisfying task to tackle! However, managing a code base consisting of hundreds of lines of code in a single file is incredibly frustrating and confusing. For that reason, I have written a quick program that allows you to store your files anywhere and have them compiled into something that the CodinGame environment can use.
You can find the code here: https://github.com/DeuxAlpha/c-sharp-coding-game-compiler
Just grab the zip in the releases section if you want to get straight to it. You will need to run Application.exe in the terminal, e.g.
Application.exe -w WorkingDirectory -e EntryFile -o OutputFile
From the WorkingDirectory on, all files will be watched for changes
From the EntryFile on, all namespaces will be searched and imported into the output file
The OutputFile is the file that will be created and overridden with the single file content
Bear in mind that I’ve had some issues if my EntryFile was in the same folder with other cs files. I generally have a structure where my main file calls code from nested folders e.g. a folder for MarsLander, or some other game, etc.
I think that’s it. You probably want to also make sure you have the CodinGame file watcher extension, so that your code is being synced with that file of yours, so you don’t have to copy the content yourself. Anyway, I think that’s it. Hope it helps someone!
EDIT: Oh, resource management was not a concern btw So if the program eats your RAM I’m giving no warranty… O.o