otakulan/lanparty-seating

Fix badge page assignment logic

Closed this issue · 2 comments

I created a tournament containing seats 41 to 70 and then started assigning seats via the Badge page, it started going off the rails and assigning me seats >70. Something's badly broken.

cc @AXDOOMER

No longer relevant because #59 changes the assignation mechanisms.

In case you still want to debug the issue, it can be one of these:

In https://github.com/starcraft66/lanparty-seating/blob/7f0eefea97db1506d8fa0dc111cd710c4129dff9/lib/lanpartyseating/logic/seating_logic.ex

  • One line 19, settings.columns and settings.rows return an incorrect number
  • On line 21, StationLogic.get_all_stations_sorted_by_number() returns an incorrect number of stations, causing the logic at line 26 to fail and pick the wrong station.