jtulach@0
|
1 |
/*
|
jaroslav@264
|
2 |
* Quoridor server and related libraries
|
jaroslav@264
|
3 |
* Copyright (C) 2009-2010 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
|
jtulach@0
|
4 |
*
|
jaroslav@264
|
5 |
* This program is free software: you can redistribute it and/or modify
|
jaroslav@264
|
6 |
* it under the terms of the GNU General Public License as published by
|
jaroslav@264
|
7 |
* the Free Software Foundation, either version 3 of the License.
|
jtulach@8
|
8 |
*
|
jaroslav@264
|
9 |
* This program is distributed in the hope that it will be useful,
|
jaroslav@264
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
jaroslav@264
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
jaroslav@264
|
12 |
* GNU General Public License for more details.
|
jtulach@8
|
13 |
*
|
jaroslav@264
|
14 |
* You should have received a copy of the GNU General Public License
|
jaroslav@264
|
15 |
* along with this program. Look for COPYING file in the top folder.
|
jaroslav@264
|
16 |
* If not, see http://www.gnu.org/licenses/.
|
jtulach@0
|
17 |
*/
|
jtulach@0
|
18 |
|
jtulach@0
|
19 |
package cz.xelfi.quoridor;
|
jtulach@0
|
20 |
|
jtulach@15
|
21 |
import cz.xelfi.quoridor.Player.Direction;
|
jtulach@0
|
22 |
|
jtulach@6
|
23 |
/** Basic tests in simple configuration.
|
jtulach@0
|
24 |
*
|
jtulach@0
|
25 |
* @author Jaroslav Tulach
|
jtulach@0
|
26 |
*/
|
jtulach@6
|
27 |
public class BoardTest extends BoardCase {
|
jtulach@0
|
28 |
public BoardTest (String testName) {
|
jtulach@0
|
29 |
super (testName);
|
jtulach@0
|
30 |
}
|
jtulach@0
|
31 |
|
jtulach@0
|
32 |
@Override
|
jtulach@6
|
33 |
protected Board move(Board b, int player, Direction... where) throws IllegalPositionException {
|
jtulach@6
|
34 |
return b.move(b.getPlayers().get(player), where);
|
jtulach@0
|
35 |
}
|
jtulach@15
|
36 |
protected Board fence(Board b, int player, char x, int y, Fence.Orientation orie)
|
jtulach@6
|
37 |
throws IllegalPositionException {
|
jtulach@6
|
38 |
return b.fence(b.getPlayers().get(player), x, y, orie);
|
jtulach@0
|
39 |
}
|
jtulach@13
|
40 |
|
jtulach@13
|
41 |
@Override
|
jtulach@13
|
42 |
protected Board apply(Board b, Move move) throws IllegalPositionException {
|
jtulach@13
|
43 |
return b.apply(move);
|
jtulach@13
|
44 |
}
|
jtulach@0
|
45 |
}
|