This pull request includes several changes across multiple files to enhance functionality and improve code readability. The key changes include the addition of a new alert function, updates to game logic, and various code style improvements.
New Functionality:
frontend/js/app.js: Added a new route for tournament_preview and implemented the showAlert function to display alerts. [1][2]
Game Logic Enhancements:
frontend/js/game.js: Refactored the start_game function to handle game state updates, player input, and endgame conditions more effectively. Added logic to navigate to tournament_preview if tournament games are present. [1][2][3][4][5][6][7][8]
This pull request includes several changes across multiple files to enhance functionality and improve code readability. The key changes include the addition of a new alert function, updates to game logic, and various code style improvements.
New Functionality:
frontend/js/app.js
: Added a new route fortournament_preview
and implemented theshowAlert
function to display alerts. [1] [2]Game Logic Enhancements:
frontend/js/game.js
: Refactored thestart_game
function to handle game state updates, player input, and endgame conditions more effectively. Added logic to navigate totournament_preview
if tournament games are present. [1] [2] [3] [4] [5] [6] [7] [8]Code Style Improvements:
frontend/js/game.js
: Standardized string usage to double quotes and improved code formatting for better readability. [1] [2] [3] [4] [5] [6] [7] [8]frontend/js/hubSocket.js
: Improved logging format for better debugging.Alert Integration:
frontend/js/login.js
: Integrated theshowAlert
function to display an alert on wrong password entry. [1] [2]frontend/js/tournament.js
: Integrated theshowAlert
function to display alerts for various tournament-related messages. [1] [2] [3] [4]Miscellaneous:
frontend/css/base.css
: Added styles for#main_alert
to position it correctly on the page.frontend/js/endscreen.js
: Added logic to display the end screen message based on game result stored in local storage.