Skip to content

Commit

Permalink
Merge pull request #48 from geoffrey-wu/mongodb
Browse files Browse the repository at this point in the history
Implement #11
  • Loading branch information
geoffrey-wu authored Jul 23, 2022
2 parents 2b14ba0 + e43c4e4 commit fe40165
Show file tree
Hide file tree
Showing 1,983 changed files with 1,410 additions and 36,933 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
.DS_store
categories.txt
.env

quizdb.json
workspace.code-workspace
Expand Down
3 changes: 1 addition & 2 deletions client/multiplayer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="stylesheet" href="/bootstrap/bootstrap.css">
<script src="/redirect.js"></script>
<script src="/bootstrap/bootstrap.bundle.min.js"></script>
</head>

<body>
Expand Down Expand Up @@ -63,6 +61,7 @@
</div>
</div>

<script src="/bootstrap/bootstrap.bundle.min.js"></script>
<script src="/multiplayer/index.js"></script>
</body>

Expand Down
8 changes: 4 additions & 4 deletions client/multiplayer/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fetch(`/api/get-room-list`)
fetch(`/api/multiplayer/room-list`)
.then(response => response.json())
.then(data => {
for (let room of data['rooms']) {
.then(rooms => {
rooms.forEach(room => {
let a = document.createElement('a');
a.href = `/multiplayer/${room[0]}`;
a.innerHTML = decodeURIComponent(room[0]);
Expand All @@ -10,7 +10,7 @@ fetch(`/api/get-room-list`)
li.appendChild(document.createTextNode(` - Number of players: ${room[1]}`));
li.classList.add('list-group-item');
document.getElementById('room-list').appendChild(li);
}
});
});

document.getElementById('form').addEventListener('submit', (event) => {
Expand Down
148 changes: 3 additions & 145 deletions client/multiplayer/room.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="stylesheet" href="/bootstrap/bootstrap.css">
<script src="/redirect.js"></script>
<script src="/bootstrap/bootstrap.bundle.min.js"></script>
</head>

<body>
Expand Down Expand Up @@ -220,149 +218,8 @@ <h4 class="text-center">Player List:</h4>
<div class="accordion" id="player-accordion"></div>
<hr class="my-2">
<h4 class="text-center">Room Settings:</h4>
<input type="text" class="form-control" id="set-title" placeholder="Set name" list="suggestions">
<datalist id="suggestions">
<!-- Recently added: -->
<option>2021 COOT</option>
<option>2021 LHASA</option>
<option>2022 Boilermaker Spring Novice</option>
<option>2020 Michigan Winter Tournament</option>
<option>2018 FST</option>
<option>2019 FST</option>
<option>2022 MRNA</option>
<option>2021 DART II</option>
<option>2021 HARI</option>
<option>2022 WORKSHOP</option>
<option>2021 CALISTO 2</option>
<option>2022 PACE</option>
<!-- All other packets -->
<option>2022 ACF Regionals</option>
<option>2022 ACF Nationals</option>
<option>2021 WORKSHOP</option>
<option>2021 TWAIT</option>
<option>2021 Tiny Science Tossups</option>
<option>2021 Spring Novice</option>
<option>2021 SMH</option>
<option>2021 SKUFFED</option>
<option>2021 Remember the Women</option>
<option>2021 Penn Bowl</option>
<option>2021 PACE</option>
<option>2021 NASAT</option>
<option>2021 MSQB Madness</option>
<option>2021 GORKY III</option>
<option>2021 GORKY II</option>
<option>2021 Geoffrey Wu's NFL Packet</option>
<option>2021 DART I</option>
<option>2021 Dan Coby Tiffany Math Packet</option>
<option>2021 Chicago Open</option>
<option>2021 BHSAT</option>
<option>2021 ARCADIA</option>
<option>2021 ACF Winter</option>
<option>2021 ACF Regionals</option>
<option>2021 ACF Nationals</option>
<option>2021 ACF Nationals Qualifier</option>
<option>2021 ACF Fall</option>
<option>2020 WORKSHOP</option>
<option>2020 Terrapin</option>
<option>2020 TAILS</option>
<option>2020 STASH</option>
<option>2020 SCALE</option>
<option>2020 Saturnalia</option>
<option>2020 Raft II</option>
<option>2020 Oxford</option>
<option>2020 LONE STAR</option>
<option>2020 LIT</option>
<option>2020 IKEA</option>
<option>2020 GORKY</option>
<option>2020 FRENCH II</option>
<option>2020 FLopen</option>
<option>2020 ERIS</option>
<option>2020 CALISTO</option>
<option>2020 BHSAT</option>
<option>2020 AQBL October</option>
<option>2020 ACF Winter</option>
<option>2020 ACF Regionals</option>
<option>2020 ACF Fall</option>
<option>2019 Terrapin</option>
<option>2019 Spartan Housewrite</option>
<option>2019 RMBAT</option>
<option>2019 Prison Bowl</option>
<option>2019 PIANO</option>
<option>2019 Penn Bowl</option>
<option>2019 PACE</option>
<option>2019 NASAT</option>
<option>2019 LOGIC</option>
<option>2019 Lederberg 3</option>
<option>2019 ILLIAC</option>
<option>2019 HFT</option>
<option>2019 Fall Open</option>
<option>2019 EFT</option>
<option>2019 Chicago Open</option>
<option>2019 BHSAT</option>
<option>2019 ACF Regionals</option>
<option>2019 ACF Nationals</option>
<option>2019 ACF Fall</option>
<option>2018 WHAQ</option>
<option>2018 Sun God</option>
<option>2018 SMT</option>
<option>2018 RMBAT</option>
<option>2018 Prison Bowl</option>
<option>2018 Penn Bowl</option>
<option>2018 PACE</option>
<option>2018 NASAT</option>
<option>2018 MBAT</option>
<option>2018 Imsanity</option>
<option>2018 Historature</option>
<option>2018 HFT</option>
<option>2018 GLRAC</option>
<option>2018 EFT</option>
<option>2018 CMST</option>
<option>2018 Chicago Open</option>
<option>2018 Cambridge Open</option>
<option>2018 BHSAT</option>
<option>2018 ACF Regionals</option>
<option>2018 ACF Nationals</option>
<option>2018 ACF Fall</option>
<option>2017 WHAQ</option>
<option>2017 WAO</option>
<option>2017 RMBCT</option>
<option>2017 Prison Bowl</option>
<option>2017 Penn Bowl</option>
<option>2017 PACE</option>
<option>2017 NASAT</option>
<option>2017 MASSOLIT</option>
<option>2017 LIST</option>
<option>2017 Jakob</option>
<option>2017 HFT</option>
<option>2017 GSAC</option>
<option>2017 FRENCH</option>
<option>2017 EMT</option>
<option>2017 EFT</option>
<option>2017 Chicago Open</option>
<option>2017 BHSAT</option>
<option>2017 ACF Regionals</option>
<option>2017 ACF Nationals</option>
<option>2017 ACF Fall</option>
<option>2016 SCOP</option>
<option>2016 Penn Bowl</option>
<option>2016 PACE</option>
<option>2016 NASAT</option>
<option>2016 HFT</option>
<option>2016 ACF Fall</option>
<option>2015 Prison Bowl</option>
<option>2015 Penn Bowl</option>
<option>2015 PACE</option>
<option>2015 Maryland Fall</option>
<option>2015 HFT</option>
<option>2015 Delta Burke</option>
<option>2015 ACF Fall</option>
<option>2014 Penn Bowl</option>
<option>2014 PACE</option>
<option>2013 Penn Bowl</option>
<option>2013 PACE</option>
<option>2012 Penn Bowl</option>
<option>2012 PACE</option>
</datalist>
<input type="text" class="form-control" id="set-name" placeholder="Set name" list="set-list">
<datalist id="set-list"></datalist>
<input type="text" class="form-control my-1" id="packet-number" placeholder="Packet #s">
<input type="text" class="form-control" id="question-number" placeholder="Starting question #">
<div class="my-2"></div>
Expand Down Expand Up @@ -397,6 +254,7 @@ <h4 class="text-center">Room Settings:</h4>
</div>
</div>

<script src="/bootstrap/bootstrap.bundle.min.js"></script>
<script src="/script.js"></script>
<script src="/multiplayer/keybinds.js"></script>
<script src="/multiplayer/room.js"></script>
Expand Down
Loading

0 comments on commit fe40165

Please sign in to comment.