Development of a Windows Based Scrabble Game

Level of Hygiene of Hotels in Mauritius
August 11, 2021
Development of Students through Physical Education
August 11, 2021

Development of a Windows Based Scrabble Game

Abstract

A windows-based scrabble game is developed and implemented, which has having advanced features for the game. The game can be played between human against computer. Human can check the word before placing a word on to the board. There is a functionality to check the words in dictionary. The tools required for the game design are explained below. The game designed must be a good looking, user must understand clearly about the game of scrabble.

During the design phase, an algorithm has been developed for the computer player. The computer player can play the game based on the algorithm by combining dictionary to it. When computer wants to play the game, it will search the word and place the word in the standard dictionary order, by checking the maximum score. When the bag is emptied, the player who posses maximum score is declared as the winner of that respective game.

Introduction

In everyday life millions of people are using internet in worldwide to search data, upload documents and playing games and so on, due to which internet has been a part of daily routine life. Now a day internet has been exposed to all kind of people. Especially internet has been a source of entertainment of all kinds of ages. In which games are the most prominent ones, out of which Chess, Sudoku puzzle, Scrabble etc.

The present report deals with Scrabble game. Scrabble is one of the most popular crosswords games played by millions of people web world. Scrabble game was invented by Alfred M. Butts during 1930s. He used letter frequent counts from newspapers crossword puzzles to distribute the tile and relative point’s values. From common vowels they used 9-12 tiles for less common letter single tile was used [1]. It is usually played by the different age group starting from eight. Opponents’ make play by forming of words on 15 x15 grid board. This game can be played between 2 to 4 players at a time, in present project we deal with two players only. Initially a bag consisting of 100 tiles out of which 98 tiles posses’ letters and two tiles are empty this acts as wild cards; as it is a substitution of any letter, in which seven tiles are randomly selected for each player. Points are subsequently divided respective tiles according to tile points (Tile point figure number). The player who acquires maximum points in total is declared as winner.

The probability of playing game may be either human-human, human-computer. In this report we deal with two players only, that is human and computer. The most essential part of the game is predefining dictionary, as this plays a key role in Scrabble games.Algorithm should be implemented for computer player which will be discussed in later stages.

1.1 Motivation

The motivation for doing this thesis was to understand the gaming concept. It gave me an opportunity to be a part of game technology in web world. I am interested in doing a real time and technical coding project. This gave me an opportunity to learn in detail study of algorithm and gaming concepts. As such games have been a new trend to strengthen our vocabulary. Today, vocabulary plays a major role in carrier opportunities.

1.2 Aim

The aim of the scrabble project is to write a computer program that can play against the human or a computer. We are going to implement a program that supports two types of game formats: human-human and human-machine. “One advantage of playing game with a machine, rather than a person is that the opponent responds immediately with the best possible word, so there is absolutely no waiting time” [2]. After playing a game against the machine, there is a human advantage. Human can say which letters are still remaining and it can hold back letters for further use. For example, while machine is playing the game that can place the words which is having highest number of points. But the human can hold the letter for the future use.

1.3 Objectives

The main objective of the project is to develop a programming code for a game which plays with human- computer interface and machine interface.

The game is designed as follows:

Creating a good gaming environment for the players.

Compile the code so that it is enable to check the score and declare the winner at last.

The following are the essential requirements:

Implementing the code and efficient game playing algorithm for computer player like GADDAG.

Implementing the code and efficient dictionary words storage. Lists concept is been used for dictionary technology to retrieve the words from the text document to GADDAG algorithm to verify the words in dictionary words.

Producing of good GUI’s for this game.

1.4 Challenges

The main challenge of the project is to understand the algorithm and implement in scrabble game. This is a challenging task as the logic of the computer scrabble should be correctly planned. Improper design would lead to expensive process of implementation, as we need to track back to algorithm.

Despite of many games developed, our game developed must be a high quality one which provides a good user interface.

The starting word formed should pass from star tile which gives the points acquired, if not place correctly a dialog box appears saying “word must pass the centre star” which was a prominent challenge I faced.

