Othello Discussion

When the idea of creating an Othello game on Matlab was first introduced, some of the group was not too sure about it because we had never heard of or played the game, but two members had heard about and played it and they were fully confident in their abilities to create the game and teach us what the game is and how to play along the way. In order for the game to exist, there must be a board, so an array was created that was eight by eight with two one’s in the center and two two’s also in the center that were in a square, with the matching numbers diagonal to each other. Two players are necessary to play this game, or just one person controlling the inputs of both player 1 and player 2. To begin building the code, the first thing to do was create the array for the board. The next thing that had to be done was to have the program automatically fill in the middle four spaces of the board with two spaces for each player. The next step of the code is to ask a player for their input, requesting an x coordinate and then the y coordinate. The first time the game was tested, it became apparent that the program was not successfully having the team with more of the board filled win, so that portion of the code had to be tweaked. After that the testing went relatively smooth, there were multiple people that tested the game, and all tests succeeded once that tweak was complete.

User Manual Othello

To begin playing Othello, the code must be ran in Matlab. The game will create a board for the game that is 8×8 with the center four spaces already filled with two spaces for each player, with spaces of the same number being diagonal to each other. The game will then prompt player two for their first input, which will be an x coordinate, then it will ask for a y coordinate. Once the player has given the program an input, the program will test if the input given is on the board, if it is on the board it will test if it is adjacent to another space that is already filled, as all moves must be made on adjacent spaces to a filled one, then it will test if it is a space that has already been taken, if the input from the player is either on a filled space, in a non adjacent space, or off the board the program will request another input until the player gives a valid input. The program will then take the valid input and place it on the board and test if there are any opposing player spaces between that new space and any other friendly space in the same row or column, and if there is, they will be switched to the same number as the player who just made the move. After the first player makes their move, the program will prompt the other player for their move, and run through the same tests. Once the game has gone back and forth until the entire board is filled, the program adds up how many of each number appears on the board, and the player with the most of the board with their number wins, and the program prints out the winner.