Skip to content

Commit

Permalink
[FIX] 장소들의 출현 가능 범위를 인원 수가 아니라 전체 범위로 넓힘
Browse files Browse the repository at this point in the history
  • Loading branch information
AndroidNetrunner committed Dec 26, 2023
1 parent 078a723 commit 0749685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/createNewGame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const chooseRandomPlace = (players: Players): [Place, Place[]] => {
const possiblePlaces = Object.keys(ROLES_BY_PLACE).filter(
place => ROLES_BY_PLACE[place as Place].length >= numberOfPlayers,
) as Place[];
return [possiblePlaces[Math.floor(Math.random() * numberOfPlayers)], possiblePlaces];
return [possiblePlaces[Math.floor(Math.random() * possiblePlaces.length)], possiblePlaces];
};

export default createNewGame;

0 comments on commit 0749685

Please sign in to comment.