Basic function considering how to represent the state of the board (using the default size of 6 rows and columns) whose turn is it should be, and then add the appropriate code to the Model. The Java and variables are initialized to represent the initial status of the game (blank board, player 1 no. 1) open the TextView. Java and completes the displayBoard method, consider how would you like to display pieces belonging to different players, and make sure that the board printing way is correct, you should have been able to run the program to check output, complete the makeMove method in the Model. The Java, turn to the Controller. The Java and use the view and Model provide ways to implement process of the game, there are some code implies that the Model and view should be how to communicate, you will need to rearrange and added to this, until the two players take turns to play their own game, must be updated after each mobile Model, and you must print out the new status of the board, when the board is full or any one of the players throw in the towel, the game should be over, to deal with input to allow players to give up there are different ways to different ways of whose turn it was to ensure that users know, and add all the missing functionality to finishing the game, test it, and make sure you modify some might make the game crash invalid input,
Other functions
Allows the user to start a new game after the game, asked whether the players want to play again, you need to reset the game state and rub board, variable game set at the beginning of a new game, you can enter the required board size (number of rows and columns), you should also be able to choose how much to win consecutive innings to win the game, so you can play ConnectX, ensure that can win the game, the enhanced input validation since the gameplay is variable, then the validation must be very careful when user input, the input should not make the game crash or invalid action, automatically win detection when writing code to detect the game players and declared victory,
Do not use any functional language constructs such as lambda or flow,
Do not use any collection classes, such as a list or map,
Do not use any third-party libraries,
Keep the all the classes in the default package, namely no package, (very important)
Request code files baidu cloud link: https://pan.baidu.com/s/1E0BTPhvjCYlqff1SeCirMg extracted code: 1210
Thank you for your bosses
CodePudding user response:
CodePudding user response:
Put aside the stem what, I don't write homework??????CodePudding user response:
, I am a self-taught please understand that, if you can help to write the code I appreciate help me to understand the course content, self-study programming itself is not easy, hope bosses understand