Java代写 | CSCI 3171 Network Computing Summer 2020

本次Java代写是使用TCP套接字完成一个剪刀石头布的在线游戏

CSCI 3171 Network Computing Summer 2020
Assignment 3 [20 marks]
you will write simple client-server application(s) in which the client acts as Player 1 and the server
acts as Player 2. The protocol between the client and server should be as follows:
• The server program is started on a user-defined port.
• The client program is started and connects to the server using the server IP and port
number provided on the command line.
• The client asks the user for input. The input may either be R (for Rock), P (for Paper) or S
(for Scissors). Any other input should result in an error message, asking the user to try
again.
• The user’s input is sent to the server via the connected socket.
• The server (acting as Player 2) must decide on any one of R, P or S. How the server decides
is completely up to you. For a fair game for example, you may use a random approach to
decide between choosing R, P or S for the server.
• The server reads the user’s input from the client socket, evaluates the outcome (Player 1
wins, Player 2 wins or a tied game), displays each players’ choice and result of the game,
and also sends this information (i.e. Client’s choice, Server’s choice and the result of the
game) back to the client.
Dalhousie University
Faculty of Computer Science
Image Ref: Enzoklop [CC BY-SA 3.0], from
Wikimedia Commons
• The client should display the server’s reply (i.e. Client’s choice, Server’s choice and the
result of the game) to the user.
• The client should give the user an option to try again or quit.


程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: [email protected]  微信:itcsdx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

发表评论