Implement the server in any programming language

Assignment Help Computer Engineering
Reference no: EM131471914

Assignment: Web based Cross and Naught (Tic-Tac-Toe)

Complete with usage and test report via Stream site

In this assignment you will implement the game of cross and naught to be played between a web client and a server using TCP/IP sockets. The client can be any web browser, however you will have to write code to implement the server in any programming language, which supports raw sockets. You may use the server code in the tutorial exercises as a starting point.

The outline of the play is as follows. First the server starts and listens on some chosen port number. Then, client connects to the server at this port and requests for the game page (eg. game.html). The game page can be a simple html document consisting of the cross and naught board layout, a textbox for user input, and submit & reset buttons. You are free to design more interactive version of this page.

___1___|___2___|___3___
___4___ |___5___|___6___
      7 |            8 |           9

The user claims a board position e.g. by typing a number between 1 and 9 on the keyboard. This move is sent to the server (using HTTP POST method), which updates its own representation of the board by marking this position. The server, as the second player in this game then uses random strategy to mark its own position. The revised board layout as part of the modified game page is then sent to the client.

In this manner the game continues and each side takes turn until either:

1. One of the players (either the user or the server) has claimed three board positions in a row, horizontally or vertically, or diagonally, in which case this player wins, or

2. The board is filled in and neither player has won, in which case the game is a draw.

The result of the game is displayed to the user when the game ends. The reset button simply allows the user to reinitialize the board to its initial state, and play the game again. Note that the user may choose to play on a position that has already been claimed. In this case, the player's move is ignored.

Let's think more about the architectural design. If you get your server to deal with the HTTP client request and handle the game logic, it is performing the role of an application server. Suppose if you want to implement more games like chess, you will end up overloading your web server with application logic.

A three-tiered architecture is a more scalable approach. Here the web server is oblivious to the game play and only focuses on serving standard HTTP requests. The backend application server implements the game logic and maintains state information (e.g. board position). In this way you can scale your web services by having a separate application server for each game. For the purpose of this assignment, the web server and application server can be running on the same host, and you can limit the game play to one client at a time.

676_Figure.jpg

Reference no: EM131471914

Questions Cloud

Project managers monitor and control projects : What are the tools and ways that project managers monitor and control projects?
Should wachovia be held liable : When Timothy Holloway was six years old, Rountree Crisp purchased a $20,000 certificate of deposit payable to "Timothy Holloway, by Rountree Crisp, Agent".
Difference between an international convention and a law : BSBINT405 Apply knowledge of import and export for international conventions, laws and finance Assessment. difference between international convention and law
Determine three challenges associated with using vendors : Determine three challenges associated with using vendors. Analyze the relationship between competitive advantage and vendor relationship management overall.
Implement the server in any programming language : write code to implement the server in any programming language, which supports raw sockets. You may use the server code in the tutorial exercises
Joint commission has influenced a specific function : Next, provide an example of how the Joint Commission has influenced a specific function of HR in a healthcare organization.
Did statements in prop matrixes create an express warranty : John Crow took a ride on a new model sport fishing boat manufactured by Bayliner Marine Corp. There was no equipment on the boat for determining the speed.
What do you think about shopping over the internet : What do you think about shopping over the internet, or your T.V. set Will these channels ever replace traditional retail shopping?
Was the storage fee a finance charge : Ray Vickers owned an automobile pawn business. When a person pawned a car, Vickers issued a standard pawn ticket and required the customer to leave the pawned.

Reviews

Write a Review

Computer Engineering Questions & Answers

  State diagram for coffee machine controller

Raw behavioural specs utilizing the state diagram for the coffee machine controller explained as follow. State events, State actions.

  Design an algorithm to generate

plan an algorithm to generate the sequence of positive integers (in increasing order) whose only prime divisors are 2 and 3; that is, your program should produce the sequence 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 27.

  Questionrequire to create a database for music these are

questionrequire to create a database for music. these are entities that i will use for music database with their own

  Design and implement a program that will be run each day

The task requires the development of a single processor program that can subsequently be converted into a multi processor program after the testing of the single processor program is complete.

  Create a web page tags.aspx for viewing tags

Create a web page Tags.aspx for viewing tags. Use a GridView control to provide access to the list of tags in the database. Put checkboxes beside each tag.

  Developing the constants

You will require to set up the constants within your program for the following: number of square feet per square yard (9), inches per foot (12), price per square yard of saxony carpet (15.62).

  Build java application that implements use of an int array

build a Java application that implements use of an int array. Use for loops to iterate by the array using the array's length variable to stay within the array bounds. Fill the array with random numbers and print the array.

  How use cases will be used by the project team

Explain, in clear, nontechnical terms, how use cases will be used by the project team. Explain what these models are, what they represent in the system, and how they will be used by the team.

  Define session as part of the project termination process

As a project manager, you are asked to facilitate a lessons learned session as part of project termination process. How would you facilitate this session and what are some guidelines you would use? How would you incorporate and document the inform..

  Integrity of data entered into a database

What is the relationship between quality and integrity of data entered into a database and the resulting effect on the quality of patient care.

  How the structure of the tree changes

In this assignment, you will be implementing a 2-3 tree to handle the DVD database of. a video store., A 2-3 tree is a tree satisfying the following requirements.

  Research proposal- mini research project

What kind of study does the question suggest (empirical--e.g., ethnography, case study, descriptive study, experimental; historical--oral or archival or both; theoretical; discourse or textual analysis, etc.)?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd