I know that if I want to construct a player in the match, I need to send the message"(init TeamName[(version VerNum)]) to the server, then I can see a player in the center. What I want to ask is that if I want to construct a team, 11 players, should I send this message for 11 times? and if I want to construct a opponent team, should I type 11 times more?
The second question is that when the player is constructed in the center, he starts moving immediately, what should I set so that he can only move after I press kick-off?
Thank you.
Regards,
Hang
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1 program (process) represents 1 player. you should invoke your client 11 times, each of them sends inital message independantly. Then, server will assign ID(uniform number) for each player, in reply mesage.
null-terminated might means that your string message should be terminated by '\0' like c-style string.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear all,
I know that if I want to construct a player in the match, I need to send the message"(init TeamName[(version VerNum)]) to the server, then I can see a player in the center. What I want to ask is that if I want to construct a team, 11 players, should I send this message for 11 times? and if I want to construct a opponent team, should I type 11 times more?
The second question is that when the player is constructed in the center, he starts moving immediately, what should I set so that he can only move after I press kick-off?
Thank you.
Regards,
Hang
1 program (process) represents 1 player. you should invoke your client 11 times, each of them sends inital message independantly. Then, server will assign ID(uniform number) for each player, in reply mesage.
null-terminated might means that your string message should be terminated by '\0' like c-style string.
Have a further explanation for the above question:
I send the message "(init TeamName[(version VerNum)])" to the server in player.java, should I make 11 objects from this class? For example:
Player[] player = new player[11];
for i = 0-10
player[i] = .........
player[i].start();
where start() is executed, the init message will be sent to the server.
is it correct to write this?
Also, I print the received message from the server, I see that some of the messages are "warning message_not_null_terminated", what is the meaning?
Thank you.
Regards,
Hang