Other challenging task was to drag and drop the tile on the scrabble board, if not correctly drag and drop the letter restores to rack.

Another key factor is to drag and drop the letter tile to the appropriate cell. When it is not been drag to the appropriate cell it might occupy any surrounding cells.

To know the location of the letter placed on the board was one of the key challenges which I have faced, for which a program was been defined to know the location of the letter.

Another challenge that I faced is to store a dictionary words in the GADDAG algorithm.

In order to know the score of the word formed a separate code was been prepared which was one of the challenges I faced.

Literature Survey

In this section we are go in detail background material and technical specification that we are going to use in our scrabble project. We will start the scrabble history in Section 2.1. In section 2.2 will read the scrabble game and rules. In section 2.2.1 we can know the letter points in Tile points. In section 2.2.2 we will know the game description of scrabble how to play. In section 2.2.3 we will know the game points and the scoring to respective words. In section 2.2.4 will know the game play. In section 2.3 we will know the concepts of algorithms that we can use in our project. Section 2.3.1 will know the concept of anchor square. Section 2.3.2 will know the concept of cross checks. Section 2.3.3 there will be three types of algorithms which we can use any one in our scrabble game for computer player.

2.1 Scrabble History

Scrabble is a game first invented by Alfred Butts. Butt gave an initial idea of the game by the end of year 1931 and named it as a Lexico. This Lexico game was played without a board and players score the points on basis of length of the word. In 1938 butts gave a big breakthrough for game crosswords. He started the idea of combining the letters to the board. Design the board with 15 by 15 square and 7-tiles in each player rack. The same procedure is using from 1938 onwards to till this day. At last the name scrabble for the game and managed to register the trademark on 16th December 1948. In 1991 first world championship take place in London and 2nd takes place in New York City on 1993 [3].

board.png

Figure 2.1: Board of Scrabble game

2.2 Game details and rules

The scrabble board consists of 15-by-15 squares (225 squares) and Single Square is filled with a letter tile. The board consists of Double Word Score (DWS), Double Letter Score (DLS), Triple Word Score (TWS) and Triple Letter Score (TLS). The middle of the board consists of initial Anchor point. The starting word must be placed vertically or horizontally so that the anchor point is included in it. Initially, the game is started by placing a word and is further completed by placing the remaining words across the board.

Initially the bag consists of 100 tiles. Amongst them only 98 tiles consist of letters and two are empty tiles; out of which each letters have scoring in the range of 1-10. Alphabets like vowels are rapidly used ones and thus they have a scoring point of one and the rarely used letters like Q and Z has a scoring of ten. In this way the scores are assigned to each & every letter in the bag. When a player gets an empty tile he selects any alphabetical letter which he requires and gives the chance to his opposition to play the game.

2.2.1 Tile points

Each and every letter has different points, the points are given below:

0 point – Blank Tile.

1 point – A, E, I, L, N, O, R, S, T, U.

2 points – D, G.

3 points – B, C, M, P.

4 points – F, H, V, W, Y.

5 points – K.

8 points – J, X.

10 points – Q, Z. [4]

2.2.2 Game description:

The game is played in the real time as follows:

At the beginning of the game each player is given 7 tiles in which 7 letters are given at random by a bag.

Each player is supposed to pick a meaningful word from the given 7 tiles and placed them on the board. The same is repeated by the 2nd player.

Depending up on the scores assigned to the letters every word will give a specific score for each player.

Depending on the Double Letter, Triple Letter, Double Word, Triple Word scores are assigned to the words at that respective tiles. The player who acquires maximum score at the end is the winner.

Double Letter score: The letter placed on the Double Letter score (DLS) block will be assigned double score for that particular letter placed on it.

For example: TAP

In the above example tile “T” consist of point 1, tile “A” consist of point 1, tiles “P” consist of point 3. If any tiles of the word go in DLS block the score of that tile becomes double. If a tile A=1*2=2 will go on DLS will get score as 2 for that particular tile. Now the overall word score become 6.

Double Word score: The word placed on the Double Word score (DWS) block will be assigned double score for a particular word placed on it.

For example: TAPE