cljfx

Jonathan Bennett 2024-07-08T20:06:47.275049Z

I've got a bit of a conceptual issue in CLJFX I'm trying to work through. I'm writing a turn based game and I've got a "Next Phase" event that moves to the next phase in the turn. I also have a launch game event which needs to do some setup (creating the board, mostly) before it runs the same code as the Next Phase event.

Jonathan Bennett 2024-07-08T20:07:15.812929Z

So how do I change the context as I dispatch it to the next method? Or how do I "chain" events?

Jonathan Bennett 2024-07-08T20:08:10.065689Z

The reason I'm caught up in this problem is that I want to add on a "Phase report" that runs at the end of each phase that describes what happened and I found myself having to duplicate that code as well.

Jonathan Bennett 2024-07-08T20:10:41.091459Z

Or, how can I have the business logic side (the function outside my GUI code) that runs when the next-phase event fires handle displaying the Phase report?

Jonathan Bennett 2024-07-08T20:12:02.161919Z

Sorry, I'm sure this is unclear, I'm very confused in general about this so I'm sure that isn't helping me explain it.