Creating a smarter opponent, refactored cell.js