Support variable size boards
Fix curses mode