mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-07 02:26:29 +02:00
Cleaning code
This commit is contained in:
parent
6ccdc954c5
commit
cbcc455e33
4 changed files with 13 additions and 16 deletions
|
@ -58,22 +58,6 @@ MainWindow::MainWindow()
|
||||||
Bind(wxEVT_CLOSE_WINDOW, &MainWindow::OnClose, this);
|
Bind(wxEVT_CLOSE_WINDOW, &MainWindow::OnClose, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
class AdvancePage : public wxPreferencesPage {
|
|
||||||
public:
|
|
||||||
virtual wxString GetName() const { return "Topics"; }
|
|
||||||
virtual wxBitmap GetLargeIcon() {
|
|
||||||
return wxArtProvider::GetBitmap(wxART_HELP, wxART_TOOLBAR);
|
|
||||||
}
|
|
||||||
virtual wxWindow *CreateWindow(wxWindow *parent) {
|
|
||||||
wxPanel *p =
|
|
||||||
new wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(800, 800));
|
|
||||||
wxBoxSizer *s = new wxBoxSizer(wxVERTICAL);
|
|
||||||
s->Add(new wxButton(p, COPY_FEN_BTN, L"Copy FEN"), 1, wxEXPAND);
|
|
||||||
p->SetSizer(s);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void MainWindow::OnSettings(wxCommandEvent &event) {
|
void MainWindow::OnSettings(wxCommandEvent &event) {
|
||||||
if (prefsEditor != NULL) {
|
if (prefsEditor != NULL) {
|
||||||
delete prefsEditor;
|
delete prefsEditor;
|
||||||
|
|
|
@ -29,6 +29,7 @@ std::string Game::GetTag(std::string tagname) { return (tags[tagname]); }
|
||||||
void Game::SetTag(std::string tagname, std::string value) {
|
void Game::SetTag(std::string tagname, std::string value) {
|
||||||
tags[tagname] = value;
|
tags[tagname] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Game::IsBlackToPlay() {
|
bool Game::IsBlackToPlay() {
|
||||||
if (current == NULL) {
|
if (current == NULL) {
|
||||||
return (false);
|
return (false);
|
||||||
|
@ -55,6 +56,7 @@ void Game::DeleteMove(HalfMove *m) {
|
||||||
}
|
}
|
||||||
|
|
||||||
HalfMove *Game::GetCurrentMove() { return (current); }
|
HalfMove *Game::GetCurrentMove() { return (current); }
|
||||||
|
|
||||||
HalfMove *Game::GetMoves() { return (moves); }
|
HalfMove *Game::GetMoves() { return (moves); }
|
||||||
|
|
||||||
void Game::PromoteMove(HalfMove *m) {
|
void Game::PromoteMove(HalfMove *m) {
|
||||||
|
|
|
@ -37,5 +37,10 @@ public:
|
||||||
std::vector<std::string> ListTags();
|
std::vector<std::string> ListTags();
|
||||||
std::string GetPGN();
|
std::string GetPGN();
|
||||||
void SetResult(std::string result);
|
void SetResult(std::string result);
|
||||||
|
/**
|
||||||
|
* @brief Build current game
|
||||||
|
* Verify and play all the moves in the game
|
||||||
|
* while building the fen for each move
|
||||||
|
*/
|
||||||
void BuildAndVerify();
|
void BuildAndVerify();
|
||||||
};
|
};
|
|
@ -55,5 +55,11 @@ public:
|
||||||
void SetFen(std::string fen);
|
void SetFen(std::string fen);
|
||||||
void SetCapture(char c);
|
void SetCapture(char c);
|
||||||
std::string GetPGN();
|
std::string GetPGN();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Build current move
|
||||||
|
* Verify and play all the moves in the game
|
||||||
|
* while building the fen for each move
|
||||||
|
*/
|
||||||
void BuildAndVerify(std::string initial_fen);
|
void BuildAndVerify(std::string initial_fen);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue