summaryrefslogtreecommitdiff
path: root/Userland/Games/Solitaire/Card.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-05-05 09:42:59 -0400
committerAndreas Kling <kling@serenityos.org>2021-05-05 21:38:45 +0200
commite1492e9a62bf0d4ff1dce5b933ba05cad8de270d (patch)
tree24f40829f0425f3593a4a97b8bb2415c310e42b2 /Userland/Games/Solitaire/Card.cpp
parent15f0ee1727c964aed73363b65b0b4270640ac370 (diff)
downloadserenity-e1492e9a62bf0d4ff1dce5b933ba05cad8de270d.zip
Solitaire: Place files in Solitaire namespace and rename main widget
The purpose is to allow the Solitaire widget to be used in GML. The macro to register a widget requires a namespace, so this moves all files in the application to the Solitaire namespace. This also renames the SolitaireWidget class to Game - this is to avoid the redundancy / verbosity of typing "Solitaire::SolitaireWidget", and matches many other games in Serenity (Breakout, 2048, etc.).
Diffstat (limited to 'Userland/Games/Solitaire/Card.cpp')
-rw-r--r--Userland/Games/Solitaire/Card.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Games/Solitaire/Card.cpp b/Userland/Games/Solitaire/Card.cpp
index b1a98ba6d7..40c4d4d072 100644
--- a/Userland/Games/Solitaire/Card.cpp
+++ b/Userland/Games/Solitaire/Card.cpp
@@ -9,6 +9,8 @@
#include <LibGfx/Font.h>
#include <LibGfx/FontDatabase.h>
+namespace Solitaire {
+
static const NonnullRefPtr<Gfx::CharacterBitmap> s_diamond = Gfx::CharacterBitmap::create_from_ascii(
" # "
" ### "
@@ -155,3 +157,5 @@ void Card::clear_and_draw(GUI::Painter& painter, const Color& background_color)
draw(painter);
save_old_position();
}
+
+}