45
Baloot Game by Ismail Mohammed Bahkali M.S., University of Colorado at Colorado Springs, 2014 BS, <degree> , year Your previous degree A project submitted to the Graduate Faculty of the University of Colorado at Colorado Springs in partial fulfillment of the requirements for the degree of Master of Science Department of Computer Science 2014

List of Figures - University of Colorado Colorado Springs · Web viewBS, , year Your previous degree A project submitted to the Graduate Faculty of the University of

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

Baloot Game

by

Ismail Mohammed Bahkali

M.S., University of Colorado at Colorado Springs, 2014BS, <degree> , year Your

previous degree

A project submitted to the Graduate Faculty of the

University of Colorado at Colorado Springs in partial fulfillment of the

requirements for the degree of

Master of Science

Department of Computer Science

2014

Page 2: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

© Copyright By Ismail Mohammed Bahkali 2014All Rights Reserved

Page 3: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

This project for the Master of Science degree by

Ismail Mohammed Bahkali

has been approved for the

Department of Computer Science

By

____________________________________Dr. Sudhanshu K. Semwal, Chair

____________________________________Dr. Edward Chow

____________________________________Dr. Kristen Walcott-Justice

__________ Date

Page 4: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

Bahkali, Ismail Mohammed (M.S., Computer Science)

Baloot Game

Project directed by Professor Sudhanshu K. Semwal

This paper presents a desktop application project called Baloot. Baloot utilizes a training

method combined with reality one to create an interactive game that is as usable for visually

impaired users as it iswell as for real players. The application implements a popular cards game

in Saudi Arabia. Baloot is a common game played at social gatherings involving , friends and

coworkers. This system allows for the visually impaired user to interact in the social

environment without any additional assistance needed to participate in the group activity. The

project consists of three levels depending on how professional the gamer is. The first level is

"Easy" where the player can see his teammate's and his opponents' cards. The next level is

"Medium". In this level the player has the chance to see only his teammate's cards. Finally, the

last level which is "Hard". iIn the “Hard”is level, the player is not allowed to observe anything

but his/her won cards. The project also includes bonuses and points summation after every

round. Training allows the player to recognize the conditions of each round.

<Some conclusive statement on the effectiveness of the training, the performance of the design.>

Page 5: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

CONTENTS

CHAPTER

LIST OF FIGURES........................................................................................................7

1 INTRODUCTION.......................................................................................................8

1.1 Motivation......................................................................................................8

1.2 Purpose of the Game......................................................................................9

1.3 What is Baloot Game?...................................................................................9

2 BALOOT CRITERIA...............................................................................................10

2.1 Number of the Game Cards.............................................................................10

2.2 Classic Baloot Game's.....................................................................................11

2.2.1 Sun Suit (Normal).........................................................................................12

2.2.2 Hokum Suit (Trump)....................................................................................12

2.2.3 Sun Suit Card Values....................................................................................13

2.2.4 Hokum Suit Card Values..............................................................................13

2.3 Baloot Rules.....................................................................................................14

2.3.1 Ashkal...........................................................................................................14

2.3.2 Kawash.........................................................................................................15

2.3.3 Second Round of the Game..........................................................................15

3 PLAYING AND SCORING CRITERIA................................................................16

3.1 Playing.............................................................................................................16

3.2 Scoring Criteria................................................................................................17

3.2.1 Sun Round....................................................................................................17

3.2.2 Hokum Round...............................................................................................17

3.2.3 Regular Cards...............................................................................................18

3.2.4 Judge Cards...................................................................................................18

Page 6: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

3.3 Projects Criteria...............................................................................................18

3.3.1 Sira Declarations and Bonus.........................................................................18

3.3.2 50 Declarations and Bonus...........................................................................19

3.3.3 100 Declarations and Bonus.........................................................................19

3.3.4 400 Declarations and Bonus.........................................................................19

3.3.5 Baloot Declarations and Bonus....................................................................20

3.4 Important Points...............................................................................................20

