There are some inconsistencies in the Board.hpp file that needs to be addressed. This issue will track the patches and changes that need to be made to the file.
Inconsistencies
Various methods have inconsistent strict type definitions. For example Board::get method is int when it can and should be bool. Board::clearLines returns int while empty_cells returns u32. These should be made consistent.
Various methods have inconsistent naming conventions. For example Board::clearLines should be Board::clear_lines to be consistent with other methods.
Board::not_empty method has a parameter height that is not used. This should be removed.
It is unclear what certain functions do, and the naming is unclear and imprecise. For example, Board::is_empty vs Board::not_empty. Another example is
Board::bounded and Board::full. These should be renamed to be more descriptive.
There are some inconsistencies in the Board.hpp file that needs to be addressed. This issue will track the patches and changes that need to be made to the file.
Inconsistencies
Board::get
method is int when it can and should be bool.Board::clearLines
returns int while empty_cells returns u32. These should be made consistent.Board::clearLines
should beBoard::clear_lines
to be consistent with other methods.Board::not_empty
method has a parameterheight
that is not used. This should be removed.Board::is_empty
vsBoard::not_empty
. Another example isBoard::bounded
andBoard::full
. These should be renamed to be more descriptive.Relevant code snippets:
Inconsistencies
https://github.com/shakkar23/ShakTrisLib/blob/8a617d10342cd50a129b240ac8848bac9c5aeab0/src/engine/Board.hpp#L30C5-L32C6
https://github.com/shakkar23/ShakTrisLib/blob/8a617d10342cd50a129b240ac8848bac9c5aeab0/src/engine/Board.hpp#L56C1-L75C6
https://github.com/shakkar23/ShakTrisLib/blob/8a617d10342cd50a129b240ac8848bac9c5aeab0/src/engine/Board.hpp#L170C1-L177C6
Unused height:
https://github.com/shakkar23/ShakTrisLib/blob/8a617d10342cd50a129b240ac8848bac9c5aeab0/src/engine/Board.hpp#L125C1-L135C1
What does this do?
https://github.com/shakkar23/ShakTrisLib/blob/8a617d10342cd50a129b240ac8848bac9c5aeab0/src/engine/Board.hpp#L88C1-L123C6