Project BoardGASM (Graffiti Royale Board GAme State Manager)

The Graffiti Royale GAme State Manager idea is now Project BoardGASM.
So far I created a C# basis with a general object manager, and simple construction of Players (with names, id/player#, color attributes set).

When logging in, I test the character to make sure they’re less than the total number of allowed characters in game and if not, sorry, lobby’s full.

I had fun making 3 different ways to create a list of players… I Have a 4th way to try (which will be just as non-useful as the 2nd method below)

1st Used a method that created each player as a new object then added them individually. :

p1(“name”, “color”) …; AddPlayer(p1);

2nd Using varargs, I passed them in at once using an array.  For a simple setup purpose this isn’t bad, but if I were to use a server system for an online method I’d be logging in one at a time, not an array, so this was a mild waste, but I did learn how to do it which was what my goal was.

AddPlayers(p1, p2, p3, p4);

3rd Used the actual method I’ll probably end up using by directly passing in the data (after sanitizing, natch) offered for Player name and color choice, as entered in a field/selected from a menu.  The “player number” at this point is just determined by ordinality of login.  That could change, but for now good enough.

AddPlayer(“name”, “color”).

The 4th method would be a blend of 2 and 3 (and hence, why I said non-useful).  Basically instead of AddPlayers(p1, p2, p3, p4), it’d be something like AddPlayers(“Name1”, “Color1”, “Name2”, “Color2”, “Name3”, “Color3”, “Name4”, “Color4”)

I decided it would be fun to do this little bit in multiple languages and decided Python would be the next one.  So I got the first method up already.  It was less headbashy in some ways (once I got the actual python tools installed in vscode – I could do it in WSL/nano/vim(blech), but VSCode did it quite well).  I did see an interesting terminal editor that has UI and themes that’s more like Sublime/VSCode, but for the commandline, so I hope to try that if it’s workable in WSL).

But while Python was less headbashy it’d been a while since I did anything in it more complex than a simple script.  So I had to relearn how classes were made, and moreso, remembering how to deal with implicit typing (since most of my coding’s been with explicit type declarations)  Well, it was slightly brainjiggering.  And I haven’t done much using “var” in C#.

It did occur to me, however, that my earliest programming experiences were based on implicitly typed languages.  BASIC and Logo (At least IIRC, the Logo we used (Color Logo) didn’t have any explicit type system)).

I guess I’ll work on finishing the python bit and creating maybe a simple JSON file to parse for feeding in as player data so I can use that with all the different implementations I use (instead of hardcoding the test values/fake players in the main code).  Good practice to get into, me thinks.

Oh – I also spent a lot of time trying to get get github going in VS.  First time using Github, had used Bitbucket, GoogleCode and one other thing before that.  And always with hg, not git.
I saw VS have git integration and was like NICE!  But getting the first thing setup because it wouldn’t let me merge due to some “future”state crap.  Even though the solution was to pull, apparently.  It wouldn’t let me.  I ended up just downloading the git Windows client and that worked like a charm.

If anyone’s curious.  Here’s the github for it…

Leave a Reply

Your email address will not be published. Required fields are marked *