3.4.1 Double...........................................................................................................20

3.4.2 Three.............................................................................................................21

3.4.3 Four...............................................................................................................21

3.4.4 Gahwa...........................................................................................................21

3.4.5 Kaboot...........................................................................................................21

4 BALOOT ALGORITHM.........................................................................................22

5 BALOOT IMPLEMENTATION.............................................................................23

5.1 Implementation Details of a Desktop Application..........................................23

5.2. Supporting Languages....................................................................................25

6 FUTURE WORK......................................................................................................26

7 CONCLUSION..........................................................................................................27

Edward Chow, 04/16/14,
Should be a separate section right after the table content.
Page 7: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

List of Figures

Figure 1-1 Game Screen Main Menu

Figure 1-2 All 4 Players Sitting Position

Figure 2-1 8 Cards for Each Player

Figure 2-2 Baloot Forming Team

Figure 2-2-3 Sun Suit Card Values

Figure 2-2-4 Hokum Suit Card Values

Figure 3-2-3 Regular Cards

Figure 3-2-4 Judge Cards

Figure 3-3-1 Sira

Figure 3-3-2 50

Figure 3-3-3-1 100 of 4 Cards

Figure 3-3-3-2 100 of 5 Cards

Figure 3-3-4 400

Figure 3-3-5 Baloot

Page 8: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

1 Introduction

1.1 Motivation

Nowadays, with many new ages technologies, consumers are looking to become

professional in games by trying to understand the game very fastquickly. There are many

games around the world that can be understood or not depending on which language they are

using or how the implementation of the game is. One time, one of my friends was looking

for other people to play with him where no response was received resulting to play with

himself which was so boring. He used different rules which was not the game itself but it

was useful for him to improve his knowledge, strategies and tactics to become a professional

in that game. So, it was worth to play it even it was boring on that way.

I decided to implement the same game having both a training session letting him the user

collect <what?> as much as possible to increase his knowledge and to play the game without

looking for others if he wants to play it at any time at any place. Taken together, Tthese

factors makeare goals of the potential applications to be existedthe Baloot game application.

Page 9: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

Figure 1-1 Game Screen Main Menu

1.2 Purpose of the Game

The purpose of this project is to create an application that makes you play a multi-persons

game by yourself, anywhere, any time. As we live in the golden age of the software games,

there has been alwaysis a need for desktop applications of the most popular games in your

region and in my case Baloot is one of the most wanted games in Saudi Arabia. The rules of

Baloot require four players otherwise it cannot be played. TEach two players will form a

team. Each team member will set across each other as Figure 1 below.

Figure 1-2 All 4 Players Sitting Position

Page 10: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

By the time going on, life becomes harder and every person is busy minding his/her own

businesses and it is sometimes hard to find additional three players and some other times you

don't find the playing cards or you don’t want to spend money on it. It will help to educate

and entertain the players in the same time where while the main point of the game is to

practice interpersonal skills. That's why a software application of Baloot Game is needed.

1.3 What is Baloot Game?

Saudi Arabia is known as a rich country around the world having a lot of money through

the petrol income. Many people do not know what Saudi Arabia as a country is.

The main motivation of this project is to implement an interpretation of the game called

Baloot which is extremely popular in Saudi Arabia.

The Baloot game is played all over in the Arab countries for generations and part of the

fabric of the society. It provides a social weekend activity enjoyed by family and friends.

This game is similar to a French game named as Belote [Mcl95], and was created by an

Indian immigrants during the Ottoman Empire. Belote is a French card game. It was started

in the beginning of the 20th century. This game is basically based on a Dutch game. This

game is just like the game Baloot but major difference lies that this Baloot game is played in

Arab countries while Belote is played all over world in different ways with two, three pairs

[Gre13].So the game has historical and cultural roots.

This game is played according to Saudi rules. The commercial importance of such a

game can be illustrated with the following example. Google Company was reported to be

interested in acquiring an online Saudi Arabian version of Baloot for twenty-five million

