Design a game in java, JAVA Programming

Assignment Help:

The game of Kala is played on a rectangular board:

1730_Design a Game in java.png

In front of each player are six pits numbered 1 to 6 (called the 'side pits'). To the right of a player's side pits is a special pit, called the player's 'kala'. Initially, all the side pits contain an equal number of stones. A 'move' consists of taking the stones from one of one's own side pits and distributing them anti-clockwise one-by-one in the other pits, including one's own kala, but not the opponent's kala. There are two rules:

  • Players make moves alternately except when the last stone of a heap being distributed lands in the current player's kala, and the current player is rewarded with another go.
  • If the last stone of a heap moved by a player lands in an empty side pit on the player's own side, that stone together with any stones in the opposite side pit belonging to the player's opponent are won and transferred to the current player's kala. This is referred to as a 'capture'.

The game ends when the player whose turn it is cannot make a move (i.e., all of that player's side pits are empty). Each player's ?nal score is the number of stones in the player's kala plus the number (if any) in their side pits. The player with the higher score is the winner. For a good beginner's game, start with two or three stones in each side pit. Starting with six stones or more in each pit results in quite a diffcult game.


Related Discussions:- Design a game in java

Area under curve , what will be the logic? in C program #include ...

what will be the logic? in C program #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; int numtraps; m

Enumerate the concept of write once run anywhere - java, Enumerate the conc...

Enumerate the concept of write once run anywhere - JAVA Java has introduced concept of WORA (write once run anywhere). When you write a java program it is called source code of

Concept of events and events listeners and events handlers, Question: (...

Question: (a) State and explain clearly FIVE new features of Actionscript 3.0 as compared to Actionscript 2.0. (b) Explain clearly the concept of events and events listen

Program that instantiates a number of actors and writers, Talent agencies l...

Talent agencies like ICM, CAA and Paradigm represent writers, directors and actors (among other talent).  These agencies take in hundreds of millions of dollars a year collecting 1

Convert string to super ascii, A string S is said to be "Super ASCII", if i...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''''a''''-''''z'''') and

Javascript, Write a JavaScript program to prompt the user for the radius of...

Write a JavaScript program to prompt the user for the radius of a sphere and call function sphereVolume to calculate and display the volume of the sphere in the status bar.

Explain different way of using thread, Explain different way of using threa...

Explain different way of using thread? The thread could be executed by using runnable interface or by inheriting from the Thread class. The former is more advantageous, 'cau

Describe validate() and reset() methods, Validate() : Used to validate prop...

Validate() : Used to validate properties after they have been populated; known as before FormBean is handed to Action. Returns a collection of ActionError as ActionErrors. Followin

Explain bean lifecycle in spring framework, 1. The spring container searche...

1. The spring container searches the bean's definition from the XML file and instantiates the bean. 2. Using the dependency injection, spring populates all of the properties as

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd