MikeCaputo / kingston-ny-mtg

A place to host a few small tools for the Kingston, NY MtG community.
1 stars 0 forks source link

Ai generation refinements #12

Closed MikeCaputo closed 2 weeks ago

MikeCaputo commented 2 weeks ago

Adds commander pickers and additional AI generation

  1. Adds a commander picker component. Allows a player to type, blur off the field (that UX will be refined in the future), and Scryfall will be queried for matching results. When clicked, that card will be assigned as that player's commander.
  2. This results in the player commander schemas to be much more robust: not just the name and whether or not they're attacking. Can continue to add to this as needed, but now it has the entirety of the scryfall result.
  3. Game now has a multi-tiered AI generation:
    • Each commander, when selected, gets an AI-generated description.
    • If multiple commanders are present when the game begins: then the dynamics between those commanders will be generated.
    • This is then combined with the map data, to generate a prologue.
    • As before, each action taken feeds into a game log.
    • Finally, when the game is finished, all of this is fed into a game summary story.
    • Sets a few openAI settings (ex, temperature). I'll continue to tweak this as I see it in action and get feedback.
  4. Move some functionality to helper methods.
  5. Various refactors. still many improvements needed, but I need to aggressively prioritize. I simply don't have the time to make this code radically high quality.
  6. BDD tests. These will be critical to continue writing, so that I can maintain clarity on the application, since I have very limited time for it right now.