This is the mini version of the typical reversi game. In this program, we use two sets of two-dimensional arrays (4x4)and declare them as Boolean , one represent the white pieces and the other one represent the black pieces. If a white piece or a black piece occupies a square, the variable becomes true , otherwise it is false.
By using this concept, the program can check how many white and black pieces appear on the reversi board and which positions they occupy. we use If...Then and Select Case.... End Select statements to check for conditions whether a white piece or a black piece can be put in a certain position so that the pieces trapped in between will change colour. We also added a procedure to display the number of white pieces and the number of black pieces at any one time and also who is the winner.
To design the interface, we need to insert an image control and then copy and paste the image repeatedly to form a 4x4 array of images. Each image is defined by its index. For example, Image1(0) is the first image Image1(1) is the second image, Image1(2) is the third image and so on. The positions of the images are shown in the diagram below:
- See more at: http://www.vbtutor.net/vb_sample/reversi.htm#sthash.NqNTGL9K.dpuf