Added the code that randomly makes a move