You are on page 1of 68

INTRODUCTION

Company profile

Net4Uonline Pvt. Ltd. has two business units BizMobile Technologies (Mobile content development & Delivery) and Teshwa Entertainment (Gaming Studio). Teshwa Entertainment develops highly interactive visually stunning multiplayer games for the web. Net4Uonline has earned a reputation for developing brilliantly engineered software and delivering cutting edge innovative solutions, thanks to which our business continues to grow from strength to strength BizMobile Technologies was setup in May 2007 as a new business entity of Net4Uonline to manage all the business interests that Net4Uonline has in the mobile applications space. This was done in order create a unique identity for its fast growing mobile applications business and separate the Web3D Gaming & Web Application Design Studio that is currently the core focus of Net4Uonline. Net4Uonline in its 3 years of existence has earned a reputation for delivery of exceptional service, brilliantly engineered software and cutting edge innovative solutions to our clients problems; so much so that a large proportion of growth in revenues at Net4Uonline has been contributed by our existing clients or their referrals. We are extremely proud of what we do and how we do it, and invite you to experience the difference. Teshwa Entertainment Over the past two years we have been working, learning, and advancing our level of expertise in building casinos games, especially that of video slot machines. During this time we have also developed specialised engineering capabilities in developing realistic, 3D content and virtual
1

worlds that function in a web browser without the need of downloading any software allowing your players quick and easy access to their favourite games. teshwa.com was launched in December 2008 as a showcase for all the exceptional work the team has done while developing a number of highly successful revenue generating video slot machines for a number of online internet based casino. Overall as a company we have earned a reputation for delivery of exceptional service, brilliantly engineered software and delivering cutting edge & innovative solutions for our clients. We are extremely proud of what we do and how we do it, and invite you to experience the difference.

Legacy System Roulette is a casino game named after a French diminutive for little wheel. In the game, players may choose to place bets on either a single number or a range of numbers, the colors red or black, or whether the number is odd or even. To determine the winning number and color, a croupier spins a wheel in one direction, and then spins a ball in the opposite direction around a tilted circular track running around the circumference of the wheel. The ball eventually loses momentum and falls on to the wheel and into one of 37 (in French/European roulette) or 38 (in American roulette) colored and numbered pockets on the wheel. History The first form of roulette was devised in 18th century France. Blaise Pascal introduced a primitive form of roulette in the 17th century in his search for a perpetual motion machine. The roulette wheel is believed to be a fusion of the English wheel games Roly-Poly, Reiner, Ace of Hearts, and E.O., the Italian board games of Hoca and Biribi, and "Roulette" from an already existing French board game of that name. The roulette wheels used in the casinos of Paris in the late 1790s had red for the single zero and black for the double zero. To avoid confusion, the color green was selected for the zeros in roulette wheels starting in the 1800s. In the 19th century, roulette spread all over Europe and the U.S.A., becoming one of the most famous and most popular casino games.

Rules of playing game 1. Each player buys-in different colored chips. 2. To play American roulette, you place your bet or bets on numbers (any number including the zero) in the table layout or on the outside, and when everybody at the table had a chance to place their bets, the croupier starts the spin and launches the ball. 3. Just a few moments before the ball is about to drop over the slots, the croupier says 'no more bet'. From that moment no one is allowed to place or change - their bets until the ball drops on a slot. 4. Only after the croupier places the dolly on the winning number on the roulette table and clears all the losing bets you can then start placing your new bets while the croupier pays the winners. 5. The winners are those bets that are on or around the number that comes up. Also the bets on the outside of the layout win if the winning number is represented. Types of bets Inside bets Straight (or Single) A single number bet. The chip is placed entirely on the middle of number square.

Split A bet on two adjoining numbers, either on the vertical or horizontal (as in 14-17 or 8-9). The chip is placed on the line between these numbers.

Street A bet on three numbers on a single horizontal line. The chip is placed on the edge of the line of a number at the end of the line (either the left or the right, depending on the layout).

Corner (or Square) A bet on four numbers in a square layout (as in 11-12-14-15). The chip is placed at the horizontal and vertical intersection of the lines between the four numbers.

Six line (or Double Street) A bet on two adjoining streets, with the chip placed at the corresponding intersection, as if in between where two street bets would be placed.

Trio A bet on the intersecting point between 0, 1 and 2, or 0, 2 and 3 (singlezero layout only).

Basket (or the first four) (Non-square corner) a bet on 0, 1, 2, and 3 (single-zero layout only).

Basket A bet on 0, 1, and 2; 0, 00, and 2; or 00, 2, and 3 (double-zero layout only). The chip is placed at the intersection of the three desired numbers.

Top line A bet on 0, 00, 1, 2, and 3 (double-zero layout only). The chip is placed either at the corner of 0 and 1, or the corner of 00 and 3. Outside bets Outside bets typically have smaller payouts with better odds at winning.

1 to 18 A bet on one of the first low eighteen numbers coming up.

19 to 36 A bet on one of the latter high eighteen numbers coming up.

Red or black A bet on which color the roulette wheel will show.

Even or odd A bet on an even or odd nonzero number.

Dozen bets A bet on the first (1-12), second (13-24), or third group (25-36) of twelve numbers.

