Binato/server/objects/MatchArray.ts

14 lines
334 B
TypeScript
Raw Normal View History

2023-09-10 12:59:22 +01:00
import FunkyArray from "./FunkyArray";
import Match from "./Match";
2022-11-23 00:48:28 +00:00
2023-09-10 12:59:22 +01:00
export default class MatchArray extends FunkyArray<Match> {
2022-11-23 00:48:28 +00:00
public getById(id:number) : Match | undefined {
for (const match of this.getIterableItems()) {
2023-08-20 13:03:01 +01:00
if (match.matchId === id) {
2022-11-23 00:48:28 +00:00
return match;
}
}
return undefined;
}
}