Question: Description Implement a virtual Ping-Pong championship, which features 8 players and 1 referee (all 9 implemented as distinct applications). The 8 players will be instances


Description Implement a virtual Ping-Pong championship, which features 8 players and 1 referee (all 9 implemented as distinct applications). The 8 players will be instances of the same app, with different attributes, defined in an external file. The Championship The Referee program starts and waits for all 8 players to join the championship. When all players have joined, the referee draws the 4 initial games and notifies the players about their game id, opponent and their order of play (first, second). All games are a knock-out and supervised by the referee. After all 4 games have ended, the referee informs the defeated players to shut down, draws the second round (semi- finals), informs the players about their new game id and opponents. In a similar fashion, the process continues to the final game and cup winner. The Game The game starts with the first (offensive) player picking one random number (from 1 to 10) and informing the referee about it. The defending player creates a defence array of random numbers (from 1 to 10). The length of the defence array is preset for each player (see players matrix at the end of this document) and defined in their individual configuration files. If the number picked by the offensive player does not exist in the defence array, then the player gets one point and plays again. If it exists, the defender gets the point and they switch roles (defender attacks). The first player to get 5 points wins the game. Technical Specirications All transactions between the referee and the players should be implemented as a REST API. All 8 Players and the Referee have to run as autonomous applications; able to communicate with each other via REST API calls. Pay attention to the proper definition of the REST API routes, implementation, status codes etc. Pay attention to each player identification/authentication (during both of joining and game processes).At the end of the championship the Referee should export a report, which lists all the games, the final scores plus the Champion. You can use any framework and library you want. Deliverables Please provide full code required to implement the championship, along with complete setup instructions. Please provide the full list of REST API routes supported by both the Referee and the Player sub-application. Timeframe While there is no defined timeframe, it is expected that the time to complete the assignment would range between 4 and 8 hours. The Players Player # Defence Set Length Player Name Joey 1 8 2 2 Nick 8 3 Russel 7 4 Vivek 7 5 Pritam 6 6 Amit 6 7 Chandler 5 8 Colwin 5 Description Implement a virtual Ping-Pong championship, which features 8 players and 1 referee (all 9 implemented as distinct applications). The 8 players will be instances of the same app, with different attributes, defined in an external file. The Championship The Referee program starts and waits for all 8 players to join the championship. When all players have joined, the referee draws the 4 initial games and notifies the players about their game id, opponent and their order of play (first, second). All games are a knock-out and supervised by the referee. After all 4 games have ended, the referee informs the defeated players to shut down, draws the second round (semi- finals), informs the players about their new game id and opponents. In a similar fashion, the process continues to the final game and cup winner. The Game The game starts with the first (offensive) player picking one random number (from 1 to 10) and informing the referee about it. The defending player creates a defence array of random numbers (from 1 to 10). The length of the defence array is preset for each player (see players matrix at the end of this document) and defined in their individual configuration files. If the number picked by the offensive player does not exist in the defence array, then the player gets one point and plays again. If it exists, the defender gets the point and they switch roles (defender attacks). The first player to get 5 points wins the game. Technical Specirications All transactions between the referee and the players should be implemented as a REST API. All 8 Players and the Referee have to run as autonomous applications; able to communicate with each other via REST API calls. Pay attention to the proper definition of the REST API routes, implementation, status codes etc. Pay attention to each player identification/authentication (during both of joining and game processes).At the end of the championship the Referee should export a report, which lists all the games, the final scores plus the Champion. You can use any framework and library you want. Deliverables Please provide full code required to implement the championship, along with complete setup instructions. Please provide the full list of REST API routes supported by both the Referee and the Player sub-application. Timeframe While there is no defined timeframe, it is expected that the time to complete the assignment would range between 4 and 8 hours. The Players Player # Defence Set Length Player Name Joey 1 8 2 2 Nick 8 3 Russel 7 4 Vivek 7 5 Pritam 6 6 Amit 6 7 Chandler 5 8 Colwin 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
