source: java/ecj/cecj/app/othello/OthelloMove.java @ 57

Last change on this file since 57 was 44, checked in by mszubert, 15 years ago

cecj, framsticks and games packages imported

File size: 584 bytes
Line 
1package cecj.app.othello;
2
3import games.GameMove;
4
5public class OthelloMove implements GameMove {
6        private int row;
7        private int col;
8
9        public OthelloMove(int row, int col) {
10                this.row = row;
11                this.col = col;
12        }
13
14        public int getRow() {
15                return row;
16        }
17
18        public int getCol() {
19                return col;
20        }
21
22        @Override
23        public boolean equals(Object obj) {
24                if (!(obj instanceof OthelloMove))
25                        return false;
26                OthelloMove move = (OthelloMove) obj;
27                return (this.row == move.row && this.col == move.col);
28        }
29       
30        @Override
31        public String toString() {
32                return "(" + row + ", " + col + ")";
33        }
34}
Note: See TracBrowser for help on using the repository browser.