Скачать презентацию מגישים אלכס לוין אורן ניסים מנחה Скачать презентацию מגישים אלכס לוין אורן ניסים מנחה

46e39faec7729c837c1468ff23ea4b55.ppt

  • Количество слайдов: 17

 מגישים : אלכס לוין אורן ניסים מנחה : ד מגישים : אלכס לוין אורן ניסים מנחה : ד"ר רחל בן-אליהו

Background & motivation n n Millions of people around the world are fascinated by Background & motivation n n Millions of people around the world are fascinated by Acquire, which requires great dill of strategy and intuition and a bit of luck! In the second part of the project, someone (not us!) will implement a smart agent who can play the game by itself.

Projects goal To implement a software that allows playing Acquire online with other users. Projects goal To implement a software that allows playing Acquire online with other users. n n Players gathering. When group was formed the server creates the game and inspects the way the game being played.

Game Review § Originally released by Sid Sackson in 1962. § Board game based Game Review § Originally released by Sid Sackson in 1962. § Board game based on the business of buying and selling hotel chains. § The hotels are represented by square tiles that are placed on a 12 by 9 rectangular grid.

Game Review (cont. ) § A player's turn consists of : -Placing a hotel Game Review (cont. ) § A player's turn consists of : -Placing a hotel tile. -Buying up to 3 shares. - Drawing a new tile.

Information card Information card

 More important aspects n Merging hotels. n Handling shares in merge chains. n More important aspects n Merging hotels. n Handling shares in merge chains. n Ending the game.

 Previous versions There have been a number of attempts at computer versions of Previous versions There have been a number of attempts at computer versions of Acquire : § raw QBasic code (44 K), which requires QBasic to run. § compiled EXE file (123 K), which will run by itself on a PC. § PC-DOS version (175 K), which is active. § “ Power. Players” , for Mac users.

PC-DOS version PC-DOS version

Project steps Step 1: Develop an application that imitates the game board and its Project steps Step 1: Develop an application that imitates the game board and its rules and build a database to support the game. Tools: C++ (Win 32 Console Application). The program will be debugged and run on a single station. The design is based on 3 major layers.

Project steps(cont. ) Project steps(cont. )

Project steps(cont. ) Step 2: GUI. Tools: MFC (Microsoft Foundation Class). An MFC library Project steps(cont. ) Step 2: GUI. Tools: MFC (Microsoft Foundation Class). An MFC library class represents a Windows GDI object type. The GDI provides functions for drawing points, lines, rectangles, polygons, ellipses, bitmaps, and text.

Project steps(cont. ) Project steps(cont. )

Project steps(cont. ) Step 3: CLIENT/SERVER. Tools: Winsock. Using Winsock class and its functions, Project steps(cont. ) Step 3: CLIENT/SERVER. Tools: Winsock. Using Winsock class and its functions, we implemented a TCP Client/Server program in order to create a platform for user/game interaction in a symmetrical (full duplex) mode.

Project steps(cont. ) Winsock provides all of the TCP service facilities in the following Project steps(cont. ) Winsock provides all of the TCP service facilities in the following areas: § § § § Basic Data Transfer Reliability Flow Control Multiplexing Connections Precedence and Security

Project Design Project Design

Client Layer Server Layer MFCView On. Draw() Server main(); Logic logic; Com com; Data. Client Layer Server Layer MFCView On. Draw() Server main(); Logic logic; Com com; Data. Base db; Com com. Array; Logic Com Data. Base db; int client. Send() int client. Rcev() int client. Close() int client. Connect() Data. Base Grid array; grid; pack

players; hotels; Player char *name; int balance; int *holdings; Player(char *n, Com *c) Com Data. Base int server. Send() int server. Rcev() int server. Close() int server. Accept() TCP grid; pack

players; hotels; Tile int position; int status; Hotel int name; int size; Tile(int pos) Hotel(int n); Hotel(char *n);