Abstracted each sqaure's hint mapping into separate function