Tuesday, June 4, 2019

Analysis Of Scrabble, The Board Game

Analysis Of scrawl, The Board GameScrabble is a give-and-take building multi exploiter game that consists of tiles which argon distributed to the players. Scrabble game can shit two to four players and the ultimate objective is to form cross dustup on the scrabble carte du jour.Scrabble boardThe board is of 15*15 unbowed grids. There ar exactly 100 tiles available in which 98 of them argon marked tiles which are alphabets from A-Z and two anonymous garner blank tiles and apiece alphabet is given a grade and a blank earn is given 0 points.In scrabble, exclusively(prenominal) letter have several(predicate) revalue depends on the frequency of its usage. Blank tiles can be a substitute for any letter.Tile ValuesLetters Q,Z have 10pointsLetters 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 eachExtra pointsIn the scrabble board we have some squares repr esent multipliers. If a tile is hardened on those squares the tile value is doubledd or tripled based on the type of square.Double letter take If a tile is placed on this square space the tile value is doubled, gener in ally these cells are in light blue colour on scrabble boardTriple letter set If a tile is placed on this square space the tile value is tripled, generally these cells are in dark blue colour on scrabble boardDouble word Score If a player place a word on one of these squares, the value of the entire word is doubled.generally, these are found 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 will 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 initially given a rack w ith seven garner cognise as tiles placed on a rack which can be exchanged 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 single tile which is already placed on the board. smart 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 words with high scoring letter combinations. (Scrabble rules, 2010).A Dictionary is used to check whether the words create by the players are valid or not. A player can Pass his chance to opponent. Also we will have another way that when a player clicks on exchange button (for this the player will be given 0 points) it will perform two activities Firstly it replaces the set of tiles on the rack/stand with new set of tiles and then 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 exploiter wants to exchange his entire rack of 7 letters with a new set of letters from the bag. The user when tries to click the exchange button, this algorithm needs to run generating the different random letters given to the user for forming a word in his next turn as mentioned in the black market of the game. This algorithm can be utilise in several ways by using the function Math.random () that generates numbers between 0 and 1. As the letters need to be generated, they can be converted to characters by multiplying with 26 which represents the number of alphabets (Programming Forums, 2010).System ArchitectureThe system architecture is useful in the project or developing games as this process comprises of listing the compulsions and finding the paths to meet the requirements. In the cu rrent design of scrabble board, the requirements are mainly categorized in two different types. The primary thing is to play the game of scrabble. Next priority is given to the implementation of scrabble game with GADDAG or DAWG algorithms. Initial requirement for playing a scrabble are about the software that would be used1. deep brown, platform independent language is used for implementing the gameThe key caste files that are needed for the initial start-up of scrabble a. Board b. Rack c. Dictionary. These are the files which are primarily responsible 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. Another method Rack.java is initialized once the player starts the game. At the time of initialization, the rack consists of seven letters that are t aken 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 set 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 separately this is initiated in feeler step of Start Game. The bag contains all the 26 letters and blank letters. While playing the move, the user mouse events need to be noted. So, the methods pilfer Clicked (), creep Released (), Mouse Pressed (), Mouse Exited (), Mouse Entered () will be defined based on the required events. The drag and drop of letters on the board are noted with the help of Mouse Pressed () and Mouse Released (). If the axis co-ordinates are same for both 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 n oted. When the user hits the play button, event Mouse Clicked () triggers and the result letters that are placed on the board. Thus, the create 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 set of letters. Score for each letter and their values are calculated depending on the word formed and tiles under the letter. Logic for scoring goes under this area where a triple letter or triple word or double letter or double word is calculated.Execution FlowThe design of the scrabble is as follows. The offset printing step would be to show a board, a rack and score with initial values zero 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 generation 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 counter that identifies the number 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 severeness. The variable validity is set to 0 if the w ord 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 more than additional 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 chance for forming a word. Mouse event that needs to be triggered for this action is Mouse Clicked ().The final option that needs to be placed on the scrabble board is about Quit button. This triggers the mouse even t Mouse Exited () which will go 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 scores are compared with each player and the player with more points is considered to be the winner 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). Whil e 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 technology include constructs that would be used for accessing server side objects and the work out 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 act 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 coding and technical specifications can be implemented in user friendly interfaces namely Eclipse or NetBeans IDE software where the code can be written to make easier manner of implementation (Java, 2010).TestingTesting is a part of software development lifec ycle. Life cycle of a testing 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, operating(a) testing,compatable testing etc.Types of Software Testing Different Testing Types with Details

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.