mirror of
https://github.com/AlecM33/Werewolf.git
synced 2026-01-02 01:03:24 +01:00
initial commit
This commit is contained in:
21
static/setup.js
Normal file
21
static/setup.js
Normal file
@@ -0,0 +1,21 @@
|
||||
class Card {
|
||||
constructor(name, team, description) {
|
||||
this.name = name;
|
||||
this.team = team;
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
|
||||
function generateAccessCode() {
|
||||
let code = "";
|
||||
let charPool = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
for (let i = 0; i < 6; i++) {
|
||||
code += charPool[getRandomInt(61)]
|
||||
}
|
||||
console.log("Access Code: " + code);
|
||||
return code;
|
||||
}
|
||||
|
||||
function getRandomInt(max) {
|
||||
return Math.floor(Math.random() * Math.floor(max));
|
||||
}
|
||||
Reference in New Issue
Block a user