turn array into object and fixed all function. board working without win logic