Re:PHPAlgorithms – PHP algorithm and data structure library
by simion314 on Saturday September 28, 2019 @12:23PM
(#21101223)
I 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.
https://github.com/sh4ka/coding-exercises