Implemented board functions in all directions.