Skip to main content
Code Review

Return to Question

added 182 characters in body
Source Link

Edit: I will respond to both commentaries in this edit, thanks you both for the time spend to respond.
So, I managed to move almost all includes in the .cpp files, rearranged the methods and members in classes (pub, prot, priv), modified const& int in int, used const wherever I could, deleted the copy constructor and other destructors that I didn't need, gave better names to the variables, used namespace instead of some classes that had only static methods, made better comments. I didn't modify the prefix for members, because it seemed harder to read the code, and I tried to use namespace on every class but than I modified back without namespace because don't know how to get rid of x::x::A(); and it makes the lines so long and hard to read, tried to don't use namespace std; anywhere, I used it only in one file .cpp out of 15files. Replaced every array with a std::vector, managed to get rid of the try catch block. In Difficulty.cpp I had int& counterNumberOfTilesPlayed; because I change this value in the function. Besides that I had before on every function const type&.
I will get rid of the namespace std; totally and try to find a way to use namespace tomorrow I think. Besides that I did everyother observations. I don't know if I should add the code again in this thread, I updated the github and all the changes can be seen in the link above.
Edit 2: @Sandro4912 managed to do the last advice you gave me that I didn't do last night and wrapped all functions and classes into a namespace, stopped using namespace std; [1]: /q/216333 [2]: https://github.com/FirescuOvidiu/Tetris-game-for-Windows

Edit: I will respond to both commentaries in this edit, thanks you both for the time spend to respond.
So, I managed to move almost all includes in the .cpp files, rearranged the methods and members in classes (pub, prot, priv), modified const& int in int, used const wherever I could, deleted the copy constructor and other destructors that I didn't need, gave better names to the variables, used namespace instead of some classes that had only static methods, made better comments. I didn't modify the prefix for members, because it seemed harder to read the code, and I tried to use namespace on every class but than I modified back without namespace because don't know how to get rid of x::x::A(); and it makes the lines so long and hard to read, tried to don't use namespace std; anywhere, I used it only in one file .cpp out of 15files. Replaced every array with a std::vector, managed to get rid of the try catch block. In Difficulty.cpp I had int& counterNumberOfTilesPlayed; because I change this value in the function. Besides that I had before on every function const type&.
I will get rid of the namespace std; totally and try to find a way to use namespace tomorrow I think. Besides that I did everyother observations. I don't know if I should add the code again in this thread, I updated the github and all the changes can be seen in the link above. [1]: /q/216333 [2]: https://github.com/FirescuOvidiu/Tetris-game-for-Windows

Edit: I will respond to both commentaries in this edit, thanks you both for the time spend to respond.
So, I managed to move almost all includes in the .cpp files, rearranged the methods and members in classes (pub, prot, priv), modified const& int in int, used const wherever I could, deleted the copy constructor and other destructors that I didn't need, gave better names to the variables, used namespace instead of some classes that had only static methods, made better comments. I didn't modify the prefix for members, because it seemed harder to read the code, and I tried to use namespace on every class but than I modified back without namespace because don't know how to get rid of x::x::A(); and it makes the lines so long and hard to read, tried to don't use namespace std; anywhere, I used it only in one file .cpp out of 15files. Replaced every array with a std::vector, managed to get rid of the try catch block. In Difficulty.cpp I had int& counterNumberOfTilesPlayed; because I change this value in the function. Besides that I had before on every function const type&.
I will get rid of the namespace std; totally and try to find a way to use namespace tomorrow I think. Besides that I did everyother observations. I don't know if I should add the code again in this thread, I updated the github and all the changes can be seen in the link above.
Edit 2: @Sandro4912 managed to do the last advice you gave me that I didn't do last night and wrapped all functions and classes into a namespace, stopped using namespace std; [1]: /q/216333 [2]: https://github.com/FirescuOvidiu/Tetris-game-for-Windows

added 5 characters in body
Source Link

Edit: I will respond to both commentaries in this edit, thanks you both for the time spend to respond.
So, I managed to move almost all includes in the .cpp files, rearranged the methods and members in classes (pub, prot, priv), modified const& int in int, used const wherever I could, deleted the copy constructor and other destructors that I didn't need, gave better names to the variables, used namespace instead of some classes that had only static methods, made better comments. I didn't modify the prefix for members, because it seemed harder to read the code, and I tried to use namespace on every class but than I modified back without namespace because don't know how to get rid of x::x::A(); and it makes the lines so long and hard to read, tried to don't use namespace std; anywhere, I used it only in one file .cpp out of 15files. Replaced every array with a std::vector, managed to get rid of the try catch block. In Difficulty.cpp I had int& counterNumberOfTilesPlayed; because I change this value in the function. Besides that I had before on every function const type&.
I will get rid of the namespace std; totally and try to find a way to use namespace tomorrow I think. Besides that I did everyother observations. I don't know if I should add the code again in this thread, I updated the github and all the changes can be seen in the link above. [1]: /q/216333 [2]: https://github.com/FirescuOvidiu/Tetris-game-for-Windows

