shenanigans-be / miltydraft

19 stars 18 forks source link

Alliance mode #35

Closed FrancoisCossette closed 4 months ago

FrancoisCossette commented 4 months ago

Ever tried alliance mode? It's pretty sweet. It was hard to use the milty draft tool in alliance mode though, so I made some changes. Feel free to ask for changes, or questions, or anything. I tried to keep it in line with your style of coding.

What's included:

Note: I have put the alliance mode before the player selection since it affects how the player selector behaves, but I'm aware that the overwhelming majority of games are not alliance mode. Most player don't even know it exist, so it could be moved elsewhere like in advanced settings if you want.

shenanigans-be commented 4 months ago

I'm thinking it might just be better to provide a completely separate version of the app that's geared towards Alliance drafts. Once it's set up: Does alliance-mode change anything to the draft process? Because just having two different versions of the "index" might be enough...

FrancoisCossette commented 4 months ago

I've added some options to the alliance setup which affects the draft.

  1. The first options "Team creation" is only used during the creation (and regen) of the draft. It allows the creator of the draft to create preset teams, or let teams be random.
  2. The second option "Force teammate position" allows the creator of the draft to force teams to be sitting either next to each other, or opposed. Since being seated next to your ally is a big advantage, it's better to either give it to everyone, or give it to no one.
  3. The third option "Force team double pick" exists for people who wants to make sure that teams pick their choices as a whole.

As you can imagine, the second and third options affect the way the draft works, while the first is only used at creation. I've learned the hard way that having two different versions of a same thing is a sure way to give your future self headaches, since every change you want to make will have to be made twice. There's a few minor changes, but not nearly enough to justify maintaining 2 versions of index.php.

Based on your feedback, I'm wondering if you have a testing environment to check out the changes before deploying them? If not, I could set up something on my side of things so you could see firsthand how it works.

Let me know what you think, and as always, keep up the great work!

shenanigans-be commented 4 months ago

Based on your feedback, I'm wondering if you have a testing environment to check out the changes before deploying them?

Nope just me being tired/lazy and not reading through your PR properly, sorry 😅 I'm gonna take a look at this and I'll keep you posted!

shenanigans-be commented 4 months ago

@FrancoisCossette It's live! I shuffled some UI stuff around and rewrote the Team generation (partly because it looked like "preset" teams still randomized the players) and partly out of personal preference.

Thank you so much for your hard work!