edward@ukecc.UUCP (Edward C. Bennett) (07/14/85)
In the recent Othello game that was posted there is one major problem. Originally the board is formed of chars. To distinguish pieces, squares are set to 1 for white, -1 for black. The problem is that a char can't hold -1. (Sometimes they can, it depends how your machine handles sign extension) To be technically correct, change line 9 of reversi.h to: typedef int boardT[SIZE+2][SIZE+2]; There are also some char-to-int changes to be made in move.c and score.c. In several functions there are some register chars defined. Make them register ints. -- Edward C. Bennett UUCP: ihnp4!cbosgd!ukma!ukecc!edward /* A charter member of the Scooter bunch */
chris@umcp-cs.UUCP (Chris Torek) (07/21/85)
Or you can use char foo; . . . if (foo == (char) -1) to check for ``-1'' in chars. (4.2BSD "lint" didn't like this, though, for some reason.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland