mirdaki / theforce

A Star Wars themed programming language
MIT License
22 stars 4 forks source link

Permit pseudocode syntax #43

Closed Forgind closed 4 weeks ago

Forgind commented 1 year ago

Resolves #26

Not 100% sure if I interpreted this issue correctly...feel free to tell me you meant something completely different 🙂

mirdaki commented 1 year ago

Sorry for the confusion. I was thinking more an option to convert a file written in the pseudo code to a file with the quotes, and back again. Not actually executing the pseudo code option

Forgind commented 1 year ago

I could imagine that being useful...but the first way I think of would require multiple sources of truth. I'll think about it a bit.

Forgind commented 1 year ago

Alright, so I didn't come up with a way to do this without adding a new source of truth. Here's a sketchy file that (in my first test, at least) can convert between pseudocode and The Force statements. It does make a couple minor assumptions, but I think it mostly should work.

It also has starter code for converting from pseudocode or The Force into a video montage of quotations from Star Wars! But I didn't see a way to combine videos in C# without downloading extra gunk (and there probably isn't one), so I left that part as an exercise for the user.