doboy / Assassinbility

0 stars 1 forks source link

Adding colors! #7

Open doboy opened 12 years ago

doboy commented 12 years ago

The dashboard should be anonymous by default, but we will get to that later. Each user should have their own color so that people who look at the dashboard can keep track of the players.

To do this we would have do the following things

  1. On construction of a user.. assign them (random?) color or pick from a set of colors. (similar to picking a secret word). The colors could be in text. i.e. "red", "blue" .. or could be RGB values like "#FFFFFF"
  2. Make sure to include in the serialize function so the frontend can see it.
  3. In the frontend on the initial contruction of the circles. Do something like circle.attr({color:user.color})

Links http://raphaeljs.com/