Closed TKanX closed 1 week ago
https://github.com/tridecco/game-client-web/commit/c7e08a9808e0870ec087f3a6fe411212317a934f
constructor
to use Object.assign
for cleaner style updates._getSection
with a Set
for efficiency._getDisplayGameMode
and _getGameModePlayerCount
to simplify logic._showSection
and _hideSection
into _toggleSectionVisibility
for reusability.https://github.com/tridecco/game-client-web/commit/c9a8b02945117572d1183979a99b9c15d2c0524f
showSection
to use _toggleSectionVisibility
for section management._renderPlayers
method.showRoom
, showGameReady
, and showGame
.https://github.com/tridecco/game-client-web/commit/eadfbf9f7353c95f395d36a555bfd3ab158ffce5
showGameResults
to modularize table creation into _createTableHeader
and _createTableCell
methods.DocumentFragment
for efficient DOM updates and reduced redundant DOM manipulation.showError
by implementing _manageElement
to handle element visibility and content updates.https://github.com/tridecco/game-client-web/commit/25c2710932877b0219f97260b50e61bc5a4ab0f7
startQueueWaitingTime
to use String.prototype.padStart
for consistent time formatting.playerJoinedRoom
by consolidating DOM manipulation and element creation into a single step.playerLeftRoom
with conditional checks to avoid errors from null references and streamlined the logic for updating the room status.startPlayerTurn
to ensure progress percentage does not exceed 100% and optimized endPlayerTurn
for cleaner style reset.showPlayerRank
with a more straightforward color assignment and improved showPlayerDisconnected
for clarity.querySelectorAll
in clearPlayerRank
to reduce redundancy in clearing player rank styles.showGamePhase
with efficient use of setTimeout
for smoother phase transition animations and visibility management.These changes improve the overall performance and maintainability of the game UI components.
https://github.com/tridecco/game-client-web/commit/a4467758646e28bcd3f47cabeaecf06d8044f565
showPieceSelection
to use Array.prototype.forEach
for iterating over pieces and consolidated DOM manipulation for better readability.hidePieceSelection
by removing unnecessary style resets and ensuring the piece list is cleared efficiently.showTossButton
to directly set button visibility and add event listener in a simplified manner.hideTossButton
to remove event listeners more effectively by replacing the button element.These updates streamline the piece selection and button visibility functionalities, enhancing performance and code maintainability.
https://github.com/tridecco/game-client-web/commit/c4bb46d52849a68cb8a72847d050c43d91fd7f73
initTrade
to consolidate DOM updates and simplify player list rendering, improving performance and readability.showTrade
to use forEach
for iterating over pieces, optimized event listener management, and streamlined trade button visibility logic.hideTrade
to efficiently clear player piece elements and reset state variables.showTradeRequest
to directly update trade request elements and attach event handlers in a more concise manner.hideTradeRequest
to hide the trade request modal efficiently.These improvements boost the performance of trade-related functionalities and enhance overall code clarity.
https://github.com/tridecco/game-client-web/commit/ac06482bb9b8ba656a3b72509f66b5364e82f5ab
showRoundSummary
to build the table rows in a single template string and set innerHTML
once, reducing DOM manipulation and improving performance.hideRoundSummary
function to efficiently hide the summary and clear table content.These changes enhance the efficiency of displaying and hiding round summaries, resulting in smoother performance and cleaner code.
https://github.com/tridecco/game-client-web/commit/2d09f1876fc2148631ce43ab8c62753dc187680a
_sendEvent
method to centralize socket event emission and response handling.authenticate
, joinQueue
, leaveQueue
, createRoom
, joinRoom
, startRoom
, and leaveRoom
methods to use _sendEvent
, improving consistency and readability.trade
method to handle optional parameters more effectively.These changes streamline the class implementation and improve maintainability.
https://github.com/tridecco/game-client-web/commit/81b590737f06378f2e524f7256e10ecda99c816f
getImageData
to avoid unnecessary processing.
Description:
To ensure a seamless and consistent gameplay experience for all users, it is crucial to test and optimize the game’s performance and compatibility across various web browsers. This issue involves verifying functionality, performance, and user experience on a range of browsers to address any discrepancies and ensure high-quality gameplay.
Browsers to Test:
Additional Browsers (if needed):
Testing Objectives:
@tedhyu