-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmovingPrefab.hpp
More file actions
47 lines (36 loc) · 1 KB
/
Copy pathmovingPrefab.hpp
File metadata and controls
47 lines (36 loc) · 1 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// movingPrefab.hpp
// chess
//
// Created by Marcel Haupt on 09.12.15.
// Copyright © 2015 Marcel Haupt. All rights reserved.
//
#pragma once
#include <vector>
class EnpassantFlag;
class Point;
class Move;
class CBoard;
class MovingPrefab {
private:
int dx, dy;
bool continuous;
bool allowBeat;
bool requireBeat;
bool requireXPos;
bool requireYPos;
int reqX;
int reqY;
bool isRochade;
int rochadeRookX;
//enpassant
bool setEnpassantFlag = false;
int enpassantDx;
int enpassantDy;
bool enableEnpassantHitting = false;
public:
MovingPrefab(int _dx, int _dy, bool _continuous = false, bool _allowBeat = true, bool _requireBeat = false, int _reqX = -1, int _reqY = -1, int _rochadeRookX = -1);
void setEnpassantMove(int _dx, int _dy);
void setEnpassantHitting() { enableEnpassantHitting = true; }
void getMoves(Point & point, CBoard & board, std::vector< Move > & moves, EnpassantFlag* eflag = 0) const;
};