refac of showBoard and isAllowedMove function
introduced some type aliases + refactored rows function