Column bets A bet on all 12 numbers on any of the three vertical lines (such as 1-4-710 on down to 34). The chip is placed on the space below the final number in this string.

Background (Domain Knowledge) ActionScript 3.0 ActionScript is an object oriented language originally developed by MacroMedia Inc. It is a dialect of ECMAScript (meaning it is a superset of the syntax and semantics of the language more widely known as JavaScript). ActionScript is used primarily for the development of websites and software targeting the Adobe Flash Player platform, used on Web pages in the form of embedded SWF files. The language itself is open-source in that its specification is offered free of charge and both an open source compiler (as part of Adobe Flex) and open source virtual machine (Mozilla Tamarin) are available. ActionScript is suitable for use in some database applications, and in basic robotics, as with the Make Controller Kit. Flash MX 2004 introduced ActionScript 2.0, a scripting programming language more suited to the development of Flash applications. ActionScript 3.0 is an object-oriented programming language allowing far more control and code reusability when building complex Flash applications. This version of the language is intended to be compiled and run on a version of the ActionScript Virtual Machine that has been itself completely re-written from the ground up (dubbed AVM2).

JBoss AS JBoss Application Server (or JBoss AS) is an open-source JavaEEbased application server. An important distinction for this class of software is that it not only implements a server that runs on Java, but it actually implements the Java EE part of Java. Since it is Java-based, the JBoss application server operates cross-platform: usable on any operating system that supports Java. JBoss AS was developed by JBoss, now a division of Red Hat. JBoss uses JCA to configure JDBC data sources. To configure a data source, we need:

The JDBC driver jar file and its java.sql.Driver class name The JDBC URL The user name and password

JBoss Web Server integrates the flexibility and power of the Apache web server into Tomcat. This integration brings the most recent OS technologies for processing high volume data available to web applications in JBoss, making the JBoss Web Server one of the fastest and most scalable web servers in the market. Some of the Features of JBoss are:1. Highly Scalable JBoss Web scales to the levels required by the most demanding of applications. The hybrid connection model can handle client loads of 10,000+ concurrent connections. 2. Fast Static Content JBoss Web takes advantage of fast OS-specific features to achieve zerocopy transfer of static content. This decreases CPU load and improves application responsiveness.
8

3. OpenSSL Support The security of your web application matters. SSL is the cornerstone of web security, but Java SSL engines are slow and can put a big burden on your CPU. JBossWeb integrates the native OpenSSL libraries, the fastest and most secure open source SSL implementation. 4. URL Rewriting JBoss Web provides a powerful URL rewriting module, similar to Apache mod_rewrite. URLs can be rewritten to support legacy URLs, handle errors or rapidly respond to web application issues that come up in the hectic day-to-day management of web applications. JBoss Web gives you the power to choose the right platform for each task, and total flexibility to make changes along the way. EJB3 Enterprise Java Beans (EJB) is managed server side component architecture for modular construction of enterprise applications. The EJB specification is one of several Java APIs in the Java EE specification. EJB is a server side model that encapsulates the business logic of the application The EJB specification intends to provide a standard way to implement the back-end 'business' code typically found in enterprise applications (as opposed to 'front-end' interface code). Enterprise JavaBeans are intended to handle such common concerns as persistence, transactional integrity, and security in a standard way, leaving programmers free to concentrate on the particular problem at hand. To deploy and run EJB beans, a Java EE Application server ie JBoss can be used, as these include an EJB container by default. Alternatively, a standalone container such as OpenEJB can be used.

Types of EJB 1. SessionBean Session is one of the EJBs and it represents a single client inside the Application Server. Stateless session is easy to develop and its efficient. As compare to entity beans session beans require few server resources. A session bean is similar to an interactive session and is not shared; it can have only one client, in the same way that an interactive session can have only one user.

SessionBeanTypes Session Beans are of two types, Stateful Session Bean and Stateless Session Bean.

Stateless Session Beans A stateless session bean does not maintain a conversational state for the client. When a client invokes the method of a stateless bean, the bean's instance variables may contain a state, but only for the duration of the invocation.

Stateful Session Beans The state of an object consists of the values of its instance variables. In a stateful session bean, the instance variables represent the state of a unique client-bean session. Because the client interacts ("talks") with its bean, this state is often called the conversational state.

2. Entity Bean Entity beans are persistence java objects, whose state can be saved into the database and later can it can be restored from Data store. Entity bean represents a row of the database table.

10

3. Message Driven Bean Message Driven Bean is an enterprise bean that can be used by JEE applications to process the messages asynchronously. Message Driven Bean acts as message consumer and it receives JMS messages.

EJB 3.0 New Features Following are the new features of EJB 3.0: 1. Metadata Annotations EJB 3.0 extensively uses the metadata annotations to simplify the development of EJB 3.0 components. 2. Encapsulation of environmental dependencies EJB 3.0 now uses the annotations and dependency injection mechanism to encapsulation the environmental dependencies and JNDI access.

3. More simplified EJB Specification EJB 3.0 is simplified Specification but still very powerful.

4. Dependency Injection Now the API for lookup and usage of EJB environment and resource references has been simplified and dependency injection is used through metadata annotations.

