diff --git a/README.md b/README.md index 301fadc..7d5227c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A Tetris Attack Clone under the GPL. Homepage:
Source: -##Screen shot +## Screen shot ![Block Attack - Rise of the Blocks 2.0.0 snapshot](/source/misc/screenshots/screen_shot_2016_01_19.png?raw=true "Screen shot from 2016-01-19") ## Dependencies @@ -65,7 +65,6 @@ and docker build -f source/misc/docker/Dockerfile.WindoesBuild . -t blockattack_test ``` - ## Source Structure This project is a bit unconversionel because I didn't know any better at the time. diff --git a/source/code/ReadKeyboard.cpp b/source/code/ReadKeyboard.cpp index 736093a..ee806f5 100644 --- a/source/code/ReadKeyboard.cpp +++ b/source/code/ReadKeyboard.cpp @@ -37,9 +37,7 @@ int ReadKeyboard::CharsBeforeCursor() { return std::distance(text_string.begin(), position); } -ReadKeyboard::ReadKeyboard(const char* oldName) { - maxLength = 16; - text_string = oldName; +ReadKeyboard::ReadKeyboard(const char* oldName) : maxLength(16), text_string(oldName) { position = text_string.end(); } diff --git a/source/code/highscore.cpp b/source/code/highscore.cpp index 5a346f3..d12e685 100644 --- a/source/code/highscore.cpp +++ b/source/code/highscore.cpp @@ -50,9 +50,7 @@ bool record_sorter (const record& i,const record& j) { return (i.score > j.score); } -Highscore::Highscore(const std::string& type) { - this->type = type; - filename = type+".json.dat"; +Highscore::Highscore(const std::string& type) : filename(type+".json.dat"), type(type) { std::string readFileContent = sago::GetFileContent(filename.c_str()); if (readFileContent.length() > 0) { try {