dollars, but the owner of that website refused Google’s offer. In our version, the game is

Edward Chow, 04/16/14,
The two statement are related to your project.
Page 11: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

implemented as a desktop application. Using a special keyboard for disable people will be

part of the future work.

2 Baloot Criteria

2.1 Number of the Game Cards

If we assume Player 1 is going to be the dealer so he will disturb the cards beginning with

Player 2, Player 3, Player 4 then himself. In total, we have 32 cards. Each card types (Hearts,

Clubs, Diamonds or Spades) has 8 cards which is "7,8,9,10,J,Q,K and A". So, the dealer will

give Player 2 three cards in the beginning then the same to Player 3,Player 4 and himself.

After that he will give Player 2 two cards then the same to Player 3 then the same to Player 4

then the same to himself. One card after giving 5 cards to each player will be shown in the

ground to manage which player will take that card and what suit of the game will be chosen

such as Sun, Hokum or Ashkal.

Page 12: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

Figure 2-1 8 Cards for Each Player

2.2 Classic Baloot Game's

This game has two teams and each team contains two players. Collectively four players

play this game. All sit opposite to one another so that no one can see other player's cards.

Every player is given 8 cards. This shows that total cards are 32 [Jaw13]. There are two suits

to play the game.

Page 13: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

Figure 2-2 Baloot Forming Team

2.2.1 Sun Suit (Normal)

Playing Sun or Ashkal is more powerful than Hokum with 26 points of each round. If the

team who picked Sun or Ashkal gains more points than the other team, both team will share

the points but if the other team gains more points than the team who pick Sun or Ashkal, the

opponents will take all 26 points because the other team is losing this round.

2.2.2 Hokum Suit (Trump)

Playing Hokum is only powerful with the case of which trump the player picked. Even

though the cards of sun are more powerful but if any player plays Hokum card he will take

the four cards. What I mean is any different trump is useless if any Judge card appeared

which allows the player who play it to take the turn and then play. The player is not allowed

to play a Hokum card unless he doesn't have the same suit.

Page 14: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

2.2.3 Sun Suit Card Values

Figure 2-2-3 Sun Suit Card Values

It's organized in sequence. So, each type is having 30 points. 30 X 4 = 120 + 10 points for

last round = 130 Points which means 130 X 2 = 260 / 10 = 26 points " Sun or Ashkal game

points"

2.2.4 Hokum Suit Card Values

Let's assume Hearts is the Hokum so:

Page 15: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

Figure 2-2-4 Hokum Suit Card Values

It's also organized in sequence. So, each type is having 30 points except the Hokum has

62 points. 30 X 3 = 90 + 10 points for last round = 100 + 62 of the Hokum = 162 Points

which means 162 X 1 = 162 / 10 = 16.2 points ~ = 16 points " Hokum game points"

2.3 Baloot Rules

In this game, first dealer is chosen randomly. It’s up to the player to either take the card

as public card by shuffling it once or have a choice to give bottom three cards to his

teammate. If flipping, which is the card appeared to everyone, occurs mistakenly, the player

cannot refuse to take that card. He can refuse only if that card is Ace. The dealer has 32

cards [Gre13].

2.3.1 Ashkal

The dealer has to give three cards to every player i.e. right player, front player then left

player in a counterclockwise order. One card can be shown to public.

Page 16: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

When the dealer has the charge, the right player has the right of taking a public card in

the first round. After, this priority goes to the player on the front then left player and at the

last to the dealer.

Starting counter-clockwise is mandatory as one of the game rules. If the player doesn’t

want to have the public card for him but he needs it for his teammate then he will take three

cards instead of two. This is called Ashkal.

This privilege is given to the dealer and the player at left. The player is forced to take

Sun as a public card if the player calls for Ashkal when the player does not have the

privilege. It is important to note that if the card is an Ace the player cannot say Ashkal but if

he does, and then he will have to buy it as a Sun.

2.3.2 Kawash

If the player has 9,8 or 7 of any suit (color) , he can choose to force every player to leave

