Open ceradon opened 11 years ago
Your proposal for this duplicates data. Why have user roles inside $players and $roles?
I also have to disagree with "phpwolf arrays are all over the place". There is a fair level of organization. Are there things in particular that annoy you with the current setup?
Phpwolf arrays are, in its current state, all over the place, so I propose that the arrays be set up into two central array:
$players
and$roles
.$players
would contain a nested array, which contains a users' id based on the order that the users joined that game (1
,2
, etc...) and the users' roles (also an array) which contains all the roles of that specific user.$roles
are all the users based on their roles. A structured example of this is locate here at a GitHub Gist.