INNER CODE UNIT · JavaScript

User

Thorium-Sim/thorium · server/classes/computerCore/index.js:5

class User {
  constructor(params = {}) {
    this.id = params.id || uuid.v4();
    this.name = params.name || "Generic User";
    this.password = params.password || "rommel1942";
    this.hacker = params.hacker || false;
    this.level = params.level || Math.round(Math.random() * 10 + 1);
  }
  update({name, password, hacker, level}) {
    if (name) this.name = name;
    if (password) this.password = password;
    if (hacker || hacker === false) this.hacker = hacker;
    if (level) this.level = level;
  }
}

export class File {
  constructor(params = {}) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…