5. Callback interfaces Elimination of the requirement for the implementation of callback interfaces.

11

Servlets & JSP Servlets are Java technology's answer to CGI programming. They are programs that run on a Web server and build Web pages. Java servlets are more efficient, easier to use, more powerful, more portable, and cheaper than traditional CGI and than many alternative CGI-like technologies. Efficient:-With traditional CGI, a new process is started for each HTTP request. If the CGI program does a relatively fast operation, the overhead of starting the process can dominate the execution time.

Convenient

:-Servlets

have

an

extensive

infrastructure

for

automatically parsing and decoding HTML form data, reading and setting HTTP headers, handling cookies, tracking sessions, and many other such utilities.

Powerful: - Servlets can also share data among each other, making useful thing like database connection pools easy to implement. They can also maintain information from request to request, simplifying things like session tracking and caching of previous computations.

Portable: - Servlets are written in Java and follow a well-standardized API.

12

Java Server Pages (JSP) is a technology that lets you mix regular, static HTML with dynamically-generated HTML. Many Web pages that are built by CGI programs are mostly static, with the dynamic part limited to a few small locations. The advantages of JSP are twofold. First, the dynamic part is written in Java, not Visual Basic or other MS-specific language, so it is more powerful and easier to use. Second, it is portable to other operating systems and non-Microsoft Web servers. JSP is so easy and convenient that it is quite feasible to augment HTML pages that only benefit marginally by the insertion of small amounts of dynamic data. Previously, the cost of using dynamic data would preclude its use in all but the most valuable instances.

13

Proposed System
About the Existing System Players have to be physically present at casino to play the game. Players can play maximum with the cash available with them. If players run short of cash they have to arrange for the same or borrow it. Players have to purchase chips against cash from the casino. Players have to maintain record by themselves so as to know the history of the games played by them. Players do not have any help available during the game.

14

Scope of work The purpose of this project is to develop new exciting online gambling game named French Roulette at NET4UONLINE. This game is developed to give more realistic experience about gambling games in more exciting way through online games. The game needs to have a simple user interface and at the same time provide the user with exciting playing environment. The user should also be provided with practice mode where the user can practice and gain a better understanding of the game. The user needs to be provided with proper guidelines to be able to play the game. The user should be able to view the history of the game played at any time during the game. The game should be restored to the state in which it was left by the player during its valid session The user session should be expired after 20 minutes of idle time. The user should be provided with a warning message after 15 minutes of idle time. The user should be given proper instructions with the help of appropriate error messages whenever required. During the game being played in real money mode the user should be provided with appropriate message of money transfer on logout.

15

Operating Environment for the Project OS: - Windows, Linux IDE: - Adobe Flash CS4, Eclipse Front End Language: - ActionScript3 Back End Language: - Servlets, JSP, EJB3 Application Server: - JBoss 5.0 Database: - MySQL

16

Proposed System Players are now provided with the facility to play the game from any place and at any time. Players do not require to carry any cash and transfer the required amount to their accounts with our casino account. Players can now view the history of the game and plan their moves strategically. Players can now receive online help during the game and also view the guidelines and paytable made available by the game.

17

System Overview French Roulette is an online based casino game where player has to place chips on different numbers, a spin is done and based on the winning number, the winning or losing of a player is determined. The player has to register with the GIOCA7 client and after that player is given username & password. After the player enters username & password, a tokenid is generated which is verified by the server and based on that player is asked to do buyin process. In buyin the player is asked to enter the amount of credits for playing the game. After buyin process is finished, the player can play the game, he can view payout table and based on that, player can place bets & do a spin. The game has a winning history table which shows the winning numbers in different colors. The player can also do a rebuyin, if he has credits & can continue to play the game. The player can also use the aams session and ticket code for verification purpose. The player can use ticket code to view the history page of the game he played. Using history, he/she can make a check on the type of bets, winning number and amount he wins or lose.

18

Limitations of the system. French Roulette was not an online game till date. Players had to go to casino to play the game. They also need to carry cash which then had to be converted to chips by the casino. Once a player has exhausted his cash and wish to continue with the game , he was required to arrange cash or borrow it from the casino Players had to follow the rules and timings of the casino, hence they could not play as per there will. Players playing for the 1st time could not have any access for practicing the game.

19

Gantt Chart

20

Analysis and Design


Work Breakdown Structure

21

Use Case

22

Activity Diagram

23

Class Diagram

24

Sequence Diagram

25

Module Specification 1. GUI Based Login Before playing the game, the player has to enter his/her username & password, after entering the details, the game validates the name and password. If the login credentials are correct, the server generates the 1. Ticket Code 2. Aams session id by the government 3. Session id for the player After that the game is loaded or an error message will be displayed if credentials are wrong.

2. BuyIn Before the game is played the buyin screen is displayed to the user. The BuyIn screen is displayed to the user. The user has to enter the credits in terms of euro, where minimum value is 0.5 & maximum value is 1000. Proper validation is done to ensure that credits entered by the user are within this range. Request: http://localhost:8080/RouletteFrench/ValidateFilter?call=BuyInServlet@bu yin=1200@sid=8@bid=0 The above request consists of the buyin amount, the sessionId and the buyinstatus. During this process the user is shown an operation in progress message If the buyIn results in an error, the appropriate message is displayed to the user. If the buyin is successful, the ticket code and the aams session id is displayed to the user

