+1(316)4441378

+44-141-628-6690

X in row (java)

The functionalities below are required:
    Provide an entry screen as a JPanel containing GUI objects for players to:
    Enter Player 1s name
    Enter Player 2s name
    Have options for either player 1 to start or randomly select who moves first
    The dimensions of the board: rectangular, at least 3 but no more than 12 rows & columns
    The number of placements in a row required for victory, at least 3 but no more than 6
    A button to confirm the selected options and begin play
    After confirming the options, gameplay will begin. Display the game board in a different JPanel object, which is updated after each move. This JPanel will have a grid layout of the specified number of rows and columns. Each square should use a subclass of JPanel with custom graphics to display, appropriately, one of the following:
    Which squares are unclaimed, shown as blank
    Player 1 moves shown as X
    Player 2 moves shown as O
    All squares should have a solid border to facilitate accurate selection
    Gameplay:
    Players make moves by using a mouse and clicking on unclaimed squares (assume hotseat, where both players take turns using the mouse) the interface classes MouseListener and MouseMotionListener are recommended
    After each move, the game should check for victory or a tie (if no further moves are possible)
    If a player selects an invalid move (a square previously selected by either player), the application should throw an Exception. This Exception will be caught and catching it will display a dialog box reminding the player to only select unclaimed squares. Closing the dialog box will resume normal gameplay.
    Extra Credit (10pts): Check for a tie, when neither player could possibly get enough placements in a row to win
    Games should conclude with a dialog box including:
    Announcement of result and congratulations to winner (if any)
    Options to exit the application or return to the entry screen and begin a new game
    Attempting to close the window should:
    Before or after a game: Close the window and exit the game.
    During a game: Provide a dialog box asking if the player really wants to quit and options for closing the window (and aborting the game) or not.

 

You can place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.

 

Latest completed orders:

# topic title discipline academic level pages delivered
6
Writer's choice
Business
University
2
1 hour 32 min
7
Wise Approach to
Philosophy
College
2
2 hours 19 min
8
1980's and 1990
History
College
3
2 hours 20 min
9
pick the best topic
Finance
School
2
2 hours 27 min
10
finance for leisure
Finance
University
12
2 hours 36 min
[order_calculator]