Skip to content

Conversation

@Lorite
Copy link

@Lorite Lorite commented Sep 16, 2025

…ies, boardgame mechanics, awards, description, language dependence, best with players, recommended with players

…ies, boardgame mechanics, awards, description, language dependence, best with players, recommended with players
const publishers = Array.from(boardgame.querySelectorAll('boardgamepublisher'))
.map(n => n.textContent)
.filter(n => n !== null);
const boardGameFamilies = Array.from(boardgame.querySelectorAll('boardgamefamily'))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to include some not very relevant categories for some games.

const minPlayers = Number.parseFloat(boardgame.querySelector('minplayers')?.textContent ?? '0');
const maxPlayers = Number.parseFloat(boardgame.querySelector('maxplayers')?.textContent ?? '0');
const playtime = (boardgame.querySelector('playingtime')?.textContent ?? 'unknown') + ' minutes';
const age = Number.parseFloat(boardgame.querySelector('age')?.textContent ?? '0');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

age is a quite generic term. Is this the recommended age, or the minimum age to play?


const bestWithPlayers =
response.querySelector('poll-summary[name=suggested_numplayers] result[name=bestwith]')?.attributes.getNamedItem('value')?.value ?? '';
const recommendedWithPlayers =
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think only including one of those two would be better, as we already have min and max players.

Copy link

@bharker75 bharker75 Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vote for including both min and max and bestWithPlayers. The bestWithPlayers data is extremely valuable for figuring out what player counts actually play well. A significant number of 2 to 4,5,6 player games are actually pretty bad at 2 players and bestWithPlayers gives this data.

playtime: string;
age: number;
publishers: string[];
boardGameFamilies?: string[];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the new properties could be better sorted. E.g. all the player counts together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants