Added support for more game modes

Changed border generation to be modular depending on size of grid.