Thraka / SadConsole

A .NET ascii/ansi console engine written in C# for MonoGame and XNA. Create your own text roguelike (or other) games!
MIT License
1.22k stars 120 forks source link

Fix ShiftDown and Add Shift Surface Tests #304

Closed Chris3606 closed 1 year ago

Chris3606 commented 1 year ago

Overview

Just a quick fix to fix a bug in the ShiftDown, and add unit tests for console-wide shift functions to prevent regression. I also think it may be possible to significantly optimize the performance of these functions, but that can be done in a separate PR if anything.

Given that this is a bugfix, I wasn't sure whether you wanted it targeting develop or master. If you want master so you can release a v9 fix, I can cherry-pick my commits out or just create a second PR; the actual change to SadConsole, as opposed to the unit tests, is effectively one line.

Changes