src/GameOfLife/Inputs/TemplateHandler/FieldsPlacer.php
/**
     * Checks whether a template is out of bounds.
     *
     * @param Board $_board The board on which the template will be placed
     * @param int $_templateWidth The template width
     * @param int $_templateHeight The template height
     * @param int $_posX The X-coordinate of the top left border of the template
     * @param int $_posY The Y-coordinate of the top left border of the template
     *
     * @return String|Bool The name of the border that is exceeded or false if the template is not out of bounds
     */
Checks whether a template is out of bounds.

@return String|Bool The name of the border that is exceeded or false if the template is not out of bounds
Checks whether a template is out of bounds . @return String|Bool The name of the border that is exceeded or false if the template is not out of bounds
public function isTemplateOutOfBounds(Board $_board, int $_templateWidth, int $_templateHeight, int $_posX, int $_posY)
    {
        if ($_posX < 0) return "left";
        if ($_posY < 0) return "top";
        if ($_posX + $_templateWidth > $_board->width()) return "right";
        if ($_posY + $_templateHeight > $_board->height()) return "bottom";
        else return false;
    }
public function isTemplateOutOfBounds ( Board $ _board , int $ _templateWidth , int $ _templateHeight , int $ _posX , int $ _posY ) { if ( $ _posX < 0 ) return " left " ; if ( $ _posY < 0 ) return " top " ; if ( $ _posX + $ _templateWidth > $ _board -> width ( ) ) return " right " ; if ( $ _posY + $ _templateHeight > $ _board -> height ( ) ) return " bottom " ; else return false ; }
Checks whether a template is out of bounds.
Checks whether a template is out of bounds .