empress-move-validation.spec.ts 2.22 KB
Newer Older
1
2
3
4
5
import { Expect, Test, Setup} from "alsatian";
import { Chessboard, createEmptyChessboard, putPiece } from '../../main/ts/chessboard';

let chessboard : Chessboard;

6
export class TestEmpressMoves {
7
8
9
10
    @Setup
    beforeEach() {
        // TODO:
        // Initialize an empty chessboard
11
        // Place a white Empress on E4
12
13
    }

14
    @Test("An Empress can move horizontally")
15
16
    testCanMoveHorizontally() {
        // TODO:
17
        // Check the following moves are possible: moveE4_H4, moveE4_A4
18
19
    }

20
    @Test("A Empress can move vertically")
21
22
    testCanMoveVertically() {
        // TODO:
23
        // Check the following moves are possible: moveE4_E1, moveE4_E8
24
25
    }

26
    @Test("An Empress can move two squares horizontally and one square vertically")
27
28
    testCanMoveTwoHorizontalAndOneVertical() {
        // TODO
29
        // Check the following moves are possible:
30
31
32
33
34
35
        // moveE4_G3
        // moveE4_G5
        // moveE4_C3
        // moveE4_C5
    }

36
    @Test("An Empress can move two squares vertically  and one square horizontally")
37
38
39
40
41
    testCanMoveTwoVerticalAndOneHorizontal() {
        // TODO
        // moveE4_F2
        // moveE4_F6
        // moveE4_D2
42
        // moveE4_D6
43
44
45
46
47
48
    }


    @Test("A Empress cannot move diagonally")
    testCannotMoveDiagonally() {
        // TODO:
49
        // Check the following moves are impossible:
50
51
52
        // moveE4_A8, moveE4_B1, moveE4_H7, moveE4_H1
    }

53
    @Test("A Empress can capture a piece from different color")
54
55
56
    testCanCaptureDifferentColor() {
        // TODO:
        // Place a black Pawn on H4
57
        // Check the move moveE4_H4 is possible
58
59
    }

60
    @Test("A Empress cannot capture a piece from the same color")
61
62
63
    testCannotCaptureSameColor() {
        // TODO:
        // Place a white Pawn on H4
64
        // Check the move moveE4_H4 is impossible
65
66
    }

67
68
    @Test("A Empress cannot leap other pieces, when moving horizontally")
    testCannotLeapHorizontally() {
69
70
        // TODO:
        // Place a black Pawn on F4
71
        // Check the move moveE4_H4 is impossible
72
    }
73

74
    @Test("A Empress cannot leap other pieces, when moving vertically")
75
76
77
    testCannotLeapvertically() {
        // TODO:
        // Place a black Pawn on E3
78
        // Check the move moveE4_E1 is impossible
79
    }
80
}