cmneal26 / Tech-Writing-Project

Class repository
2 stars 1 forks source link

function getDumbComputerMove(board) #48

Closed ghost closed 2 years ago

ghost commented 2 years ago

We now know what the data structure for our game board is. We're going with a string representation of a Snakes and Mongooses board.


const emptyBoard = "---------" // each hyphen represents a square on the board
const topLeftSquare = emptyBoard.charAt(0) // a snake or mongoose can go here  

Why are we using the string representation?

We use the string board for a clever Snakes and Mongooses opponent, since that's what we get back from the TTT api (we call this to get the clever move). And this made our implementation of the game around that board pretty simple.

ghost commented 2 years ago

@cmneal26 We can talk about this one on Tuesday night.

ghost commented 2 years ago

@cmneal26 Complete this sub-function to prepare for this current issue: https://replit.com/@ingrey/Practice1-getEmptySquaresboard

If you want a suggested direction to complete this, or some perspective, let me know.

ghost commented 2 years ago

changing gears a bit, to make sure there's a enough time for the analyte module. Don't worry about these javascript stuff. If you want to learn more, feel free to let me know, and we can set something up later. If not, that's fine, too.