This networked Tic Tac Toe game project will test your networking and database management knowledge. The...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
This networked Tic Tac Toe game project will test your networking and database management knowledge. The server will maintain a database of users to keep track of their login details and scores in tic tac toe. The server will keep track of each clients state and sync the tic tac toe gameboard across all clients. Up until this point we have worked directly with the database using a database management system software and running SQL commands, but this time we will need to work with code to communicate with the database locally to run these commands. Many programs, games and websites maintain a database on the server side. Managing a game across a network and keeping a database up to date can be difficult and will allow you to demonstrate a strong understanding of networking and database systems in a production environment. This assessment extends on the previous chat program. We will be adding new features and include a database on the server side. Finally, we will manage online games of Tic-Tac-Toe between chat participants. For the database functionality we will use SQLite as it is lightweight and does not need database management software to run. Step 1 To include SQLite into your project, we will need to use the Nuget Package Manager to install it into your project. Right click your project in the solution explorer and choose "Manage Nuget Packages". Next search for System.Data.SQLite.Core and install it. Add using System.Data.SQLite; to the top of any of your C# files to see if it worked correctly. Step 2 If the user decides to host a server, open a database connection and create a Users table if it does not exist. It should have these columns. Username ID Password Wins Losses Draws Step 3 You need to keep track of what state a client is in, as there are more states needed now. The server should keep track of each clients state. The client keeps track of its own state and changes it based on messages received from the server. The states a client can be: Login Chatting Playing When a client connects to the server they are in the login state. During that state, the client can either register a new username and password or login with existing credentials. If either work, then the client is progressed to chatting phase. In the chat state, if the user types !join and there is a free spot in the Tic-Tac-Toe game, then the server will send a message back to the user letting them know they are player 1 or 2 e.g !player1 or !player2. This will progress the clients state to playing and they should store locally what player they are. Step 4 The server will inform a player when it is their turn to make a move. When it is the clients turn, they will be allowed to use the Tic-Tac-Toe board. When they make a move, the move information needs to be sent to the server. The server updates its own board and broadcasts the boards state to all clients. Step 5 When the game of Tic-Tac-Toe is over(win/lose/draw) then the server should update the players scores in the database, inform the players of the results and server lets players know to return to the chatting state. Step 6 A new chat command !scores should be added that outputs all scores in the database to the asking client. Sort the scores from highest to lowest. Referencing It is essential that you use appropriate APA style for citing and referencing research. Please see more information on referencing here https://library.torrens.edu.au/academicskills/apa/tool Submission Instructions Zip all projects, related files and any instructional readme.txt files for submission. Name this zip file using this format: NDS203 [your name] [studentID]_Assignment3.zip Submit this task via the Assessment link in the main navigation menu in NDS203 Networking and Database Systems. The Learning Facilitator will provide feedback via the Grade Centre in the LMS portal. Feedback can be viewed in My Grades. Before you submit your assessment, please ensure you have read and understand the conditions outlined in the Academic Integrity Code Handbook. If you are unsure about anything in the Handbook, please reach out to your Learning Facilitator. Academic Integrity Declaration I declare that except where I have referenced, the work I am submitting for this assessment task is my own work. I have read and am aware of Torrens University Australia Academic Integrity Policy and Procedure viewable online at http://www.torrens.edu.au/policies-and-forms This networked Tic Tac Toe game project will test your networking and database management knowledge. The server will maintain a database of users to keep track of their login details and scores in tic tac toe. The server will keep track of each clients state and sync the tic tac toe gameboard across all clients. Up until this point we have worked directly with the database using a database management system software and running SQL commands, but this time we will need to work with code to communicate with the database locally to run these commands. Many programs, games and websites maintain a database on the server side. Managing a game across a network and keeping a database up to date can be difficult and will allow you to demonstrate a strong understanding of networking and database systems in a production environment. This assessment extends on the previous chat program. We will be adding new features and include a database on the server side. Finally, we will manage online games of Tic-Tac-Toe between chat participants. For the database functionality we will use SQLite as it is lightweight and does not need database management software to run. Step 1 To include SQLite into your project, we will need to use the Nuget Package Manager to install it into your project. Right click your project in the solution explorer and choose "Manage Nuget Packages". Next search for System.Data.SQLite.Core and install it. Add using System.Data.SQLite; to the top of any of your C# files to see if it worked correctly. Step 2 If the user decides to host a server, open a database connection and create a Users table if it does not exist. It should have these columns. Username ID Password Wins Losses Draws Step 3 You need to keep track of what state a client is in, as there are more states needed now. The server should keep track of each clients state. The client keeps track of its own state and changes it based on messages received from the server. The states a client can be: Login Chatting Playing When a client connects to the server they are in the login state. During that state, the client can either register a new username and password or login with existing credentials. If either work, then the client is progressed to chatting phase. In the chat state, if the user types !join and there is a free spot in the Tic-Tac-Toe game, then the server will send a message back to the user letting them know they are player 1 or 2 e.g !player1 or !player2. This will progress the clients state to playing and they should store locally what player they are. Step 4 The server will inform a player when it is their turn to make a move. When it is the clients turn, they will be allowed to use the Tic-Tac-Toe board. When they make a move, the move information needs to be sent to the server. The server updates its own board and broadcasts the boards state to all clients. Step 5 When the game of Tic-Tac-Toe is over(win/lose/draw) then the server should update the players scores in the database, inform the players of the results and server lets players know to return to the chatting state. Step 6 A new chat command !scores should be added that outputs all scores in the database to the asking client. Sort the scores from highest to lowest. Referencing It is essential that you use appropriate APA style for citing and referencing research. Please see more information on referencing here https://library.torrens.edu.au/academicskills/apa/tool Submission Instructions Zip all projects, related files and any instructional readme.txt files for submission. Name this zip file using this format: NDS203 [your name] [studentID]_Assignment3.zip Submit this task via the Assessment link in the main navigation menu in NDS203 Networking and Database Systems. The Learning Facilitator will provide feedback via the Grade Centre in the LMS portal. Feedback can be viewed in My Grades. Before you submit your assessment, please ensure you have read and understand the conditions outlined in the Academic Integrity Code Handbook. If you are unsure about anything in the Handbook, please reach out to your Learning Facilitator. Academic Integrity Declaration I declare that except where I have referenced, the work I am submitting for this assessment task is my own work. I have read and am aware of Torrens University Australia Academic Integrity Policy and Procedure viewable online at http://www.torrens.edu.au/policies-and-forms
Expert Answer:
Related Book For
Posted Date:
Students also viewed these computer network questions
-
How does lean production enable organizations to better respond to disruptions and changes in the marketplace?
-
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...
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
Limits from graph In this problem we evaluate limits from the graph. Consider the graph of f given in [Figure 1]. Evaluate each of the following limits (or explain why if the limit does not exist)....
-
The nuclide 198Au, with a half-life of 2.70 d, is used in cancer therapy. What mass of this nuclide is required to produce an activity of 250 Ci?
-
Let G = (V, E) be a loop-free connected undirected graph with v V. (b) If v is an articulation point of G, prove that v cannot be an articulation point of . G- v = G - v.
-
In September 2022, Hurricane Ian ravaged southwestern Florida, causing more than 60 deaths and $100 billion in damage. The storm destroyed more than 5,000 homes and other buildings and washed away...
-
Camco Manufacturers Inc., a publicly listed company, has two machines that are accounted for under the revaluation model. Technology in Camco's industry is fast-changing, causing the fair value of...
-
Part A A string that is 9.6 m long is tied between two posts and plucked. The string produces a wave that has a frequency of 320 Hz and travels with a speed of 192 m/s. How many full wavelengths of...
-
The Ploughman family owns and operates a 640-acre farm that has been in the family for several generations. The Ploughmans always have had to work hard to make a decent living from the farm and have...
-
5. An investor's liabilities are given by two lump payments of 3,000 at the end of the first and second years. Two Zero Coupon Bonds (ZCB) each with face value 100 are available on the market; one...
-
How will you represent a linear and circular linked list in a graphical view?
-
What is the state of the stack after the following sequence of pushes and pops? Stack s; 3 ); s.push( s.push ( 5 ); 2); 15 ); 42 ) ; s.push( s.push( s.push( s.pop (); s.pop (); s.push ( 14 ); s.push...
-
What would improve the way disagreements or complaints are handled?
-
Write C code for displaying all data members of singly linear linked list in reverse manner.
-
What are the disadvantages of representing a stack or queue by a linked list?
-
In Exercises 139-160, completely factor the expression. 140. 12x - 48 142. x - 9x 144. 2y3 - 7y2 - 15y 139. 6x - 54 141. x - 4x 143. 2x + 4x - 2x 145. 3x + x + 15x + 5 146. 13x + 6 + 5x 147. x + x -...
-
If the joint cost function for two products is C(x, y) = xy2 + 1 dollars (a) Find the marginal cost (function) with respect to x. (b) Find the marginal cost with respect to y.
-
A String variable name is a ____________. a. Literal b. Value c. Constant d. Reference
-
Write an application that determines whether a phrase entered by the user is a palindrome. A palindrome is a phrase that reads the same backward and forward without regarding capitalization or...
-
Parent classes are ____________ than their child classes. a. Less specific b. More specific c. Easier to understand d. More cryptic
-
Design second-order lowpass and highpass blocks, and combine them in cascade, to form a bandpass filter with passband \(0.3 \leq \omega \leq 0.4\), where \(\omega_{\mathrm{s}}=1\). Plot the resulting...
-
Plot the pole-zero constellation as well as the magnitude response of the transfer function of Exercise 4.20 for \(M=6,7,8\) and comment on the results. Exercise 4.20 Some FIR filters present a...
-
Design a second-order notch filter capable of eliminating a \(10 \mathrm{~Hz}\) sinusoidal component when \(\omega_{\mathrm{s}}=200 \mathrm{rad} / \mathrm{sample}\) and show the resulting magnitude...
Study smarter with the SolutionInn App