Skip to content

Commit

Permalink
Merge branch 'main' of github.com:hu8813/pong42
Browse files Browse the repository at this point in the history
  • Loading branch information
hu8813 committed Apr 22, 2024
2 parents 20720db + 972592c commit d1250d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions srcs/frontend/js/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const routes = {
"#pong4": "/views/pong4.html",
"#tic1": "/views/tic1.html",
"#tic2": "/views/tic2.html",
"#xoxo3": "/views/tournament.html",
"#tournament": "/views/tournament.html",
"#viewprofile": "/views/viewprofile.html",
"#rps" : "/views/rps.html",
"#manage2fa" : "/views/manage2fa.html",
Expand Down Expand Up @@ -349,7 +349,7 @@ const handleLocation = async () => {
case '#tic2':
showTic2();
break;
case '#xoxo3':
case '#tournament':
const tournamentHtml = await fetch(routes[path]).then((data) => data.text());
document.getElementById("app").innerHTML = tournamentHtml;
const playerCount = prompt("How many players will there be in the tournament? Enter 4 or 8:", "4");
Expand Down
14 changes: 7 additions & 7 deletions srcs/frontend/js/selectgame.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ function showGameModes() {
text: "Pong42",
imgPlaceholder: './src/pong42.png',
href: "#pong42",
associatedCards: ["#player3d1", "#playerai1", "#pongMultiplayer"]
associatedCards: ["#player3d1", "#playerai1", "#pongMultiplayer", "#tournament"]
},
{
text: "Tic Tac Toe",
imgPlaceholder: './src/tictactoe.png',
href: "#tictactoe",
associatedCards: ["#tic1", "#tic2", "#xoxo3"]
associatedCards: ["#tic1", "#tic2"]
},
{
text: "Rock Paper Scissors",
Expand Down Expand Up @@ -51,6 +51,11 @@ function showGameModes() {
imgPlaceholder: './src/multiplayer.jpeg',
href: "#pong4",
},
{
text: "Tournament",
imgPlaceholder: './src/multiplayer.jpeg',
href: "#tournament",
},
{
text: "Single Player (CPU)",
imgPlaceholder: './src/multiplayer.jpeg',
Expand All @@ -60,11 +65,6 @@ function showGameModes() {
text: "2 Players (local)",
imgPlaceholder: './src/multiplayer.jpeg',
href: "#tic2",
},
{
text: "Tournament",
imgPlaceholder: './src/multiplayer.jpeg',
href: "#xoxo3",
}


Expand Down

0 comments on commit d1250d6

Please sign in to comment.