Design a game in java, JAVA Programming

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.

Posted Date: 2/23/2013 4:28:07 AM | Location : United States







Related Discussions:- Design a game in java, Assignment Help, Ask Question on Design a game in java, Get Answer, Expert's Help, Design a game in java Discussions

Write discussion on Design a game in java
Your posts are moderated
Related Questions
#quThis project is based on the teams example of chapter 1. Instead of teams, you will consider employees working in a department in a company. (Departments and employees are ana

Creating applications based on SOA Select your implementation technologies carefully. Carefully check if Web services are suitable. Sometimes using traditional methods suc

The purpose of this assignment is to give you practice working with one dimensional arrays. It will also introduce you to one of the oldest mathematical algorithms in the world. No


Java Programming 1. Write a program in Java to find the highest of any five numbers. How do you compile and execute this Java program? 2. Write a program to explain the Exce

Java Virtual Machine & Runtime Environment Basic Concept When you write a program in C++ it's called source code. C++ compiler converts this source code into the machine c

Develop a Computer program and application. Project Description: I want a project done. It is a computer desktop application program. It is not very hard. If you need the det

require assistance in Java / Grails support We have a project which requires continuous maintenance / support and occasional feature development. Its running on Java 1.7 / Grail

Question 3 Using this line: var posneg : array [1..15] of integer; Write a program that calculates the number of negative and positive numbers in the array. Users will

J2EE prepares use of the JNDI interface to access different resources like JMS, JDBC, EJB etc. The client finds up for these resources through the JNDI look-up. The JNDI look like