26

Response:
<TESHWA> <EVENT FUN="setGameBalance" VAL=" 12000 "/> <EVENT FUN="setTicketCode" VAL=" GRAT0000000008DJ "/> <EVENT FUN="setBuyInStatus" VAL=" 1 "/> <EVENT FUN="setSessionStatus" VAL=" 0 "/> <EVENT FUN="setPlayerBalance" VAL=" 900558 "/> <EVENT FUN="setMaxBuyIn" VAL=" 88000 "/> <EVENT FUN="setMinBuyIn" VAL=" 50 "/> <EVENT FUN="enableButtons" VAL=" 0 "/> </TESHWA>

It also sets the now available max buyin and min buyin, the buyin status, the session status, player balance and the game balance. The amount that was entered by the user is now available for the user to play the game. ReBuyIn The user can do a rebuyin during the game, wherever available. On click of the Buyin button, the buyin screen is displayed to the user. The user can enter any amount between the available Min BuyIn and available Max BuyIn. Request: http://localhost:8080/RouletteFrench/ValidateFilter?call=BuyInServlet@bu yin=1200@sid=8@bid=0 The above request is sent to the server, requesting the desired amount. The request consists of the buyin amount, the sessionId and the buyinstatus buyinstatus. If the buyIn results in an error, the appropriate message is displayed to the user. If the buyin is successful, the requested amount is credited to the user.

27

Response:
<TESHWA> <EVENT FUN="setGameBalance" VAL=" 2000 "/> <EVENT FUN="setTicketCode" VAL=" N2F4E2001BF4F6LZ "/> <EVENT FUN="setBuyInStatus" VAL=" 1 "/> <EVENT FUN="setSessionStatus" VAL=" 0 "/> <EVENT FUN="setPlayerBalance" VAL=" 793484 "/> <EVENT FUN="setMaxBuyIn" VAL=" 98000 "/> <EVENT FUN="setMinBuyIn" VAL=" 50 "/> <EVENT FUN="enableButtons" VAL=" 0 "/> </TESHWA>

It also updates the now available max buyin and min buyin, the buyin status, the session status, player balance and the game balance else BuyIn button is disabled. The user can do no further BuyIn. 3. Spin/QuickSpin The player can spin/QuickSpin once he has placed the chips on the table and is ready to play the game. On click of spin or quickSpin a winning number is generated and the player wins or loses the amount bet depending on it. Also the winning history for the game is set and the win amount and the player credits are updated. Request: http://localhost:8080/RouletteFrench/ValidateFilter?call=doSpin@selected bets=a2=20: d5=75:g1=10:g2=10@sid=8@bid=0 The above request consists of the selected bets with the bet amount for each of the selected bet along with the session id and buyin type.

28

Response:
<TESHWA> <EVENT FUN="setWinningNumber" VAL=" 29 "/> <EVENT FUN="setWinningHistory" VAL=" 29 "/> <EVENT FUN="UpdateWin" VAL=" 80 "/> <EVENT FUN="winningBet" VAL=" e9=10:g2=10 "/> <EVENT FUN="setGameBalance" VAL=" 1980 "/> <EVENT FUN="setSelectedBet" VAL=" a10=10:d2=10:a6=10:a15=10:a20=10:d14=10:g1=10:e9=10:h1=10:g2=10 "/> <EVENT FUN="setPlayerBalance" VAL=" 792484 "/> <EVENT FUN="setBuyInStatus" VAL=" 4 "/> <EVENT FUN="setMaxBuyIn" VAL=" 98000 "/> <EVENT FUN="setMinBuyIn" VAL=" 50 "/> <EVENT FUN="enableButtons" VAL=" 0 "/> </TESHWA>

The response returns the winning number along with the winning history, the winning bets which can be used for rebet and updating the credit details for the player

4. Restore The user can refresh the game at any time. The game returns to the state it was prior to the refresh. If the game is refreshed before any spin/quickspin is done, then the response sent by the server, updates the now available max buyin and min buyin, the buyin status, the session status, player balance and the game balance. Response:
<TESHWA> <EVENT FUN="setSessionId" VAL=" 26 "/> <EVENT FUN="setAmmsSessionID" VAL=" M2F472001A0442RM "/> <EVENT FUN="setGameBalance" VAL=" 2000 "/> <EVENT FUN="setTicketCode" VAL=" N2F4E2001BF4F6LZ "/> <EVENT FUN="setFunRealMode" VAL=" 0 "/> <EVENT FUN="setPlayerBalance" VAL=" 792484 "/> <EVENT FUN="setBuyInStatus" VAL=" 1 "/> 29

<EVENT FUN="setMaxBuyIn" VAL=" 98000 "/> <EVENT FUN="setMinBuyIn" VAL=" 50 "/> <EVENT FUN="enableButtons" VAL=" 0 "/> </TESHWA>

