summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibChess/Chess.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibChess/Chess.h b/Userland/Libraries/LibChess/Chess.h
index c73bdc5cce..a67e173a93 100644
--- a/Userland/Libraries/LibChess/Chess.h
+++ b/Userland/Libraries/LibChess/Chess.h
@@ -57,7 +57,14 @@ constexpr Piece EmptyPiece = { Color::None, Type::None };
struct Square {
i8 rank; // zero indexed;
i8 file;
+
Square(StringView name);
+
+ Square(char const name[3])
+ : Square({ name, 2 })
+ {
+ }
+
Square(int const& rank, int const& file)
: rank(rank)
, file(file)