Code Explanation continued

96. def getComputerMove(board, computerLetter) 97. Given a board and the computer's letter, determine where to move and return that move. The None function is where our AI will be coded. The parameters are a Tic Tac Toe board (in the Doard parameter) and which letter the computer is (either 'X' or 'O'). The first few lines simply assign the other letter to a variable named None. This lets us use the same code, no matter who is X and who is O. This function will return the integer that...

Brute Force

However, while this cipher may fool some people who don't understand cryptography, it won't keep a message secret from someone who knows cryptanalysis. While cryptography is the science of making codes, cryptanalysis is the study of breaking codes. Do you wish to encrypt or decrypt a message encrypt The door key will be hidden under the mat until the fourth of July. Bpm lwwz smg eqtt jm pqllmv cvlmz bpm uib cvbqt bpm nwczbp wn Rctg. The whole point of...

Coordinate System of a Computer Monitor

It is common that computer monitors use a coordinate system that has the origin 0, 0 at the top left corner of the screen, which increases going down and to the right. There are no negative coordinates. This is because text is printed starting at the top left, and is printed going to the right and downwards. Most computer graphics use this coordinate system, and we will use it in our games. Also it is common to assume that monitors can display 80 text characters per row and 25 text characters...