Please conform to the following format when completing your A1.analysis.
You are asked to provide the following three deliverables.
When describing the Narcotic game, we referenced several objects: (a) A deck from which cards are dealt; (b) piles into which cards are dealt. We will therefore represent the Narcotic game as follows:
You should identify the entity elements as well as the widget elements.
You must show me the full layout of your game using the Java coordinate system. Here is the example from Narcotic. You should take advantage of the fact that you can compute the width (w) and height (h) of the cards in the deck and use these during your computations. Note that in Java the upper left corner of the playing field is (0,0) with increasing X to the right and increasing Y down the screen.
You must show all elements that will be shown on the screen, and their position with relation to the upper left corner.
You must accurately determine the moves that will be played in the game. Every move that was clearly identified by a use case will belong to its own subclass of the Move class. Here are the four move classes for Narcotic. Make sure that each Move class will have sufficient information to be able to (a) determine if the move is valid; (b) execute the move; (c) undo the move. Note that these move classes are all subclasses of the framework class ks.common.model.Move.
For each class, provide a brief description that fully explains what the move does (note that you don't have to describe undo because it is assumed to be the reverse of the move). However, if your move class does not admit for an undo operation, then state that clearly:
Note: Pay attention to moves that involve Dragging a card (or a set of cards) from one location of the game to another. As you should observe when you complete the Solitaire Tutorial, the drag move is special because the card(s) being dragged have already been removed from the source location element by the time the move is completely identified. For this reason, move subclasses that relate to dragging card(s) often have a constructor with three parameters: (a) the source element affected; (b) the target element to which the card(s) are to be moved; (c) the card(s) actually being dragged.
If you have questions on this last point, pay attention to the MoveCardMove class in Narcotic.
Your final deliverable is to show the user interaction in making these moves happen. You have the following choices:
So for Narcotic, we have: