Browse Source

Add info 1st player

Leo VIALLON-GALINIER 10 months ago
parent
commit
a785de78ce
2 changed files with 4 additions and 0 deletions
  1. 1 0
      db.py
  2. 3 0
      static/game_script.js

+ 1 - 0
db.py

@@ -132,6 +132,7 @@ class Game(db.Model):
132 132
         r['cumul'] = [self.cumul_0, self.cumul_1]
133 133
         r['partie'] = self.partie
134 134
         r['admin'] = self.admin
135
+        r['distributeur'] = self.distributeur
135 136
         return r
136 137
 
137 138
     def serialize_state(self, user):

+ 3 - 0
static/game_script.js

@@ -142,6 +142,9 @@ var set_players = function(){
142 142
         if(jeu['players'][i]==jeu['admin']){
143 143
             name = name + ' *';
144 144
         }
145
+        if(i==jeu['distributeur']){
146
+            name = name + ' (1)';
147
+        }
145 148
         k = (i+6-jeu['nr'])%4;
146 149
         $('#joueur-'+k).html(name);
147 150
     }