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