Tuesday, April 2, 2019
Analysis Of Scrabble, The Board Game
Analysis Of Scrabble, The Board GameScrabble is a intelligence service building multisubstance abuser impale that consists of roofing tiles which atomic round 18 distributed to the wanton awayers. Scrabble zippy stack grow two to four instrumentalists and the ultimate objective is to form cross names on the scribble shape up.Scrabble identity cardThe placard is of 15*15 squ ar grids. at that endow ar ex operationly 100 tiles available in which 98 of them be marked tiles which be alphabets from A-Z and two anonymous earn blank tiles and each alphabet is attached a puddle and a blank letter is given 0 doses.In scrawl, each letter have different take to be depends on the frequency of its usage. Blank tiles can be a successor for any letter.Tile Values earns Q,Z have 10points garner j, x have 8 pointsLetters f,h,v,w and y have 4 pointsLetter k have 5 pointsLetters b,c,m,p have 3 pointsLetters d,g have 2 pointsLetters a,e,i,o,u,s,t,r,n,l have 2 points each superf luous pointsIn the scrawl board we have some squ atomic number 18s represent multipliers. If a tile is situated on those squares the tile survey is doubled or tripled based on the type of square.Double letter score If a tile is placed on this square space the tile value is doubled, mostly these cells are in light blue colour on scrabble boardTriple letter score If a tile is placed on this square space the tile value is tripled, gener anyy these cells are in dark blue colour on scrabble boardDouble enunciate earn If a player place a playscript on maven of these squares, the value of the entire term is doubled.generally, these are lay out diagonally towards the four corners of the scrabble board and these cells are in light red/pink colour.Triple word Score If a player place a word on one of these squares, the value of the entire word forgeting be tripled. Generally, these are found on all the sides of the board equidistant from all the corners of the scrabble board.http// www.scrabblepages.com/scrabble/rules/Course of the gameThe players are signly given a torture with vii letter known as tiles placed on a crush which can be convertd from the bag which already consists of the tiles that act as warehouse for storing the letter. To frame a word on the scrabble board, we should place a tile from the rack connecting at least(prenominal) single(a) tile which is already placed on the board. New tiles will be placed on the rack from the sack, based on the number of tiles placed on the board. Each letter will have different point value, so the game strategy is to play linguistic communication with high scaling letter combinations. (Scrabble rules, 2010).A Dictionary is used to check whether the dustup form by the players are valid or not. A player can Pass his chance to opponent. Also we will have another right smart that when a player clicks on exchange acquittance (for this the player will be given 0 points) it will perform two activities firs t of all it replaces the furbish up of tiles on the rack/stand with new slump of tiles and indeed it will give the turn to the opponent player. If an individual used all his 7tiles on the rack at a time he will be awarded bonus points.AimObjectiveRequirementsLiterature Surveyrandom Number Generation AlgorithmThe algorithmic program is used when the user wants to exchange his entire rack of 7 garner with a new enured of letters from the bag. The user when tries to click the exchange dismission, this algorithm deficiencys to mesh generating the different random letters given to the user for forming a word in his next turn as mentioned in the course of the game. This algorithm can be implement in several ways by using the function Math.random () that generates numbers between 0 and 1. As the letters bespeak to be generated, they can be converted to characters by multiplying with 26 which represents the number of alphabets (Programming Forums, 2010).System ArchitectureThe syst em architecture is useful in the goal or developing games as this process comprises of listing the requirements and decision the paths to meet the requirements. In the current design of scrabble board, the requirements are primarily categorized in two different types. The primary thing is to play the game of scrabble. Next priority is given to the performance of scrabble game with GADDAG or DAWG algorithms. Initial requirement for playing a scrabble are about the software that would be used1. Java, broadcast independent verbiage is used for implementing the gameThe key manakin saddles that are needed for the initial start-up of scrabble a. Board b. Rack c. Dictionary. These are the files which are primarily amenable for the user interface view. The user when executes the java file, these classes are initialized. The class file Board.java consists of a main function which in turn calls the method board (). The variables that might be used in this class are tiles, blocks, word, square, and letters. some other method Rack.java is initialized once the player starts the game. At the time of initialization, the rack consists of seven-spot letters that are taken from the bag that consists of letters that will be distributed to each player based on the count of the number of letters placed on the board. Rack gets exchanged with a new hardened of letters if the player wishes to skip his turn by clicking an exchange button. Bag.java is the class file which fetches the information related to all the letters, their values are stored each this is initiated in preliminary step of Start Game. The bag contains all the 26 letters and blank letters. While playing the impact, the user mouse events need to be noted. So, the methods cringe Clicked (), shiner Released (), black eye Pressed (), Mouse Exited (), Mouse Entered () will be defined based on the required events. The pull in and drop of letters on the board are noted with the help oneself of Mouse Pressed ( ) and Mouse Released (). If the axis co-ordinates are same for some(prenominal) the events, it is noted that the letter is not placed on the board. Else if the co-ordinates are changed, the letters that are placed are noted. When the user hits the play button, event Mouse Clicked () triggers and the result letters that are placed on the board. Thus, the formed word is validated using the dictionary program which will be the implementation of GADDAG algorithm. This can be used in two different situations a. When the user hits play button, it calculates the number of letters that the user placed on the board and those many numbers of random letters are placed on the rack. When the user hits exchange button, the exchange.java program starts here It selects all the letters are drop them in to the database i.e., (Bag) and provide the player with a new bent of letters. Score for each letter and their values are calculated depending on the word formed and tiles under the letter. Logic fo r scoring goes under this sphere where a triple letter or triple word or double letter or double word is calculated.Execution ascendThe design of the scrabble is as follows. The first step would be to show a board, a rack and score with initial values zero(a) for all the players. But initially the rack would be showing the seven letters those need to be on the rack for forming a word. Then, the words are formed using these letters on the rack. The letters that are placed on the scrabble is performed by using the methods Move extension and Go On procedure as explained in the GADDAG algorithm. Moreover, GADDAG algorithm is implemented for the underlying reason of dictionary implementation which validates the word formed. The valid word as mentioned, score of each letter is counted adding all the special tiles (triple or double letter or words).There are certain variables that need to be initialized for the execution of scrabble. There should be a foreclose that identifies the nu mber of letters placed or number of points awarded. Once the user plays his move with the help of Move generation and Go On procedures, the word is set to check for the validity. The variable validity is set to 0 if the word is not valid and a message that the word is invalid is displayed. Else, if the variable is set to 1 then, the Score.java class gets executed. The variable score takes the count of all the points that the player scored and updates the scoreboard for the respective players.Scrabble BoardAdditional FeaturesThe optional requirements of clicking the exchange button that result in the new set of 7 letters on the rack. Here, the score becomes zero for that turn of the player. Here, the program needs to drop the letters from the rack and retrieve new set of letters. One much additive feature that might be present is Help button When this button is triggered, the help button results in showing hints for two letter words that can be easily formed when there is a least c hance for forming a word. Mouse event that needs to be triggered for this exercise is Mouse Clicked ().The final option that needs to be placed on the scrabble board is about Quit button. This triggers the mouse event Mouse Exited () which will prompt the user if he really wants to quit from the game with a menu options of Yes or No. There is one more way to finish the game. When all the tiles are used and there are no ways in which the tiles can be used for forming a word. The number of points that come from these letters that are present on the rack are calculated. These points are deducted from the total score on the scoreboard. Then, the final advance are compared with each player and the player with more points is considered to be the success which is obvious result for a game.Technical SpecificationsA scrabble board will be designed with the help of swings or Java server Pages to form a 15*15 tiles board. The board that consists of tiles need to be filled with letters which are represented as images that have score for each corresponding letter. All the letters are stored in a database (mysql) which can be retrieved from the database using the concept of JDBC (Java Database Connectivity). While placing the tiles the concept of counter decrementing or incrementing is used for keeping the timer. Java Server Pages helps the user to design certain web applications in the form of static and dynamic components. The features of JSP engineering include constructs that would be used for accessing server side objects and the code is written in text based documents that consists of the responses and requests from and to the server respectively. Swings provide multiple platform independent interfaces that may interact the users and GUI components. These APIs can be imported from the package import javax.swing.* JDBC is a Java API that can be used in accessing tables and entities which are stored in a relational database. These code and technical specifications c an be implemented in user genial interfaces namely Eclipse or NetBeans IDE software where the code can be written to make easier manner of implementation (Java, 2010). examTesting is a part of software development lifecycle. Life cycle of a test identifies what activities should carry out and when to accomplish those activities. Testing plan should identify the areas to be tested and also it should calculate the risk associated with the implementation. Testing need to be carried until it reaches a checkpoint without any errors.We have different types of testing like unit testing, black box testing, white box testing, Integration testing, End-to-end testing, alpha testing, functional testing,compatable testing etc.Types of Software Testing Different Testing Types with Details
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.