basic ai functionality added to play against the computer