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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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