NDS203 - Networking And Database Systems Assignment

Download Solution Order New Solution

Assignment Task

Learning Outcomes

The Subject Learning Outcomes demonstrated by successful completion of the task below include:

a) Implementserver/client communication techniques.

b) Apply database querying and manipulation techniques.

Task

This final assignment will help bring your database and networking knowledge together into a working integrated project. The overall goal is to build a client server tic-tac-toe game, with chat features and a database to keep track of client details.

Context

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.

Instructions

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.

ID Username 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.

This IT and Computer Science has been solved by our PhD Experts at My Uni Paper. Our Assignment Writing Experts are efficient in providing a fresh solution to this question. We are serving more than 10000+ Students in Australia, the UK, and the US by helping them to score HD in their academics. Our Experts are well-trained to follow all marking rubrics and referencing styles.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.