Closed TKanX closed 1 week ago
https://github.com/tridecco/game-client-web/commit/cd2be2e6c3be1aae83358a5634a33de8359b9b3f
https://github.com/tridecco/game-client-web/commit/5bfb0ea679eeb394bd31c56755b4c5ae1d57a729
GameUI
class to manage visibility of game sections (queue
, room
, game
).game.js
to use GameUI
for showing and hiding sections.https://github.com/tridecco/game-client-web/commit/fc17726fb40ec381f31cf48bdf066e02af156237
https://github.com/tridecco/game-client-web/commit/33d46bebcd8274d29ab3acf9af266056bb0ae261
GameUI
class._getSection
method to include the "error" section.showSection
method to handle the "error" section.showError
method to display error messages with optional title, message, input, and button.https://github.com/tridecco/game-client-web/commit/84e4b0a9416328ade311427d495d4d7f821d4910
https://github.com/tridecco/game-client-web/commit/167c81bd2c0c2e327d0252adfc345b94b4d9d9ab
Added a disconnect event listener to the GameNetwork class in game.ejs. This listener displays an error message when the user is disconnected from the server and provides an option to go back to the home page. This improves the user experience by gracefully handling disconnections.
https://github.com/tridecco/game-client-web/commit/4034c7ba7d936287e5cdbd45ab8bdc36ba44ad3f
showSection
method to handle the "ready" section.showGameReady
method to the GameUI
class to display the game ready state with player avatars and a start button.https://github.com/tridecco/game-client-web/commit/fbf765d8c7541670fab2e70b2fa081ba4cfc02aa
players
to playersElement
in showGameReady
method.https://github.com/tridecco/game-client-web/commit/444affd9b23662d5c0958a3609ee035adc8df494
showGameReady
method of GameUI
class.const
with let
for playersElement
to allow for modification.playersElement.appendChild
with playersElement.innerHTML +=
to properly handle HTML content.https://github.com/tridecco/game-client-web/commit/ef6c1f555fdc033d2a44c8582b5ce1f84bb140d8
https://github.com/tridecco/game-client-web/commit/4ecf4360fd442e2adc871e8d0dbbe1bdc972f0ed
GameUI
class.https://github.com/tridecco/game-client-web/commit/1779c6248a2156ca250789d7a4b55bce1966099e
playerReady
method to the GameNetwork
class to emit a "game-client:ready" event.playerReady
method to the GameUI
class to update the player's ready status in the UI.https://github.com/tridecco/game-client-web/commit/2efd2606f30e2a3a8bf21e82aefb054faf3e9c1f
showGameReady
to disable the start button and show a "Ready..." message when clicked.https://github.com/tridecco/game-client-web/commit/0bb7089747aa4a62c8286ef83730075f15dd2891
gameNetwork
to listen for "game:players" event and display player avatars in the ready state.https://github.com/tridecco/game-client-web/commit/95b20990e1a8970bc752287bdbbd5aba6a32a136
showRoom
method to include roomId
, gameMode
, players
, isHost
, and startGameHandler
parameters.playerJoinedRoom
and playerLeftRoom
methods for dynamic player management in the room._getDisplayGameMode
and _getGameModePlayerCount
for better handling of game modes.showQueue
to use _getDisplayGameMode
for setting the game mode display.https://github.com/tridecco/game-client-web/commit/f88e1d11a62da1fe27ca6e7be2d873e2f17d73ed
https://github.com/tridecco/game-client-web/commit/d4197dc84c479ae0db171a28ad9f83d2f66e4fb9
https://github.com/tridecco/game-client-web/commit/544fe40894a94364fc7d9d3affaef73ad33b591a
https://github.com/tridecco/game-client-web/commit/b79596af7c4fcc8dfa803a6a6a42347a952a460f
game.ejs
page to improve the logic for joining and creating rooms.https://github.com/tridecco/game-client-web/commit/cfb8845f55c0dc2f201767ca0981a6fba8f89a05
showRoom
method to use currentRoomPlayers
array instead of currentRoomPlayersCount
.playerJoinedRoom
and playerLeftRoom
methods to manipulate currentRoomPlayers
array.https://github.com/tridecco/game-client-web/commit/8a1207b1ef0e5a900cd068ed40c594f6b1b99925
isCurrentPlayer
property.https://github.com/tridecco/game-client-web/commit/e82eb40e84285801ee56f760d5da602b1acb1f6e
playerLeftRoom
method to assign host role to the second player when the current host leaves.https://github.com/tridecco/game-client-web/commit/c809e4bc1b4cb51c71f75fc321fa44f6542f24ea
https://github.com/tridecco/game-client-web/commit/845add80e773aef07dd03c3704e1d4c55cfa64b4
Description:
Create a comprehensive game page that users are directed to after matching or joining custom rooms. This includes the waiting interface for game matching, the custom room interface, and the game-ready interface. The game page will encompass various components such as board rendering, piece vector conversion, network requests (using socket.io), and essential UI elements like buttons and controls.
Requirements: