Implementing tic-tac-toe using javascript libraries p5.js , react. Will also write in pure javascript