If the game is refreshed after a spin/quickspin then the response given by the server would now also update the winning history, the winning bet, the win number, win amount and the selected bets. Response:
<TESHWA> <EVENT FUN="setSessionId" VAL=" 26 "/> <EVENT FUN="setAmmsSessionID" VAL=" M2F472001A0442RM "/> <EVENT FUN="setGameBalance" VAL=" 1980 "/> <EVENT FUN="setTicketCode" VAL=" N2F4E2001BF4F6LZ "/> <EVENT FUN="setFunRealMode" VAL=" 0 "/> <EVENT FUN="setWinningHistory" VAL=" 29 "/> <EVENT FUN="setWinningNumber" VAL=" 29 "/> <EVENT FUN="winningBet" VAL=" e9=10:g2=10 "/> <EVENT FUN="UpdateWin" VAL=" 80 "/> <EVENT FUN="setPlayerBalance" VAL=" 792484 "/> <EVENT FUN="setBuyInStatus" VAL=" 4 "/> <EVENT FUN=" setSelectedBet" VAL=" a10=10:d2=10:a6=10:a15=10:a20=10:d14=10:g1=10:e9=10:h1=10:g2=1 0 "/> <EVENT FUN="setMaxBuyIn" VAL=" 98000 "/> <EVENT FUN="setMinBuyIn" VAL=" 50 "/> <EVENT FUN="enableButtons" VAL=" 0 "/> </TESHWA>

Winning History: Based on the numbers the color is specified: green, red or black. 1st it highlights the winning number and then based on the color specified the number is displayed in red, black or green. The list displayed consists of past 11 winning numbers.

30

UpdateWin: Updates the winning amount

Wining bet: Restore for the winning bets. Depending upon the bet and the amount for those bets, the chips are placed on the appropriate bet. The server response consists of a string of all the winning bets, separated by colon. The string is split using the delimiter colon, which gives us the individual bets and there amount. Using this then chips are placed on the respective bets.

SelectedBet: Consist of String with all the bets that were placed on the table during the spin. This is used during rebet.

5. Logout The users can logout from the game at any time. On click of logout, all the timers are destroyed. It sends unparticipate From Game request to the server.

Request: http://localhost:8080/RouletteFrench/ValidateFilter?call=unparticipateFrom GameServlet@sid=8

A operation in progress screen is been shown to the user The server returns the following response

Response:
<TESHWA> <EVENT FUN="logoutdone" VAL=" 3000 "/> </TESHWA>

31

After logout is done: 1. The other entire visible screen are hidden. 2. GameBalance and winAmount is set to 0 3. Logout Screen is shown to the user 4. If the player is in real mode then Logout Screen is shown with the amount that will noe be transferred to the user 5. If the player is in fun mode then A simple screen with session terminated message is shown to the user

32

Functional Requirements of the system 1.1: Login 1.1.1: Users Description: Adds username and password. Input: username, password Output: the given details are passed to client side 1.1.2: Verify Description: Verify username and password Input: none Output: accept or reject the parameters 1.1.3: Generate Description: Generate ticket and session id Input: verified username, password Output: Ticket code and sessionid 2.1: Buyin 2.1.1: Buyin amount Description: Buyin amount is added. Input: amount Output: none 2.1.2: Update Player Account Description: The player account is updated Input: amount Output: account is updated
33

2.1.3: Update credits Description: credit value is updated Input: none Output: none 2.1.4: Display Description: The ticket code is displayed Input: none Output: none 3.1: Spin 3.1.1: Bets Description: Bets are placed. Input: chip type Output: the given chip are placed on the table 3.1.2: Amount Description: Bet amount is added based on the chip value Input: none Output: display is updated 3.1.3: Display Description: win or lose is displayed Input: none Output: none

34

3.1.4: Update Description: the credit value is displayed Input: credit value Output: credit value display updated 4.1: Buyin 4.1.1: Session Description: Get sessionid. Input: tokenid Output: session id 4.1.2: Restore details Description: Based on sessionid get details for that user Input: sessionid Output: details of that user 5.1: Logout 5.1.1: Unparticipate Description: logout from the game Input: none Output: logout message box is displayed 5.1.2: Add Credit Description: credit value is added to the user account Input: credit value. Output: updated player account.

35

Data Dictionary
1) Player Contains the details of the player when he logins using his id and password. COLUMN NAME Players_id Players_name Players_nickname Players_timestamp DATA TYPE bigint(20) varchar(255) varchar(255) datetime DESCRIPTION Player id Name of the player Nickname of the player Contains the date and time of player login players_business_promoter int(11) players_codicefiscale players_id_concessionario players_num_contr players_playble_money players_regionc_code players_skill_level varchar(255) int(11) varchar(255) int(11) int(11) int(11) Business promoter Tax code Concessionaire Counter Amount playable Region code Rookie or advanced

2) Players_Session Contains the details of the player playing the game. COLUMN NAME players_session_session_id DATA TYPE bigint(20) DESCRIPTION Session id of the player after he logs in players_session_player_id players_session_login_time players_session_status bigint(20) Datetime Int(11) Player id Login time Current status of player for a given session id players_session_bonusreal players_session_realmoney bigint(20) bigint(20)
36

Bonus amount Amount played in real mode

