Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMove.java
More file actions
Latest commit
70 lines (64 loc) · 1.79 KB
/
Copy pathMove.java
File metadata and controls
70 lines (64 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
* Move is used as a structure to store a single Move
*
* @author gcschmit
* @version 24 January 2020
*/
publicclassMove
{
privateintx;
privateinty;
privatePiecepiece;
privatedoublescore;
/**
* Constructs a new Move object
*
* @param initialX the desired x coordinate of the bottom-left corner of the piece
* @param initialY the desired y coordinate of the bottom-left corner of the piece
* @param initialPiece the desired orientation (rotation) of the piece
* @param initialScore the score of this move (lower scores are better)
*/
publicMove(intinitialX, intinitialY, PieceinitialPiece, doubleinitialScore)
{
this.x = initialX;
this.y = initialY;
this.piece = initialPiece;
this.score = initialScore;
}
/**
* Returns the desired x coordinate of the bottom-left corner of the piece for this move
*
* @return the desired x coordinate of the bottom-left corner of the piece for this move
*/
publicintgetX()
{
returnthis.x;
}
/**
* Returns the desired y coordinate of the bottom-left corner of the piece for this move
*
* @return the desired y coordinate of the bottom-left corner of the piece for this move
*/
publicintgetY()
{
returnthis.y;
}
/**
* Returns the desired orientation (rotation) of the piece for this move
*
* @return the desired orientation (rotation) of the piece for this move
*/
publicPiecegetPiece()
{
returnthis.piece;
}
/**
* Returns the score of this move (lower scores are better)
*
* @return the score of this move
*/
publicdoublegetScore()
{
returnthis.score;
}
}