function tictactoeboard(board)
  rows = size(board,1);
  cols = size(board,2);
  for i=1:rows
      for j=1:cols
          x = (50+[0 100 100 0])+(i-1)*100;
          y = (50+[0 0 100 100])+(j-1)*100;
          z = zeros(1,4);
          if mod(i+3*j,2) == 0
              patch(x,y,z,'FaceColor','black');
          else
              patch(x,y,z,'FaceColor','white');
          end
      end
  end
  
end