Closed jslater89 closed 8 years ago
Your codebase is quite large, but it seems to contain a "RawTerminal" class, which essentially contains all the drawing logic for your game.
At some point in the method that renders the table at the left, rendering each row ends in:
694 rowString += "\n";
695 rowString += ANSI_RESET;
So, you reset the color only after adding a newline. This looks somewhat suspicious to me, but I haven't dug into it far enough to even see how this gets combined with the righthandside "Information" Panel.
Another detail: Esc [0m
seems (in my experience) be slightly less compatible with real world terminals than Esc [m
, so you might try the latter for ANSI_RESET and see if it improves things.
RawTerminal is deprecated, kept around for printing board positions to the console—the Lanterna-based code is in the ui.lanterna package. GameScreen holds the in-game UI.
I will have another look at it, but probably won't get to it before friday...
GameScreen.java seems quite big and I couldn't find the part where the grid is drawn... Also, the whole project is a bit too large to just run it on my machine...
I do have some joy in spotting problems, like other people solve crossword puzzles or sudoku, but without your help such as pointing to the relevant one of the 100 class files, it's not quite the fun.
Another thing that would be helpful: you could run your program inside "script", which will record all output to the terminal in a file named "typescript". you could then attach that file to a message here, or filter it through some hexdump utility (e.g.: hd) and then try to isolate all the escape sequences between +-k--+
and the ||
.
Yes, this was quite a lot of code to go through... Can you make a simple reproducing case, maybe by isolating out a very basic part of the drawing code and feed it with static data so the rest of the logic doesn't need to be pulled in?
Sure, I'll see if I can whip up a minimal case.
@mabe02 It works as expected in beta3 (though entering private mode causes an immediate quit, I can work around that until I can dig into why).
The screenshots below are from bash in gnome-terminal (showing the problem) and the Swing terminal emulator (showing the expected appearance), but I encounter similar issues with bash in raw Unix terminals.
The source code for the application I'm running can be found here: http://manywords.press/hg/shortlog/9ca13ad6ccc9. Am I doing something wrong?