lijim / monks-and-mages

Monks and Mages is a TCG-game built on React and socket.io
https://www.monksandmages.com
MIT License
17 stars 0 forks source link

Feat: Future proof game for sideboards #422

Closed lijim closed 1 year ago

lijim commented 1 year ago

As I started working on draft mode, I thought it would be nice to support sideboards in the future in case players wanted to play best of 3 or even best of 5.

This update doesn't add sideboards in per se, but it does allow for the possibility of it in the future.

With Typescript, it was very easy to change the structure of DeckList and Skeleton to take a new structure.

The rest was paint-by-the-numbers using jest:watch to fix all the places where everything needed updating.

Before - decklist was an array:

Screen Shot 2023-03-15 at 4 01 22 AM

Now - decklist is an Object with a main board + sideboard array:

Screen Shot 2023-03-15 at 4 00 49 AM