players_session_gamebalance players_session_gamecode players_session_aams_sessionid players_session_roomid players_session_token players_session_phasenrend players_session_phasesplayed players_session_totalbets players_session_totalwins players_session_totalrevenue players_session_bonusbalance players_session_bonusbets players_session_bonuswins players_session_ipadress players_session_buyintype players_session_ticketcode

bigint(20) bigint(20) Varchar(100) Varchar(100) Text bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) Text int(11) varchar(200)

Player balance Game code of a game Aamssession of a given player Roomid Token Phase number of a given round Number of rounds played Total amount of bets Total amount won Total revenue won by a player Balance bonus Bonus bets Bonus wins Ipaddress of the player Type of buyin ie 0 or 2 Ticket assigned to player Internal session id used by game server

players_session_sessionidinternal bigint(20)

players_session_registration_id players_session_conc_id players_session_buyindone players_session_heartbeatupdate players_session_finalstatus players_session_buyin_phasenr players_session_buyin_status players_session_max_buyin players_session_min_buyin players_session_playerbalance

bigint(20) bigint(20) bigint(20) Datetime bigint(20) bigint(20) int(11) bigint(20) bigint(20) bigint(20)

Registration id of a player Concession id of a player Buyin done status Date and time of heartbeat Final status of a player Buyin round number Buyin status Maximum buyin of a player Minimum buyin of a player Player balance of a given round

37

3) Session_History Maintains the session history of the player. COLUMN NAME session_history_id DATA TYPE bigint(20) DESCRIPTION Session history id of a given player session_history_session_id session_history_bet_amount session_history_start_amount session_history_total_balance bigint(20) bigint(20) bigint(20) bigint(20) Session id of a existing player Total amount of bet placed Initial amount Total balance of a previous round session_history_win_amount bigint(20) Winning amount of previous session session_history_winning_number bigint(20) Winning number of previous session session_history_timestamp Datetime Date and time of previous session session_history_selected_number Text Selected number of previous session session_history_status Tinyint(1) Current status of of previous session session_history_winning_bet session_history_bonusreal session_history_realmoney Id Balance Text bigint(20) bigint(20) int(11) int(11) Bets placed of previous session Real mode for bonus Amount played in real mode Id of the player Balance amount

38

4) System_Messages Contains messages related to game. COLUMN NAME message_index session_id Message Status deliver_time DATA TYPE int(11) bigint(20) Longtext int(11) Datetime DESCRIPTION Message id Session id of a player System message Status of a given message Deliver time of a given message 5) T_Phases Contains the details of the round ie phase for each and every player. COLUMN NAME Id internal_session_id DATA TYPE bigint(20) bigint(20) DESCRIPTION Id of a player for given round Session id of a player for given round game_id phase_nr phase_dt players_cnt Varchar(200) bigint(20) Datetime bigint(20) Game id for given round Phase number for given round Date and time for given round Number of phases for given round revenue_amount pot_amount game_status phase_dt_utc buyin_type bigint(20) bigint(20) Int(11) Datetime Smallint(6) Amount for given round Pot amount for given round Game status for given round Date and time for given round Type of buyin for given round

39

6) T_phases_players Contains the additional details for each round of the player. COLUMN NAME DATA TYPE Id t_phases_id bigint(20) bigint(20) Id of a given player Phase id for given round Ticket code of a player Participation id Concession id Initial amount Amount he bet Amount he won Revenue amount won by player Jackpot amount of a player Amount added Amount added in jackpot Total amount Total bets for bonus Amount won in real mode Total amount played Bet played Number of wins for the player Counter DESCRIPTION

tournament_registration_id bigint(20) participation_id conc_id start_amount bet_amount win_amount revenue_amount jackpot_amount add_to_jackpot_amount jackpot_extern_amount bon_tot_real bon_bet_real bon_win_real bon_tot_play bon_bet_play bon_win_play Numcontr Text bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) bigint(20) Char(16)

40

7) Webservice_Details Contains the webservices details which can be used by the client COLUMN NAME Id session_id Breakgame DATA TYPE int(11) bigint(20) int(11) DESCRIPTION Player id Session id of that player Break game webservice status Continuegame int(11) Continue game webservice status Closegame int(11) Close game webservice status Emergencystop int(11) Emergency stop webservice status Sendmessage int(11) Sendmessage webservice status Spinstatus int(11) Spinstatus webservice status

41

User-Interface screen shots

Buyin

42

The Buyin window shows minimum & maximum credit, the user is allowed to enter credits for playing the game. When you enter the wrong value, it is displayed in red line. After entering the appropriate buyin value, operation in progress window is shown.
43

Bets and Chips

44

The chips are highlighted when you select, the table gets highlighted when you move the chip, the chip can be placed in different combination. Win/Lose

45

46

The win or lose animation is displayed depending on the winning number displayed & chips placed on that numbers. In the top right corner, all the winning numbers are displayed depending on the colors

Announce Bets and Neighbor Bets

47

48

49

50

Announce Bets and Neighbor Bets are special bets associated with French Roulette. These Bet helps to select multiple bet combination at the same time.

Messages and other features

51

The maximum bet limit and payout is displayed & general error is shown

52