Edit: I will respond to both commentaries in this edit, thanks you both for the time spend to respond.
So, I managed to move almost all includes in the .cpp files, rearranged the methods and members in classes (pub, prot, priv), modified const& int in int, used const wherever I could, deleted the copy constructor and other destructors that I didn't need, gave better names to the variables, used namespace instead of some classes that had only static methods, made better comments. I didn't modify the prefix for members, because it seemed harder to read the code, and I tried to use namespace on every class but than I modified back without namespace because don't know how to get rid of x::x::A(); and it makes the lines so long and hard to read, tried to don't use namespace anywhere, I used it only in one file .cpp out of 15files. Replaced every array with a std::vector, managed to get rid of the try catch block. In Difficulty.cpp I had int& counterNumberOfTilesPlayed; because I change this value in the function. Besides that I had before on every function const type&.
I will get rid of the namespace totally and try to find a way to use namespace tomorrow I think. Besides that I did everyother observations. I don't know if I should add the code again in this thread, I updated the github and all the changes can be seen in the link above. [1]: /q/216333 [2]: https://github.com/FirescuOvidiu/Tetris-game-for-Windows

Edit: I will respond to both commentaries in this edit, thanks you both for the time spend to respond.
So, I managed to move almost all includes in the .cpp files, rearranged the methods and members in classes (pub, prot, priv), modified const& int in int, used const wherever I could, deleted the copy constructor and other destructors that I didn't need, gave better names to the variables, used namespace instead of some classes that had only static methods, made better comments. I didn't modify the prefix for members, because it seemed harder to read the code, and I tried to use namespace on every class but than I modified back without namespace because don't know how to get rid of x::x::A(); and it makes the lines so long and hard to read, tried to don't use namespace std; anywhere, I used it only in one file .cpp out of 15files. Replaced every array with a std::vector, managed to get rid of the try catch block. In Difficulty.cpp I had int& counterNumberOfTilesPlayed; because I change this value in the function. Besides that I had before on every function const type&.
I will get rid of the namespace std; totally and try to find a way to use namespace tomorrow I think. Besides that I did everyother observations. I don't know if I should add the code again in this thread, I updated the github and all the changes can be seen in the link above. [1]: /q/216333 [2]: https://github.com/FirescuOvidiu/Tetris-game-for-Windows

added 1374 characters in body
Source Link

About a month ago I made a Tetris game for Windows. After a helpful review [helpful review][1], I improved the code. I want to hear again an opinion about the implementation, how readable the code is, new mistakes or anything that will improve the quality of the code. ###Action.h

The code is also available: [Github Tetris game][2]

Edit: I will respond to both commentaries in this edit, thanks you both for the time spend to respond.
So, I managed to move almost all includes in the .cpp files, rearranged the methods and members in classes (pub, prot, priv), modified const& int in int, used const wherever I could, deleted the copy constructor and other destructors that I didn't need, gave better names to the variables, used namespace instead of some classes that had only static methods, made better comments. I didn't modify the prefix for members, because it seemed harder to read the code, and I tried to use namespace on every class but than I modified back without namespace because don't know how to get rid of x::x::A(); and it makes the lines so long and hard to read, tried to don't use namespace anywhere, I used it only in one file .cpp out of 15files. Replaced every array with a std::vector, managed to get rid of the try catch block. In Difficulty.cpp I had int& counterNumberOfTilesPlayed; because I change this value in the function. Besides that I had before on every function const type&.
I will get rid of the namespace totally and try to find a way to use namespace tomorrow I think. Besides that I did everyother observations. I don't know if I should add the code again in this thread, I updated the github and all the changes can be seen in the link above. [1]: /q/216333 [2]: Github Tetris gamehttps://github.com/FirescuOvidiu/Tetris-game-for-Windows

About a month ago I made a Tetris game for Windows. After a helpful review, I improved the code. I want to hear again an opinion about the implementation, how readable the code is, new mistakes or anything that will improve the quality of the code. ###Action.h

The code is also available: Github Tetris game

About a month ago I made a Tetris game for Windows. After a [helpful review][1], I improved the code. I want to hear again an opinion about the implementation, how readable the code is, new mistakes or anything that will improve the quality of the code. ###Action.h

The code is also available: [Github Tetris game][2]

Edit: I will respond to both commentaries in this edit, thanks you both for the time spend to respond.
So, I managed to move almost all includes in the .cpp files, rearranged the methods and members in classes (pub, prot, priv), modified const& int in int, used const wherever I could, deleted the copy constructor and other destructors that I didn't need, gave better names to the variables, used namespace instead of some classes that had only static methods, made better comments. I didn't modify the prefix for members, because it seemed harder to read the code, and I tried to use namespace on every class but than I modified back without namespace because don't know how to get rid of x::x::A(); and it makes the lines so long and hard to read, tried to don't use namespace anywhere, I used it only in one file .cpp out of 15files. Replaced every array with a std::vector, managed to get rid of the try catch block. In Difficulty.cpp I had int& counterNumberOfTilesPlayed; because I change this value in the function. Besides that I had before on every function const type&.
I will get rid of the namespace totally and try to find a way to use namespace tomorrow I think. Besides that I did everyother observations. I don't know if I should add the code again in this thread, I updated the github and all the changes can be seen in the link above. [1]: /q/216333 [2]: https://github.com/FirescuOvidiu/Tetris-game-for-Windows

added 3 characters in body
Source Link
Loading
Post Reopened by dfhwze, AlexV, Toby Speight, Stephen Rauch, Sᴀᴍ Onᴇᴌᴀ
Tidy the description
Source Link
Toby Speight
  • 87.3k
  • 14
  • 104
  • 322
Loading
added 16467 characters in body
Source Link
Loading
Post Closed as "Not suitable for this site" by Edward, Community Bot, dfhwze, t3chb0t, Toby Speight
Source Link
Loading
lang-cpp

AltStyle によって変換されたページ (->オリジナル) /