Changed the default initialization of Accepter, GameId, and Game properties in Challenge model. Also modified how the 'autodark.js' and 'player.js' scripts are imported in 'layout.js' to use relative paths for better compatibility.
Introduced capability to accept a challenge, updated challenge viewer model to include challenge id, and updated the In-Memory database to handle adding new games. The corresponding endpoint was updated and the front-end scripts were added to handle challenge acceptance and game redirection. Changes were also made to ensure challenges are only seen when not accepted in the public view.
A new import statement for 'Aiursoft.WebTools.Attributes' has been added to the GamesController. This additional library will enhance the functionality and capabilities of the GamesController in the ChessServer project.
The Aiursoft.WebTools package has been upgraded from version 8.0.0 to version 8.0.1. Also, the 'EnforceWebSocket' attribute has been added to the 'GetWebSocket' method in the GamesController to ensure that it only accepts WebSocket requests.
The changes primarily focus on simplifying constructors to increase readability. This is done by organizing class properties and functions in a more efficient manner. In addition, strings are accessed using indexing rather than substrings - a technique that enhances execution speed. Not only does this change clarify the controllers and classes, but also significantly improves the overall code quality and efficiency.
In the AllowCrossOriginMiddleware, the method for adding headers to the response has been adjusted. Instead of the 'Add' method which could lead to potential overwriting, 'Append' method is used to ensure that CORS headers are always updated correctly.