-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAction.java
More file actions
29 lines (25 loc) · 974 Bytes
/
Action.java
File metadata and controls
29 lines (25 loc) · 974 Bytes
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
/**
* @author John Henry Cooper
* @version 15.0.2
* Abstract class for all Actions. Contains a constructor, 2 member fields, and a preformAction field
*/
public abstract class Action {
/**
this class represents actions that the players can make during thier turn
@param fromRow - row inxed of attacking piece
@param fromColumn - column index of attacking piece
@param toRow - row inxed of where attacking piece will attack
@param toColumn - column index of where attacking piece will attack
sets the five member fields
*/
protected GameS22 game;
protected int fromRow , fromColumn , toRow, toColumn;
public Action (GameS22 game, int fromRow, int fromColumn, int toRow, int toColumn){
this.game = game;
this.fromRow = fromRow;
this.fromColumn = fromColumn;
this.toRow = toRow;
this.toColumn = toColumn;
}
public abstract void performAction();
}