From db208b38d78571d68a5f92b7221175d2e67d09ed Mon Sep 17 00:00:00 2001
From: thecharlesblake
Date: Mon, 16 Oct 2017 12:53:14 +0100
Subject: Move setup classes to legacy
---
.idea/modules.xml | 4 +-
CMakeLists.txt | 2 +-
src/main/Card.cpp | 25 ----------
src/main/Card.h | 19 --------
src/main/legacy_card.cpp | 25 ++++++++++
src/main/legacy_card.h | 19 ++++++++
src/main/legacy_main.cpp | 121 +++++++++++++++++++++++++++++++++++++++++++++++
src/main/main.cpp | 121 -----------------------------------------------
8 files changed, 168 insertions(+), 168 deletions(-)
delete mode 100644 src/main/Card.cpp
delete mode 100644 src/main/Card.h
create mode 100644 src/main/legacy_card.cpp
create mode 100644 src/main/legacy_card.h
create mode 100644 src/main/legacy_main.cpp
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 98d02a1..6bef8dd 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
-
+
-
+
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee413e5..b292ab7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
## source files ###############################################################
###############################################################################
-set(sources src/main/main.cpp src/main/Card.h src/main/Card.cpp)
+set(sources src/main/main.cpp)
set(sources_test src/test/main_test.cpp)
###############################################################################
diff --git a/src/main/Card.cpp b/src/main/Card.cpp
deleted file mode 100644
index ead2fd5..0000000
--- a/src/main/Card.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// Created by thecharlesblake on 10/11/17.
-//
-
-#include "Card.h"
-#include
-
-Card::Card(const int r, const std::string s): rank(r), suit(s) {}
-
-std::ostream & operator<<(std::ostream & Str, Card const & c) {
- std::string r;
- if (c.rank == 1) {
- r = "A";
- } else if (c.rank <= 10) {
- r = std::to_string(c.rank);
- } else if (c.rank == 11) {
- r = "J";
- } else if (c.rank == 12) {
- r = "Q";
- } else if (c.rank == 13) {
- r = "K";
- }
-
- return Str << r << c.suit;
-}
\ No newline at end of file
diff --git a/src/main/Card.h b/src/main/Card.h
deleted file mode 100644
index 651df71..0000000
--- a/src/main/Card.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Created by thecharlesblake on 10/11/17.
-//
-
-#ifndef SOLITAIRE_PIP_CARD_H
-#define SOLITAIRE_PIP_CARD_H
-
-#include
-
-struct Card {
- Card(const int, const std::string);
- const int rank;
- const std::string suit;
-};
-
-std::ostream & operator<<(std::ostream &, Card const &);
-
-
-#endif //SOLITAIRE_PIP_CARD_H
diff --git a/src/main/legacy_card.cpp b/src/main/legacy_card.cpp
new file mode 100644
index 0000000..9481ecc
--- /dev/null
+++ b/src/main/legacy_card.cpp
@@ -0,0 +1,25 @@
+//
+// Created by thecharlesblake on 10/11/17.
+//
+
+#include "legacy_card.h"
+#include
+
+legacy_card::legacy_card(const int r, const std::string s): rank(r), suit(s) {}
+
+std::ostream & operator<<(std::ostream & Str, legacy_card const & c) {
+ std::string r;
+ if (c.rank == 1) {
+ r = "A";
+ } else if (c.rank <= 10) {
+ r = std::to_string(c.rank);
+ } else if (c.rank == 11) {
+ r = "J";
+ } else if (c.rank == 12) {
+ r = "Q";
+ } else if (c.rank == 13) {
+ r = "K";
+ }
+
+ return Str << r << c.suit;
+}
\ No newline at end of file
diff --git a/src/main/legacy_card.h b/src/main/legacy_card.h
new file mode 100644
index 0000000..215e510
--- /dev/null
+++ b/src/main/legacy_card.h
@@ -0,0 +1,19 @@
+//
+// Created by thecharlesblake on 10/11/17.
+//
+
+#ifndef SOLITAIRE_PIP_CARD_H
+#define SOLITAIRE_PIP_CARD_H
+
+#include
+
+struct legacy_card {
+ legacy_card(const int, const std::string);
+ const int rank;
+ const std::string suit;
+};
+
+std::ostream & operator<<(std::ostream &, legacy_card const &);
+
+
+#endif //SOLITAIRE_PIP_CARD_H
diff --git a/src/main/legacy_main.cpp b/src/main/legacy_main.cpp
new file mode 100644
index 0000000..76940df
--- /dev/null
+++ b/src/main/legacy_main.cpp
@@ -0,0 +1,121 @@
+#include
+#include
+#include
+#include