This program is really about to write bald. . .
Let's see the effect directly
Customize your avatar and name
Click the plus sign in the box to change your avatar, and
you can change your nickname in the text area. If you don’t change it, click the upper left corner to start the game and it will be automatically changed:
land
purchased and land purchased for a fee will be displayed in the list, and The payment information
when you go to someone else’s land will also be displayed in the box. When there is a player’s debt, the asset will be cleared and the debt will be displayed to exit the game. There is no land sale function yet.
Code display:
A total of 10 m files, monopoly_main is the main function, start the game by running this function,
and the diagram made by matlab:
Note: Regarding the problem of the left and right matrix size mismatch when you have purchased multiple real estate to upgrade a certain real estate, the
solution: change monopoly_main Near function line 113, owenerPos=owenerList(:,2)==n;
changed to:
owenerPos=owenerList(:,1)==self.(['player',num2str(n)]).pos;
This change is in the near future Make corrections in the download file (corrected)
Code extraction
monopoly extract link