their turn and no points are given to each team, it is said Kawesh. Kawash means the dealer

will be the right player next to the previous one. The same will be repeated until the game is

ending by a winner.

2.3.3 Second Round of the Game

If no one chooses in the first round then there is a second one. In the second round if any

player wants to choose Hokum, it is possible only if he wants any different type than the one

taken from public. Buying as the Sun becomes the highest priority so no other player can

buy over him unless he is the one after the dealer which means he has the highest priority

where no one can take the card from him except on Hokum.

Page 17: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

However, if no one chooses in the second round which means none chooses to get the

card then the game will be Kawesh, too. The player on the right of the dealer will take the

cards and become the dealer for the new round. If a player takes Hokum, he gets the option

to choose among three suits. But this act must occur before lifting the two cards that the

dealer just gave. If the card is a Sun when the player lifts it up the two cards before naming

suit for Hokum.

Taking card as public card, the dealer continues to give other cards to all players making

a counter-clockwise movement. Two cards for the person who has taken a public card and

three cards for those who have not taken a public card.

3 Playing and Scoring Criteria

3.1 Playing

There must be a dealer to start the game. It doesn't matter who is going to be the dealer

but the game will go counter-clockwise. If we assume Player 1 is going to be the dealer so

he will distribute the cards beginning with Player 2, Player 3, Player 4 then himself. In total,

we have 32 cards. Each card types (Hearts, Clubs, Diamonds or Spades) has 8 cards which

are "7,8,9,10,J,Q,K and A". So, the dealer will give Player 2 three cards in the beginning

then the same to Player 3 then the same to Player 4 then the same to himself. After that he

will give Player 2 two cards then the same to Player 3 then the same to Player 4 then the

same to himself. One card after giving 5 cards to each player will be shown in the ground to

manage which player will take that card and what suit of the game will be chosen such as

Sun, Hokum or Ashkal.

Page 18: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

Let's assume Player 1 is the dealer. After delivering every one 5 cards and public card is

shown to all, the dealer will say "First" which means Player 2 will have priority to take the

public card first either Sun or Hokum. In case he said "Pass", Player 3 will take the priority

next either Sun or Hokum. In case he said "Pass", Player 4 will take the priority next either

Sun or Hokum for himself or saying Ashkal which means Sun but sending the card to Player

2. In case he said "Pass", the dealer "Player 1" will take the priority next either Sun or

Hokum for himself or saying Ashkal which means Sun but sending the card to Player 3. This

is in the first round.

In the second round will be the same but the Hokum case will be different that’s he can

pick any different type of cards except the type in public. That's mean in the first round in

case of Hokum the same type will be the one.

In case no one pick anything in the second round this case called "Kawash".

3.2 Scoring Criteria

In total, the game will end in case any team reach 152 points. If both team reach 152, the

game will continue until one of them is higher than the other.

3.2.1 Sun Round

Playing Sun or Ashkal is more powerful than Hokum with 26 points of each round. If the

team who picked Sun or Ashkal gain more points than the other team, both team will share

the points but if the other team gains more points than the team who picks Sun or Ashkal,

they will take all 26 points because the other team is losing this round.

Page 19: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

3.2.2 Hokum Round

Playing Hokum is only powerful with the case of which trump the player picked. Even

though the cards of sun is powerful but if any player play Hokum card he will take the four

cards. What I mean is any different trump is useless if any Judge card appeared which

allows the player who play it to take the turn and then play.

3.2.3 Regular Cards

Figure 3-2-3 Regular Cards

3.2.4 Judge Cards

Figure 3-2-4 Judge Cards

3.3 Projects Criteria

There is extra points will be added to each round in case there is Projects. In the game we

have different kind of projects such as:

3.3.1 Sira Declarations and Bonus

Sira "Consisting of 3 cards of the same type in sequence" gaining 4 points in case of Sun

and 2 points of Hokum.

Page 20: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

Figure 3-3-1 Sira

