mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-30 17:07:45 +00:00
Debug PGN import
This commit is contained in:
parent
ce941c146a
commit
a3c24f27f0
4 changed files with 12 additions and 8 deletions
src/game_tab
|
@ -15,10 +15,10 @@ Game::Game(std::string fen) : current(NULL), moves(NULL) {
|
|||
board = chessarbiter::FENParser::Parse(fen).board;
|
||||
}
|
||||
|
||||
Game::Game(HalfMove *m) {
|
||||
Game::Game(HalfMove *m, std::string initial_fen) {
|
||||
moves = m;
|
||||
current = m;
|
||||
initial_fen = m->GetFen();
|
||||
this->initial_fen = initial_fen;
|
||||
board = chessarbiter::FENParser::Parse(initial_fen).board;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ bool Game::Play(std::string move) {
|
|||
if (moves == NULL) {
|
||||
moves = m;
|
||||
}
|
||||
wxLogDebug("%s",GetPGN());
|
||||
wxLogDebug("%s", GetPGN());
|
||||
return (true);
|
||||
}
|
||||
return (false);
|
||||
|
|
|
@ -16,7 +16,7 @@ class Game {
|
|||
public:
|
||||
Game();
|
||||
Game(std::string fen);
|
||||
Game(HalfMove *m);
|
||||
Game(HalfMove *m, std::string initial_fen);
|
||||
|
||||
std::string GetBoard();
|
||||
std::string GetTag(std::string tagname);
|
||||
|
|
|
@ -48,7 +48,7 @@ EditorPanel::EditorPanel(wxFrame *parent, Game *game)
|
|||
tag_panel_sizer->Add(tag_edit_panel, 0, wxEXPAND);
|
||||
tags_list = new wxListCtrl(tag_panel, wxID_ANY, wxDefaultPosition,
|
||||
wxDefaultSize, wxLC_REPORT);
|
||||
tags_list->InsertColumn(0, L"Name");
|
||||
tags_list->InsertColumn(0, L"Name", wxLIST_FORMAT_LEFT, 200);
|
||||
tags_list->InsertColumn(1, L"Value", wxLIST_FORMAT_LEFT, 500);
|
||||
RefreshTagsList();
|
||||
tag_panel_sizer->Add(tags_list, 1, wxEXPAND);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue