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

Last change on this file since 462 was 193, checked in by Maciej Komosinski, 11 years ago

Set svn:eol-style native for all textual files

  • Property svn:eol-style set to native
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.