3.3.2 50 Declarations and Bonus

50 "Consisting of 4 cards of the same type in sequence" gaining 10 points in case of Sun

and 5 points of Hokum.

Figure 3-3-2 50

3.3.3 100 Declarations and Bonus

100 "Consisting of 4 cards of 10's, Jacks, Queens or Kings from different types " or

"Consisting of 5 cards of the same type in sequence" gaining 10 points in case of Sun and 5

points of Hokum. Note: 7's , 8's and 9's are not 100.

Figure 3-3-3-1 100 of 4 Cards

Page 21: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

Figure 3-3-3-2 100 of 5 Cards

3.3.4 400 Declarations and Bonus

400 "Consisting of 4 cards of Ace from different types" gaining 40 points in case of Sun

only. In case of Hokum it's called 100 gaining 10 points.

Figure 3-3-4 400

3.3.5 Baloot Declarations and Bonus

Baloot "Consisting of 2 cards of the same type" gaining 2 points only in case of Hokum.

It is Queen and King of Hokum that be chosen to be played. There is no Baloot in case of

Sun or Ashkal. Also, the cards must be together with any player saying Baloot before

playing the last card of these 2 cards. If Hokum is being chosen to be Hearts, Baloot will be

as shown below.

Figure 3-3-5 Baloot

Page 22: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

3.4 Important Points

3.4.1 Double

In case of Sun or Ashkal:

When one team reach 100 points or greater having the other team below 100, double is

allowed for the team whom below 100 where the other team above or equal 100 choose

either Sun or Hokum. In the other hand, if both teams are 100 or higher, no one can double

in case of Sun or Ashkal. It's restricted. The points will be 26 X 2 = 52 points. That is the

team that gains more points takes the whole 52 points and none for the other team. Bonuses

are doubled as well.

In case of Hokum:

At any time, any team pick Hokum is allowing the other team to double the game before

rising or seeing any cards from the player or the team who asking for double. The team

whom double can let the game being "Open" which allows the Judge cards to be played at

any time or "Closed" which doesn't allow the Judge cards to be played unless the player

doesn't have the same card in public or his teammate doesn't said "Eikah". Eikah means you

give your teammate an option to not play any judge card unless the player before him play

one and he doesn't have any other option. It can be said if all higher cards of the same type

have been played. The points will be 16 X 2 = 32 points. Bonuses are doubled except for

Baloot. Note: Baloot will count only 2 points.

3.4.2 Three

When the team who choose either Sun, Ashkal or Hokum then the other team Double the

game, the team who pick either Sun, Ashkal or Hokum has an authority to rise the game by

Page 23: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

saying "Three". In case of Sun, the points will be 26 X 3 = 78 points. In case of Hokum, the

points will be 16 X 3 = 48 points.

3.4.3 Four

The same for double but in Hokum the game is always "Open". In case of Sun, the points

will be 26 X 4 = 104 points. In case of Hokum, the points will be 16 X 4 = 64 points.

3.4.4 Gahwa

It means the team who win this round will win the game. It doesn't matter the points that

gain before.

3.4.5 Kaboot

In case of Sun or Ashkal:

When a team collecting all 32 cards in Sun or Ashkal, the team will gain 44 points and

the other will be 0.

In case of Hokum:

When a team collecting all 32 cards in Hokum, the team will gain 25 points and the other will be 0.

4 Baloot Algorithm

As the game consists of two teams and each team have two players. 32 Cards are used to

play in Baloot, 8 cards to each player. Game is played in either SUN or HOKUM mode.

Each mode has different scoring point’s technique. This all criteria are described in

algorithm programming.

Here is the algorithm of the programming:

Page 24: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

1. First of all, when the user clicks on the card, the selected card is placed at the specific

location on the deck as depicted in the following code:

