summaryrefslogtreecommitdiffstats
path: root/labb5/src
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-12-01 14:23:43 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-12-01 14:23:43 +0100
commit095ce707119f9d6473f1dfc790e507230194af83 (patch)
tree93e8d4cc5d24a32b7f9dc61f53e347fc2b4a753b /labb5/src
parent618e5cd0dbe3d1f5c2d28586fcbe43c7bc1b79ed (diff)
downloadtddd86-095ce707119f9d6473f1dfc790e507230194af83.tar.gz
-> board_from_string
Diffstat (limited to 'labb5/src')
-rwxr-xr-xlabb5/src/Boggle.cpp2
-rwxr-xr-xlabb5/src/Boggle.h2
-rwxr-xr-xlabb5/src/boggleplay.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/labb5/src/Boggle.cpp b/labb5/src/Boggle.cpp
index 065d923..6d3fd32 100755
--- a/labb5/src/Boggle.cpp
+++ b/labb5/src/Boggle.cpp
@@ -62,7 +62,7 @@ Boggle::Boggle() {
dictionary = Lexicon(DICTIONARY_FILE);
}
-bool Boggle::letters_from_string(const string& letters) {
+bool Boggle::board_from_string(const string& letters) {
if (letters.length() != BOARD_SIZE * BOARD_SIZE) {
return false;
}
diff --git a/labb5/src/Boggle.h b/labb5/src/Boggle.h
index 26cc524..8e065d7 100755
--- a/labb5/src/Boggle.h
+++ b/labb5/src/Boggle.h
@@ -28,7 +28,7 @@ public:
*
* Returns wether it succeeds or not.
*/
- bool letters_from_string(const string& letters);
+ bool board_from_string(const string& letters);
void read_dictionary();
diff --git a/labb5/src/boggleplay.cpp b/labb5/src/boggleplay.cpp
index f41c156..8219928 100755
--- a/labb5/src/boggleplay.cpp
+++ b/labb5/src/boggleplay.cpp
@@ -19,7 +19,7 @@ void setup_board(Boggle& boggle) {
cout << "Input your board (16 characters): ";
getline(cin, input_board);
if (input_board.length() == 16) {
- if (boggle.letters_from_string(input_board)) {
+ if (boggle.board_from_string(input_board)) {
break;
} else {
cout << "Please input a valid string" << endl;