4 ms·
It makes more sense you keep only the files you need, I do not understand how exactly the author should bundle this OOP using algorithms in 1 source file that w
by simion314 7y ago
It makes more sense you keep only the files you need, I do not understand how exactly the author should bundle this OOP using algorithms in 1 source file that will satisfy everyone requirements and at the same time won't contain some code you won't use.
- ainiriand 7y agoThat is kind of what I am doing myself, still learning some concepts so the code is not very reliable but merely educational. https://github.com/sh4ka/coding-exercises https://github.com/sh4ka/coding-exercises
- xellisx 7y agoOne class per file and mybe some namespacing would be nice to see.
- simion314 7y agoI just had a quick look, some observations if you don't mind, - use a good linter and fix all warnings you get from it if possible - use code formatting so all your code has the same formatting - you put the isDead function in the Piece class and pass the board object, IMO it makes more sense to put it in the Board class or even better make a Game/Puzzle class , then you can reuse the Board and Piece unchanged when you implement different rules but the board and pieces are the same.
- ainiriand 7y agoNice, thanks for the hints.