HackerTrans
TopNewTrendsCommentsPastAskShowJobs

andrewghull

no profile record

comments

andrewghull
·2 tahun yang lalu·discuss
Here's the final example in TypeScript if you find that easier to read:

  type NonEmpty<T> = [T, ...T[]]

  const head = <T>(list: NonEmpty<T>) => list[0]

  function getConfigurationDirectories(): NonEmpty<string> {
    const configDirsString = process.env["CONFIG_DIRS"]
    const [firstDir, ...restDirs] = configDirsString.split(',')
    if (firstDir === undefined) throw Error("CONFIG_DIRS cannot be empty");
    return [firstDir, ...restDirs];
  }

  function main() {
    const configDirs = getConfigurationDirectories();
    initializeCache(head(configDirs))
  }
andrewghull
·2 tahun yang lalu·discuss
That's almost exactly what I've done here, and then defined various nodes with different behaviour like for-loops, while-loops, etc.

Take a look at https://docs.boardzilla.io/game/flow to see how it looks.
andrewghull
·2 tahun yang lalu·discuss
Yes it's like BGA, not TTS.

No, we haven't done much to secure the online playing experience for strangers other than simply enforcing the rules of the game. We've been so far more focused on the API side of building game than the service side of having customers, but these are all on our radar as table stakes to make this an nice experience for random players.
andrewghull
·2 tahun yang lalu·discuss
Thanks for the comment, and yes we'd love to add more docs. (it's time consuming!) I understand that even a simple-sounding game can feel daunting to translate into a formalized API. I did record a video of me building part of a game FWIW.

https://docs.boardzilla.io/game/creating-a-game
andrewghull
·2 tahun yang lalu·discuss
We've been planning to add a way to do pluggable AI functions (both for solitaire play and for testing). If you want to try, take a look at the TestRunner class for an easy way to automate playing the rules for multiple players.
andrewghull
·2 tahun yang lalu·discuss
Appreciate that! We'll take another look at this.
andrewghull
·2 tahun yang lalu·discuss
Co-creator here.

I thought AGPL was ok as well, but Commons Clause specifically tried to address perceived deficiencies in the AGPL although I admit that it didn't really seem to catch on. I'm not super well versed in the technical details. Why would you recommend AGPL?