if (currentPlayer == 1){

// place at the bottom of the deckc.Location = new Point((DeckPanel.Width / 2) - (c.Width / 2), (DeckPanel.Height - c.Height) - 30);

}else if (currentPlayer == 2){

// place on the right of the deckc.Location = new Point((DeckPanel.Width - c.Width) - 30, (DeckPanel.Height / 2) - (c.Height / 2));

}else if (currentPlayer == 3){

// place at the top of the deckc.Location = new Point((DeckPanel.Width / 2) - (c.Width / 2), DeckPanel.Top + 20);

}else if (currentPlayer == 4){

// place on the left of the deckc.Location = new Point(30, (DeckPanel.Height / 2) - (c.Height / 2));

}

roundScore += crd.card.score;

// find bigger cardif (highestCard != null){

if (crd.card.type == highestCard.type) { if (crd.card.IsHigher(highestCard)) { highestCard = crd.card; winnerPlayer = currentPlayer; } }}else{

highestCard = crd.card; winnerPlayer = currentPlayer;}

2. When all the players played their moves, the score is summed and winner of that round

is given a total round score

if (DeckPanel.Controls.Count >= 4){

roundNo++;lblRound.Text = "[Round:" + roundNo.ToString() + "]";

Page 25: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

// add score in tricksif (winnerPlayer == 1 || winnerPlayer == 3) {

// team A winslblTeamATricks.Text = Convert.ToInt32(lblTeamATricks.Text) +

roundScore).ToString(); lblTeamAProjects.Text = WinnerPlayer._projects.GetTotalProjects().ToString(); lblMode.Text = "Team A Wins the Round";

}else if (winnerPlayer == 2 || winnerPlayer == 4){

// team B winslblTeamBTricks.Text = (Convert.ToInt32(lblTeamBTricks.Text) + roundScore).ToString();lblTeamAProjects.Text = winnerPlayer.player._projects.GetTotalProjects().ToString();lblMode.Text = "Team B Wins the Round";

}

3. When all the rounds are finished, the scores are calculated for the game and allocated to

the winner of that game

if (roundNo > 8){

// add 10 to team that take the last trick and won int teamATotal = Convert.ToInt32(lblTeamATricks.Text); int teamBTotal = Convert.ToInt32(lblTeamBTricks.Text);

if (winnerPlayer == 1 || winnerPlayer == 3)teamATotal = Convert.ToInt32(lblTeamATricks.Text) + 10;

else teamBTotal = Convert.ToInt32(lblTeamBTricks.Text) + 10;

if (lblTeamATricks.Text.Length >= 2) { if (lblTeamATricks.Text.Substring(lblTeamATricks.Text.Length - 1, 1) != "5") {

teamATotal = Convert.ToInt32(Math.Round(Convert.ToDouble(teamATotal) / 10, MidpointRounding.AwayFromZero));

teamATotal *= 10; } } else { if (teamATotal / 5 != 1) {

teamATotal = Convert.ToInt32(Math.Round(Convert.ToDouble(teamATotal) / 10, MidpointRounding.AwayFromZero));

teamATotal *= 10; } }

if (lblTeamBTricks.Text.Length >= 2) {

Page 26: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

if (lblTeamBTricks.Text.Substring(lblTeamBTricks.Text.Length - 1, 1) != "5") {

teamBTotal = Convert.ToInt32(Math.Round(Convert.ToDouble(teamBTotal) / 10, MidpointRounding.AwayFromZero));

teamBTotal *= 10; }

}

else { if (teamBTotal / 5 != 1) {

teamBTotal = Convert.ToInt32(Math.Round(Convert.ToDouble(teamBTotal) / 10, MidpointRounding.AwayFromZero));

teamBTotal *= 10; } }

teamATotal = (teamATotal * 2) / 10; teamBTotal = (teamBTotal * 2) / 10;

// show in totals if (teamATotal > teamBTotal) { lblTeamATotal.Text = (teamATotal + teamBTotal).ToString(); lblTeamBTotal.Text = "0"; } else if (teamBTotal > teamATotal) { lblTeamBTotal.Text = (teamATotal + teamBTotal).ToString(); lblTeamATotal.Text = "0"; } else if (teamATotal == teamBTotal) { lblTeamATotal.Text = teamATotal.ToString(); lblTeamBTotal.Text = teamBTotal.ToString(); }

scoreboard.ShowScore(Convert.ToInt32(lblGameNo.Text), teamATotal, teamBTotal); scoreboard.ShowDialog(); RestartGame(false);}

