Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pkrisz99 committed Nov 11, 2022
1 parent a98e854 commit 0be691c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
12 changes: 9 additions & 3 deletions Renegade/Board.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
#include <sstream>
#include "Move.h"
#include "Utils.cpp"
using namespace std;

using std::cout;
using std::endl;
using std::cin;
using std::string;
using std::vector;
using std::get;

/*
* This is the board representation of Renegade.
Expand All @@ -31,8 +37,8 @@ class Board
bool AreThereLegalMoves(int side);
bool IsLegalMove(Move m, int side);
void TryMove(Move move);
std::vector<Move> GenerateMoves(int side);
std::vector<Move> GenerateLegalMoves(int side);
vector<Move> GenerateMoves(int side);
vector<Move> GenerateLegalMoves(int side);
unsigned __int64 CalculateAttackedSquares(int side);

std::vector<Move> GenerateKnightMoves(int home);
Expand Down
3 changes: 1 addition & 2 deletions Renegade/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ int Engine::StaticEvaluation(Board board, int level) {

// Start UCI protocol
void Engine::Start() {
cout << "Renegade chess engine [Build: " << __DATE__ << " " << __TIME__ << "]" << endl;
cout << "Renegade chess engine " << Version << " [" << __DATE__ << " " << __TIME__ << "]" << endl;
std::string cmd = "";
Board board = Board(starting_fen);
while (getline(cin, cmd)) {
Expand Down Expand Up @@ -353,7 +353,6 @@ void Engine::PrintInfo(Evaluation e) {
void Engine::Play() {
Board board = Board(starting_fen);

cout << "Renegade" << endl;
cout << "c - Computer, h - Human" << endl;
cout << "White player? ";
char white;
Expand Down
1 change: 1 addition & 0 deletions Renegade/Renegade.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
<ClCompile Include="Evaluation.cpp" />
<ClCompile Include="Move.cpp" />
<ClCompile Include="Renegade.cpp" />
<ClCompile Include="Utils.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Board.h" />
Expand Down
3 changes: 3 additions & 0 deletions Renegade/Renegade.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<ClCompile Include="Engine.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Move.h">
Expand Down
2 changes: 2 additions & 0 deletions Renegade/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#include <vector>
#include <string>

const std::string Version = "0.2.0";

// To do: add squares, files, and ranks

namespace Side {
Expand Down

0 comments on commit 0be691c

Please sign in to comment.