Write a socket server program Rock PaperScissors Server and a client program to communicate with the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a socket server program Rock PaperScissors Server and a client program to communicate with the server. At first, the server will receive a name for the player (Client). Lets assume; 1 means Rock, 2means Paper and 3 means Scissors. Now, the server will receive any of these numbers (1,2,3) from the player, generate a random number between 1 to3 itself and apply the rules of Rock-Paper-Scissors game (Rock beats Scissors, Scissors beat Paper, Paper beats Rock and drawn if both are same). Then the server will tell the player if the player has won or the server (See the picture for reference). **Bonus marks for making the server in such a way that any time a player can leave and another player can join without terminating the server program. Output ▶>> Homework01 (run) x Homework01 (run) #2 x Client's move: 1 >>> Server: Dravn Oyon Won 우스 5 6 Client's move: 2 Server: Oyon Lost Drawn Client's move: | Output Type here to search La O Homework01 (run) #2 running Activate Windows Go to Settings to activate Windows. (1 more...) INS 8:42 PM 12/16/2021 73°F A 9:21 40) Deliverables: . The source code. • Screenshots for when a client has connected, the client is playing (take this screenshot after the client has played one or two turns). • Those who will attempt the bonus part will have to submit two additional screenshots of another client being connected (helpful if you have the message of previous player leaving). and the other client playing. Use a different player name. Write a socket server program Rock PaperScissors Server and a client program to communicate with the server. At first, the server will receive a name for the player (Client). Lets assume; 1 means Rock, 2means Paper and 3 means Scissors. Now, the server will receive any of these numbers (1,2,3) from the player, generate a random number between 1 to3 itself and apply the rules of Rock-Paper-Scissors game (Rock beats Scissors, Scissors beat Paper, Paper beats Rock and drawn if both are same). Then the server will tell the player if the player has won or the server (See the picture for reference). **Bonus marks for making the server in such a way that any time a player can leave and another player can join without terminating the server program. Output ▶>> Homework01 (run) x Homework01 (run) #2 x Client's move: 1 >>> Server: Dravn Oyon Won 우스 5 6 Client's move: 2 Server: Oyon Lost Drawn Client's move: | Output Type here to search La O Homework01 (run) #2 running Activate Windows Go to Settings to activate Windows. (1 more...) INS 8:42 PM 12/16/2021 73°F A 9:21 40) Deliverables: . The source code. • Screenshots for when a client has connected, the client is playing (take this screenshot after the client has played one or two turns). • Those who will attempt the bonus part will have to submit two additional screenshots of another client being connected (helpful if you have the message of previous player leaving). and the other client playing. Use a different player name.
Expert Answer:
Answer rating: 100% (QA)
Creating a complete RockPaperScissors server and client program is a bit involved so Ill provide you with a simplified Python example to get you start... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Question: Prepare the statement of cash flow using direct or indirect method. Sales Cost of Goods Sold Gross Profit Koala Tea Projected Income Statement 2023; 2024; 2025 2023 2024 P3,979,920...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
A process has an in-control fraction nonconforming of p = 0.01. The sample size is n = 300. What is the probability of detecting a shift to an out-of-control fraction nonconforming of p = 0.05 on the...
-
Karen purchased her personal auto two years ago from a local new car dealer. Since purchasing the car, she took it into the dealer for major warranty repairs five different times and minor repairs a...
-
Guess which brick-and-mortar retail business-that is, a business with a physical store-attracts the most customers to its Web site. Wal-Mart? Target? Best Buy? A recent study by Nielsen NetRatings...
-
Your grades from last semester are in the table. The grading system assigns points as follows: A = 4, B = 3, C = 2, D = 1, F = 0. Determine your grade point average (weighted mean). Final Grade...
-
Syracuse Beverages Inc. has three plants that make and bottle cola, lemon-lime, and miscellaneous flavored beverages, respectively. The raw materials, labor costs, and automated technology are...
-
1. $3,800+ ($8,000) =$ (-4,200) Netting of long term capital gains and losses ($2,400) + 2,000 + ($500) = $ (-900) Netting of short term capital gains and losses (-4,200) + (-900) = $(-5,100) Netting...
-
Prove the following analogs to Stein's Lemma, assuming appropriate conditions on the function g. (a) If X ~ gamma(α, β), then E(g(X)(X-aβ)= βE...
-
Determine Due Date and Interest on Notes Determine the due date and the amount of interest due at maturity on the following notes: Date of Note January 5 * b. February 15 * May 19 d. August 20...
-
Repeat Exercise Graphics P25.10, using a DTD for validation. Data from Exercise P25.10 Write a program that can read an XML document of the form: 5 10 20 30 5 10 25 40 Hello, World! 20 30 and show...
-
Implement a stack as a linked list in which the push, pop, and isEmpty methods can be safely accessed from multiple threads.
-
At a local hospital, a decision was made to downsize the nursing staff. The local television station sent a reporter and camera crew to interview the administra- tor regarding the impact of this...
-
The static getAvailableCurrencies method of the java.util.Currency class yields a set of Currency objects. Turn it into a stream and transform it into a stream of the currency display names. Print...
-
Paths can be absolute or relative. An absolute path name begins with a root element (/ on Unix-like systems, a drive letter on Windows). Look at the Path API to see how one can create and recognize...
-
Donald and Carolyn Windham have asked you to complete their 2022 US Federal Income Tax Return. They file jointly, and their address is 499 Hidden Oaks Drive in West Columbia, SC 29170. They are empty...
-
Discuss the information available from the following techniques in the analysis of inorganic pigments used in antique oil paintings: (i) Powder X-ray diffraction, (ii) Infrared and Raman...
-
The network of Fig. 5-34 uses RSVP with multicast trees for hosts 1 and 2 as shown. Suppose that host 3 requests a channel of bandwidth 2 MB/sec for a flow from host 1 and another channel of...
-
Find a 77-bit one-time pad that generates the text Hello World from the cipher text of Fig. 8-4. Figure 8-4 Message 1: Pad 1: Ciphertext: 1001001 0100000 1101100 1101111 1110110 1100101 0100000...
-
You are given a text file of size 60 MB, which is to be encrypted using steganography in the low-order bits of each color in an image file. What size image would be required in order to encrypt the...
-
Natural gas (methane) flows from a 3-in.-diameter gas main, through a 1-in.-diameter pipe, and into the burner of a furnace at a rate of \(100 \mathrm{ft}^{3} /\) hour. Determine the pressure in the...
-
SAE 30 oil at \(60^{\circ} \mathrm{F}\) flows through a 2-in.-diameter pipe with a mean velocity of \(5 \mathrm{ft} / \mathrm{s}\). Determine the value of the Reynolds number (see Example 1.4)....
-
Calculate the Reynolds numbers for the flow of water and for air through a 4-mm-diameter tube, if the mean velocity is \(3 \mathrm{~m} / \mathrm{s}\) and the temperature is \(30^{\circ} \mathrm{C}\)...
Study smarter with the SolutionInn App