Added AI placement and guessing. User input checked for validity.