4. The new game is started with the new cards given to each player

// shuffle cardsGlobals.Shuffle(Globals.PlayingCards);Card[] myCards = new Card[32];Globals.PlayingCards.CopyTo(myCards);Globals.deck = myCards.ToList<Card>();

// initialize all players and start gamecurrentGame.players[0].AddCards(5);currentGame.players[1].AddCards(5);currentGame.players[2].AddCards(5);currentGame.players[3].AddCards(5);

Page 27: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

// place firt card in center of deck paneldealerNo++;if (dealerNo >= 4) dealerNo = 0;

Globals.currentDealer = dealerNo;Globals.center_card = Globals.deck[0];Globals.deck.RemoveAt(0);

// place first card in the center ctlCard crd = new ctlCard(); crd.card = Globals.center_card; crd.showCard = true; crd.Size = new Size(Globals.CardWidth, Globals.CardHeight); crd.Location = new Point((DeckPanel.Width - crd.Width) / 2, (DeckPanel.Height - crd.Height) / 2);

At the end of any round in the game, the score is calculated in the above depicted fashion.

Each team score is added to their projects and then showed on another control in the form.

Then their projects and round scores are initialized again for next round. At the end, the

winner is declared.

5 Baloot Implementation

5.1 Implementation Details of a Desktop Application

The game is implemented as a desktop application because the desktop is a computing

resource that is available freely. Also, both mobile and online versions are commercially

available. Desktop applications have wide range of advantages [Rtt11], such as:

1. It does not require any updating.

2. It has the best user experience because it has no performance problems. It is

usually faster when compared to performance with browser applications.

Page 28: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

3. The desktop application does not require any internet-connection. This shows

desktop applications have no limitations just like web applications.

4. The application can be run easily on a single machine after installation.

Most of the users don’t want to update their applications because they find the older

version attractive and interesting. In mobile applications the versions keep coming

continuously so the developers have to make the updates for their application for the

respective version of android but, in desktop applications users don’t have to update their

applications because it is does not require any updates. So, in this Baloot application we

prefer the desktop application instead of mobile application because it would be easy to use

and does not require any updates. In mobile applications when the update is available for the

particular game then most of the updates are not compatible with the person’s mobile so

desktop application is better to use because it’s simple. In this project desktop application is

preferable because it is use friendly as compared to the mobile application.

The world is changing because of the rise of technology. A lot of people are using smart

phones but there is vast majority of people who are not using smart phones and are still

working on desktops. So, this application will help those people and they will get relaxed by

playing Baloot game on their desktops. Like if they are exhausted by doing a lot of office

work then they can play Baloot game to refresh their minds in order to continue their office

work. This game is a simple one; even kids can play this game by reading the instructions. So

this is the game which is user friendly and can be easy to play.

This game is better in performance as compared to other applications. This is because

there is no performance problems in this application and it gives the user a faster

environment to play the game. Most of the application didn’t give fast experience and they

Page 29: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

usually hangs while running the application and this is the result of performance problems.

This application didn’t consume much of your desktop RAM which gives the user the

efficient environment to use other desktop application and browsing application. So, there is

no chance that user’s system get hang by using this game application.

Another important factor is the internet connection; this game application does not

require internet connection for using the application. Almost all the web applications require

the internet connection in order to use them. So, this is the main advantage of desktop

applications and user can use this Baloot desktop application without internet connection.

There are some web applications for Baloot game but many users cannot play the Baloot

game because it requires the internet connection. So, this desktop Baloot game application is

for those people who didn’t have internet connection most of the time but they want to play

the Baloot game. Mostly, people in remote areas cannot access the internet most of the time

