-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMove.hpp
More file actions
33 lines (24 loc) · 729 Bytes
/
Move.hpp
File metadata and controls
33 lines (24 loc) · 729 Bytes
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
#ifndef MOVE_HPP
#define MOVE_HPP
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <string>
#include <sstream>
#include "Utils.hpp"
struct Move {
Move() { }
Move(Position in_from, Position in_to, PieceType in_type) : from(in_from), to(in_to), piece_type(in_type) { }
string to_string(){
stringstream os;
os << "From: " << from.row << " " << from.col << endl;
os << "To: " << to.row << " " << to.col << endl;
return os.str();
}
Position from;
Position to;
PieceType piece_type;
};
ostream& operator<<(ostream& os, Move const& rhs){
return os;
}
#endif