landenf / Settlers-of-Catan

Multiplayer Online version of Settlers of Catan
https://catan-4dea2.web.app
2 stars 0 forks source link

Create Settlements UI #78

Open landenf opened 2 months ago

landenf commented 2 months ago

@SirFatredVIII Could you take a look at why I might be getting a type error when trying to refrence: tile.communityspaces[number]

SirFatredVIII commented 2 months ago

Will take a look at this right away

SirFatredVIII commented 2 months ago

Looks like it's working on my end... could you push your code to a branch so I could take a look at it?

landenf commented 2 months ago

In branch 78

SirFatredVIII commented 2 months ago

Recent commit should fix this problem -- essentially, typescript was getting pissy with us because of the for loop. Essentially, it doesn't trust us to give the community_spaces dictionary an index between 0-5, (which is all that the dictionary knows) all because it doesn't understand that the for loop only iterates on the numbers 0-5. I created a translation method that allows us to bypass this. Feel free to ask any questions about my implementation or change it at your discretion.