using the desktop applications. This Baloot game application is the nice addition for these

people and they can enjoy this game in the spare time without the internet connection. So, the

main purpose to make a Baloot game as a desktop application is to make sure that majority of

the people have an access to this game and that is why desktop application is preferable over

web application.

To play this game user just have to install the desktop application on the system and can

easily run the game on the desktop. This is the simplest way and we can call this a user

friendly application because user doesn’t have to follow the difficult steps. This actually

looks very simple as compared to the web applications. User has to follow easy steps of

installation and the application is ready to use. User can play the game after an easy

installation is done.

Page 30: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

So, these are some of the advantages of the desktop application and with this reason,

desktop application of Baloot game is preferred instead of web or mobile application.

5.2. Supporting Languages

This project uses two languages

1. English for main interface.

2. Arabic by adding an icon in the main interface to change the display option.

Language is an important factor in order to understand the game. English is basically the

international language so most of the people in this world understand English. So, the main

interface of this game is in English. The instructions are also in English language so that it

would be easy for the users to understand the game properly and then they can enjoy by

playing the Baloot game. Another important reason to add the English language is to ensure

that most of the people can understand the game. Basically this Baloot game is mostly

played in Arab countries. So, in order to introduce this entertaining game to the western

people English language is used in the main interface. The other part of the world where

English is the second language can also understand and play this game.

Arabic language is also included in the main interface. Most of the people of Arab use to

play the Baloot game in their spare time with their friends and family. So, this project can

cater those Arab peoples who want to play the Baloot game on their desktop computer. In

the main interface an icon is added for the Arabic language, user can switch from English to

Arabic language by this icon. After changing from English to Arabic user can see all the

information written in Arabic language and this is very helpful for the Arabic people

because most of the Arabic people don’t understand English. So this Arabic display gives

Page 31: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

the Arabic users an easy environment to play their favorite Baloot game. Users can see all

the tutorials in Arabic language and they can understand the game very easily.

So, the main reason to include both languages is to make this desktop application more

users friendly. This project is catering most of the people of the word due to the inclusion of

two main languages English and Arabic.

6 Future work

The work performed in this project provides the basis for the future work. Once

implemented as desktop application, the game would be extended to include specific

interaction for the disability community. It's going to equalize people whom interesting to

play any type of card games. A disable keyboard will be made so that disabilities can easily

access this game. This keyboard will have the ability to make disable people playing the

game normally.

7 Conclusion

This paper has presented the Baloot Game. Baloot game is a card game having 4 players

and 32 cards where every player has to have 8 cards in total having 3 different types where

is Sun, Ashkal or Hokum. Reaching 152 points for any of the teams will be announced as

winner and the other team will be loser. Implementing a desktop application to teach and

give instruction of the game can be shown in the .exe file of the game after installing.

Searching for other 3 players is not mandatory due to availability of automated one's. Also,

understanding the game after the training will improve and gain skills to play without

difficulty. Having different mode such as Easy, Medium and Hard will train the player as a

Page 32: List of Figures - University of Colorado Colorado Springs · Web viewBS,  , year Your previous degree A project submitted to the Graduate Faculty of the University of

realistic game. The more you play, the more you learn strategies and tactics of playing the

game.

Works Cited

[Mcl95] © John McLeod, 1995, 1998, 2004, 2010. http://www.pagat.com/jass/belote.html

[Jaw13] Jawker, 2013. Rules of Baloot. http://www.jawaker.com/en/rules/baloot

[Rtt11] R tools technology Inc, 2011. Difference between Web and desktop application, technology article. http://web-desktop-application.articles.r-tt.com/

[Gre13] Greentube, 2013.Game twist. http://www.gametwist.com/Card-Games/Baloot/Rules.html

[Qui13] The picture of the game. http://www.quirkat.com/site/our-games/basha-card-games/

[Kam14] Kammelna, official website of Baloot Game. http://www.kammelna.com/

[Ibt14] Ibtikar Company. Available at: http://ibaloot.net/