BlueBubble
1.0
A recommendation algorithm for movies based on a Netlfix database
Loading...
Searching...
No Matches
pieces
knight.cc
Go to the documentation of this file.
1
#include "
../system/coordinates.h
"
2
#include "
../system/utilities.h
"
3
#include "
piece.h
"
4
#include "
knight.h
"
5
#include <vector>
6
#include <iostream>
7
11
void
knight::needed_space
(
coordinates
dest, std::vector<coordinates> *to_calculate){
12
// The knight doesn't need space
13
}
14
16
void
knight::print_piece
(){
17
if
(
piece::white
){
18
std::cout <<
"\u2658"
;
19
}
else
{
20
std::cout <<
"\u265E"
;
21
}
22
}
23
25
void
knight::canonical_print_piece
(){
26
if
(
piece::white
){
27
std::cout <<
"wN"
;
28
}
else
{
29
std::cout <<
"bN"
;
30
}
31
}
coordinates
a class representing coordinates
Definition
coordinates.h:5
knight::needed_space
void needed_space(coordinates dest, std::vector< coordinates > *to_calculate) override
calculate a list of empty space coordinates needed for the move to be legal, assuming the move is pos...
Definition
knight.cc:11
knight::canonical_print_piece
void canonical_print_piece() override
print the piece to the standard output in canonical form
Definition
knight.cc:25
knight::print_piece
void print_piece() override
print the piece to the standard output
Definition
knight.cc:16
piece::white
bool white
Definition
piece.h:13
coordinates.h
knight.h
piece.h
utilities.h
Generated by
1.10.0