The maximum bet limit is shown and insufficient credit is displayed

53

The help screen and logout window is displayed

54

Testing of the System


Steps Implemented during testing of a game After the game has been developed, the testing phase of the game goes through four stages: Local Phase:In this phase, the game is tested locally; UI is tested using various test cases. When game is being played, data sent from server-side via XML is tested. Individual modules are tested. Test Phase:In this phase, the game is uploaded in the test server. Again the game goes through the same test process which was done locally. Load testing is done in order to check whether server is able to handle multiple requests or not. The game is also tested by the client and any Feature or bug mentioned by the client needs to be introduced or rectified. Beta Phase:In this phase, the game is uploaded in the beta server. The client application is downloaded from their site and then the game is played in the beta environment. A predefined set of user ids and password is given to various users and then the game is tested. Same set of test cases are used in beta environment. Real Phase:In this phase, the game is uploaded in the production server & played by the client and same test process is repeated.

55

Methodologies used for Testing

Why V-Model Since we had limited amount of time for making the online casino game, the development and testing needs to be done in parallel. The V-Model makes testing more easily. V-Model The V-Model is a development model designed to simplify the complexity associated with system developing. The V-Model helps to minimize the project risk, improvement & guarantee of quality, reduction of total cost over the entire project, improvement of communication.

56

V-Model flow goes in seven steps Step 1 At this level, a generalized high level application is being developed, test activities are planned & pre-defined conditions are established. Step 2 At this level, a high level solution design is developed and begin planning the testing activities to be performed to verify the requirements (at the High-Level Design phase) have been incorporated and satisfied. Step 3 At this level, a detailed designed, refining the granularity of the requirements, developing functional and technical specification, testing activities are planned. Step 4 At this level, the specification created in design phase is translated into technical code. Step 5 At this level, unit test phase activities are conducted as per test plan. There will be one or several iterations of this step between the development team and the testing team to ensure all of the appropriate requirements have been defined and successfully tested. Step 6 At this level, integration testing is done, identify the document deviation between predefined anticipated results with actual testing result.

57

Step 7 At this step, things have been finalized the project team will have completed its work and the application can be made available in the production environment. V-Model Benefits The V-Model helps to complete project in consistent manner The principles of V-Model can be applied in both maintenance & development environments. The standardize process used by V-Model followed helps to improve the quality being delivered. The V-Model follows industry recognized methodologies. White-Box Testing: White Box Testing are tests that are run an application with the knowledge of the internal working of the code base. White box testing is used in three of the six basic types of testing: unit, integration, and regression testing. Unit testing is done on a small piece, or unit, of code. This unit is usually a class. When a unit is integrated into the main code base, it is more difficult to find a bug in that unit. Integration testing looks at how all components of an application interact. White box integration tests specifically look at the interfaces between the components. Regression testing verifies that modifications to the system have not damaged the whole of the system. White box test cases should test different paths, decision points (both true and false decisions), execute loops, and check internal data structures of the application. Basis path testing, equivalence partitioning, and boundary value analysis are all used to create white box tests.
58

Basis path testing looks at the decision points in the application. The goal of white box testing is to cover testing as many of the statements, decision point, and branches in the code base as possible. Black-Box Testing: Black Box Testing treats an application as a black box and only looks at the outputs that are produced by specific inputs into the application. The black box tester does not need to understand why the code does what it does, and they should not have access to the source code of the application. Requirements are used to determine the correct outputs of black box testing, and these test cases are used to validate that the right software is being built, i.e. that the application does what the requirements say. Black box testing checks that required functionality exists and is correct, the interface works properly, data structures behind the interface work properly, the behavior and performance of the system are within proper bounds, and that the initialization and termination of the program are correct. Integration, functional and system, acceptance, beta, and regression testing all are forms of black box tests. A minimal black box test suite should have one test case for every requirement of the application. To optimize testing beyond this minimal set of tests equivalence partitioning, boundary value analysis, decision tables, and diabolical test cases should be created.

59

Test cases 1. Login Test Case T1 Check Item Test Case Objective Aams sessionid Aams session is available or not Test Data/Input _ Expected Results

T2

Aams sessionid

Aams session id is displayed in the client interface

The aams session id should be displayed to the user after buyin For a user the session will be available

2. Buyin Test Case T1 Check Item Test Case Objective Buyin Value Buyin value not be less than 0.5 & should not be greater than 1000 Buyin Value Buyin value with no value Buyin Value Buyin value as special characters Buyin screen Try refresh the screen Test Data/Input Buyin value Expected Results

Buyin value should be between 0.5 7 1000 It should not proceed further It should not proceed further It should return to the same state

T2

Blank

T3 T4

Special characters -

60

3. Bets Test Case T1 Check Item Test Case Objective Max bet Check maximum limit allowed on each bet Place bets on numbers common in many bets and see if you can exceed max bet Check the error messages that are displayed if you exceed max bet and if you credits are less than bet amount Check the payout for combination of different bets Place bets at random clicking on the table really fast Test Data/Input Place chips Expected Results

It should display an error It should display an error

T2

Common numbers

Place chips

T3

Error messages

Place chips

The error message should be displayed

T4

Payout

T5

