First, let’s introduce the simple rules of playing Go: the black and white sides alternately place their stones, and the one who occupies the most intersections on the board wins. At the same time, "fighting" may occur between the two sides in order to compete for territory. The number of empty intersections in contact around a chess piece is called "qi". If the qi around one or more chess pieces are blocked by the opponent, the qi number = 0, then these pieces are called dead chess pieces and need to be removed from the chessboard.
1. We plan to display the chessboard on the left side of the interface, and the functional area on the right side.
2. The chessboard is composed of 19 horizontal lines, 19 vertical lines, and 9 star symbols. In order to easily find the position on the chessboard, we may need to add coordinates around the chessboard. For now, let's just add coordinates to the left and top. The right and lower positions remain there.
In order to reuse code and start developing the interface control function of the Go program, we considered using the MVC architecture to make a small modification to the previous program, so as to facilitate the expansion of functions.
It is necessary to introduce several enumerations and helper classes to create Model and Controller objects. Then in the constructor of the Controller, the initialization action of the View will be performed and the generated UserControl object will be assigned to Application.Current.RootVisual to display the View. purpose
Expand