MikeDoes commited on
Commit
46b84dc
·
verified ·
1 Parent(s): 87d6aca

Upload populate_interface.js

Browse files
Files changed (1) hide show
  1. populate_interface.js +0 -40
populate_interface.js CHANGED
@@ -18,7 +18,6 @@ class GridPopulator {
18
  }
19
 
20
  this.updateGridLayout();
21
- this.startUpdates();
22
  }
23
 
24
  generateUserName() {
@@ -94,45 +93,6 @@ class GridPopulator {
94
  }, 300);
95
  }
96
 
97
- startUpdates() {
98
- setInterval(() => {
99
- const shouldAdd = Math.random() > 0.5;
100
-
101
- if (shouldAdd && this.users.size < this.maxUsers) {
102
- this.addUser();
103
- } else if (this.users.size > this.minUsers) {
104
- this.removeUser();
105
- }
106
-
107
- // Randomly update some existing users' personalities
108
- this.users.forEach((user, userId) => {
109
- if (Math.random() < 0.1) {
110
- const newPersonality = window.personalitySystem.getRandomPersonality();
111
- if (newPersonality !== user.personality) {
112
- const event = new CustomEvent('personalityUpdated', {
113
- detail: { personality: newPersonality }
114
- });
115
- user.element.dispatchEvent(event);
116
- user.personality = newPersonality;
117
-
118
- // Update chat with personality change
119
- /* const chatContent = document.getElementById('chat-content');
120
- if (chatContent) {
121
- const config = window.personalitySystem.config[newPersonality];
122
- const changeMessage = document.createElement('div');
123
- changeMessage.className = 'text-gray-700 flex items-center gap-2';
124
- changeMessage.innerHTML = `
125
- <span class="font-bold">${this.users.size}.</span>
126
- <span>Student ${userId} changed to ${config.name}</span>
127
- `;
128
- chatContent.appendChild(changeMessage);
129
- chatContent.scrollTop = chatContent.scrollHeight;
130
- } */
131
- }
132
- }
133
- });
134
- }, this.updateInterval);
135
- }
136
  }
137
 
138
  // Initialize when DOM is loaded
 
18
  }
19
 
20
  this.updateGridLayout();
 
21
  }
22
 
23
  generateUserName() {
 
93
  }, 300);
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  }
97
 
98
  // Initialize when DOM is loaded