Random click

Place chips

The proper payout amount will be won or lose The chips should be placed at app position

4. Spin Test Case T1 Check Item Test Case Objective Normal Spin Try to click normal spin button really fast again and again to see if it gets clicked twice Try to click quick spin button really fast again and again to see if it gets clicked twice Check the error messages that are displayed if you exceed max bet
61

Test Data/Input Click on normal spin button

Expected Results

It should work properly

T2

Quick Spin

Click on normal spin button

It should work properly

T3

Error messages

Place chips

The error message should be displayed

T4

Payout

T5

Random click

and if you credits are less than bet amount Check the payout for combination of different bets Place bets at Place chips random clicking on the table really fast

The proper payout amount will be won or lose The chips should be placed at app position

5. Rebet Test Case T1 Check Item Test Case Objective Rebet Button Try to click rebet button really fast again and again to see if it gets clicked twice Refresh the game during the game & check the status Fill the table with all possible bets and see if rebet feature places the right chips on table Test Data/Input Expected Results

Click on rebet It should work button properly

T2

Refresh

T3

Fill the table

Click on refresh button of the browser Place chips on each and every number

It should return to the same game state

The rebet feature should work properly

6. Logout Test Case T1 Check Item Test Case Objective Logout Button Try clicking the logout button really fast to see if it does logout twice Refresh the game after logging out from the game & check the status Test Data/Input Click on logout button Expected Results

It should work properly

T2

Refresh

Click on It should return to refresh button the same state of the browser

62

T3

Options Menu

T4

Amount

Click the logout button from the options menu at random any time during the game Check logout amount shown in the logout window if player playing in realmode.

It should work properly

It should show the exact amount

7. Help Screen Test Case T1 Check Item Test Case Objective Help Screen Click the help screen button at random during the game to see if it causes any problems Bets Try to keep the help/bets screen open and place bets Spin Try to keep the help/bets screen open and do a spin Logout Try to keep the help/bets screen open and do logout Buyin Try to keep the Screen help/bets screen open and call buyin Screen Test Data/Input Expected Results

Click on Help It should work Screen properly

T2

The help screen should get closed

T3

The help screen should get closed The help screen should get closed

T4

T5

The help screen should get closed

63

8. Idle Test Case T1 Check Item Test Case Objective Warning Test Data/Input Expected Results

T2

Reset

T3

Auto Logout

Check if the game gives a warning of auto logout if the game is idle for 15 mins Try to reset the idle timer just before 15 mins and see if the warning comes again after 15 mins Check if the game is auto logged out after 20 mins

It should give a warning

It should give a warning

The game should be logout

9. Help Screen Test Case T1 Check Item Test Case Objective Error messages Check the all the errors messages are displayed by the client properly Send messages from the webservice to see if its displayed properly Send messages from the webservice while a error message is displayed in the client to see the order of messages displayed Check if the game is allowed to continue for critical error
64

Test Data/Input -

Expected Results

It should show all the error messages

T2

Message Display

The message should be displayed

T3

Error message display

Error message is displayed

T4

Continue

The game is not allowed to continue

messages where it should not be allowed to continue

10. Maintenance Webservice Test Case Check Item Test Case Objective CloseGame Check once closegame is called player gets logged out. Check once closegame is called player gets logged out and logout amount shown if player is playing in real mode. Check once Breakgame Called player should be paused and player gets Breakgame game window also not allowed to do any activity. Check once Continue game called player gets continue game window with ok button and should be allowed to play the game. Check once send message called player get the message window with the message sended. Test Data/Input Expected Results Closegame is called

T1

T2

CloseGame

Closegame is called during logout

T3

BreakGame

BreakGame is called

T4

Continue Game

ContinueGame is called

T5

Send Message

Sendmessage

65

Conclusion
The online casino game was introduced with the intent, so that government can collect taxes & at the same time players can have fun. Roulette game is the most favorite common online casino game played by the users. Due to rich GUI and user friendly interface, it will help first time user to understand the game more easily and at the same time making the game more addictive. It was quite fun to make such a casino game. There were lot of new things to learn since the topic is new. Initially it was difficult to understand the timeline concept, but after making some simple application, doing animation is qute fun. Along with the flash side, I got to learn about the server side of the game which involved servlets,jsp and ejb3. The project has helped me in understanding the actual lifecycle of project, dos & donts while making a game.

66

Limitation and Further Enhancment


The current game application is a web based casino game, so it depends on the internet connection and can be slower as compared to desktop based games. The game is currently a single player game and can be enhanced to a multiplayer game. Currently the game is in italian and in future can be provided with an option to choose the desired language. Roulette game currently has no bonus related features and this can be further added. The game can also have chat feature, which can help the player to interact with other player in real time. The game can also be developed as mobile casino game.

67

References
Books Learning ActionScript 3.0 by Rich Shupe with Zevan Rosser ActionScript 3.0 Game Programming University by Gary Rosenzweig JBoss in Action by Javid Jamae & Peter Johnson EJB in Action by Debu Panda, Reza Rahman, Derek Lane Websites www.netent.com http://en.wikipedia.org www.sisal.it/online/Casino www.stackoverflow.com

68

You might also like