Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me with my code. I have errors at lines 5 9 , 4 2 , and 4 8 . GameService.java package com

Can someone help me with my code. I have errors at lines 59,42, and 48. GameService.java
package com aamingroom:
import javasutill. Sist
1****
A singleton service for the game engine
@author coce(@)
suhu.edu
*/
public class GameSerrice {
1**%
* A list of the active games
private static List-Game> games = new AxayListeGame (-);
1**
* Holds the next game identifier
*
private static long rextGponsd=1.
?addedastaticinstancevariabletoholdthesingleinstanceofGamaService
privatestaticfinalGamaSericeinstance=newGameServices
1**** make the constructor private so that no other class can create an instance of Garoservice
*/
private GamoSerrices){
}
/**
*Returns the game instance at the specified index.
**0>
Scope is package/local for testing purposes.
@param index indes position in the list to return
@returu requested game instance
*!
Game setGama(int index){
return gaves get(imdex);
}
1****
Returns the game instance with the specified id.
*@param id unique identifier of game to search for
*. @return requested game instance
public Game getGameflong id){
// a local game instance
Game gavoe = null;
// FIXME: Use iterator to look for existing game with game id
" if found, simply assign that instance to the local variable
return gama;
}
1****
Returns the game instance with the specified name.
@param name unique name of game to search for
@return requested game instance
**
public Game getGame(String name){
// a local game instance
Game gayoe = null:
// FLXME: Use iterator to look for existing game with same name
" if found, simply assign that instance to the local variable
return gama;
}
1****
Returns the number of games currently active
@return the number of games currently active
public int getGameCGupt {
return gaves_-6ize:;Specifically, the client has requested that the following software requirements be met for the game application:
It is supposed to be like Draw It or Lose It is loosely similar to the 1980s television game Win, Lose or Draw, where teams compete to guess what is being drawn. Rather than a player drawing images on an easel to help team members guess the puzzle (a phrase, title, or thing), the application will render images from a large library of stock drawings as clues. A game consists of four rounds of play lasting one minute each. Drawings are rendered at a steady rate and are fully complete at the 30-second mark. If the team does not guess the puzzle before time expires, the remaining teams have an opportunity to offer one guess each to solve the puzzle with a 15-second time limit.A game will have the ability to have one or more teams involved.
Each team will have multiple players assigned to it.
Game and team names must be unique to allow users to check whether a name is in use when choosing a team name.
Only one instance of the game can exist in memory at any given time. This can be accomplished by creating unique identifiers for each instance of a game, team, or player.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

=+a) Write the null and alternative hypotheses.

Answered: 1 week ago

Question

b. Did you suppress any of your anger? Explain.

Answered: 1 week ago