Google
 
Web freesourcecode.blogspot.com
Subscribe to Free Java Source Code !!!

Thursday, March 23, 2006

Housie, Tambola, Bingo Source Code - ( Digitalized )

This site has been moved to http://www.99applications.com
To download code/application click the following link 99applications.com/java_programs and you can also find many c and c plus plus common programs in C & C++ section




Housie is a gambling game played in New Zealand, Australia, and Northern Britain (Southern Britain call it Bingo), where players mark off numbers on a ticket as they are randomly called out. It is very similar to the American game Bingo, however the tickets and the calling are slightly different.

A typical housie ticket is shown to the right. It contains fifteen numbers, arranged in nine columns by three rows. Each column contains either one, two, or very rarely three, numbers. The first column contains numbers from 1 to 9, the second column numbers from 11 to 19, the third 20 to 29 and so on up until the last column, which contains numbers from 80 to 90, the 90 being placed in this column as well). When players first come to the venue (often a church hall, rugby club or other place with sufficient tables and chairs) they must buy tickets or book of tickets. A book usually contains fifty tickets which are played over the course of the night. Players generally play between one and six books. At many venues, special "Super Housie" tickets, usually with much larger prizes, are also played at various times throughout the session. The game is presided over by a caller, whose job it is to call out the numbers and check winning tickets. He will announce the prize or prizes for each game before starting. The two ways of winning a prize are:
  • Full House - covering all fifteen numbers on the card.
  • Line - covering a horizontal line of five numbers on the card. In bonus (Super Housie) games, often three lines may be claimed - top, middle and bottom.

The caller will then say "Eyes down" to indicate that he is about to start. He then begins to call numbers as they are randomly selected, either by an electronic device or by drawing counters from a bag. The calling is generally very fast, with generally one number called per second, can be customized ( 5 seconds ).

As each number is called, players check to see if that number appears on their tickets. If it does, they will mark it.When all the numbers required to win a prize have been marked off, the player calls out "Line" or "House" depending on the prize, and an official will come and call out the numbers on the ticket. The caller will check to see if each number has been called, and if it has, he will say "House correct - please pay out". if not correct, he will say "Bogus..", and ticket is no more useful.

Business of Housie:

In New Zealand and Australia, housie is often used a fundraiser by churches, sports teams, and other groups, and raffles are sold before the game.

Housie or Bingo is an expanding and highly profitable business in the UK, with many companies competing for the customers' money.

These been.

  • Gala Bingo Clubs
  • Mecca Bingo Clubs

As well as offering the familiar Housie/Bingo played by marking numbered books, most large clubs have their tables modified for the playing of cash housie. (Coin slots.) This is highly profitable for the operator, with a typical "take" of fifty percent of the stake.

Caller Slang:

When calling, the caller will usually say both digits on their own first, and then the number itself, for example, three-two, thirty-two. Some callers will use many of these slang terms, others just a few. However, "Kelly's Eye", "Legs Eleven" and "Top of the Shop" are often used, even if none of the others are.

  • Number 1 is "Kelly's Eye".
  • A number between 1 and 9 is called "Number 1, on it's own".
  • Number 10 is "One-oh, Dowling Street".
  • Number 11 is "All the ones, legs eleven".
  • Number 12 is "One-two, just the doz".
  • Any number ending in a zero (20, 30, 40 etc) is called "Two-oh, blind twenty".
  • Any number consisting of two identical numerals (22, 33, 44 etc) is "Twenty-two, all the twos".
  • Number 45 is "Halfway there".
  • Number 69 is "Dinner For Two Sixty Nine"
  • Number 88 is "Two Fat Ladies Eighty Eight
  • Number 90 is "Top of the Shop".
Reference: http://en.wikipedia.org/wiki/Housie

Now, my Work of Getting Housie Going:

Following are some of the outputs of the Thamboa Program, Have a look of it...

Download Free Java Source Code For Thambola here....

Caller's Board

Displaying Finished Numbers

Generating Tickets

Currently working on making this Thambola Game available online ...


Give feedback to improve :)

http://free-source-code.blogspot.com

Monday, March 13, 2006

The Love Calculator !!!!

This site has been moved to http://www.99applications.com
To download code/application click the following link 99applications.com/java_programs and you can also find many c and c plus plus common programs in C & C++ section




Welcome to this great invention of Doctor Love!

We all know that a name can tell a lot about a person. Names are not randomly chosen: they all have a meaning.
Doctor Love knew this so he made another great invention just for the lonely you!

Sometimes you'd like to know if a relationship with someone could work out. Therefore Doctor Love himself designed this great machine for you. With The Love Calculator you can calculate the probability of a successful relationship between two people. The Love Calculator is an affective way to get an impression of what the chances are on a relationship between two people.

This is just a fun application. Dont take it seriously.

Note: This is a funny logic in this testing if this example has caused any problems, please excuse me its only meant for fun!

Download API & Java Source Code For Love Calc here....

/**************************************************************************/
Java Program - Love Calculator
Author@ Krishnakanth Soni
Feedback@ sonikrishnakanth@gmail.com

Usage: java Love rama sita
/**************************************************************************/

import java.util.*;

class Love
{
private String name1;
private String name2;

public void setFirstName( String name1 ){
this.name1 = name1.toUpperCase();
}

public void setSecondName( String name2 ){
this.name2 = name2.toUpperCase();
}

public void setNames( String name1, String name2 ){
this.name1 = name1.toUpperCase();
this.name2 = name2.toUpperCase();
}

private Vector getCount(){
Vector list = new Vector();
String love = "LOVE";
String name1 = this.name1;
String name2 = this.name2;
for( int i=0; i<name1.length(); i++ ){
String temp = name1.charAt(i) + "";

if( list.contains(temp) ){
int indexOfElement = list.indexOf( temp );
int prevCount = Integer.parseInt( list.get(++indexOfElement).toString() );
prevCount++;
String newCount = (prevCount) + "";
list.set( indexOfElement, newCount );
continue;
}

list.add( temp );
list.add( "1" );
}

for( int i=0; i<name2.length(); i++ ){
String temp = name2.charAt(i) + "";

if( list.contains(temp) ){
int indexOfElement = list.indexOf( temp );
int prevCount = Integer.parseInt( list.get(++indexOfElement).toString() );
prevCount++;
String newCount = (prevCount) + "";
list.set( indexOfElement, newCount );
continue;
}

list.add( temp );
list.add( "1" );
}

for( int i=0; i<love.length(); i++ ){
String temp = love.charAt(i) + "";

if( list.contains(temp) ){
int indexOfElement = list.indexOf( temp );
int prevCount = Integer.parseInt( list.get(++indexOfElement).toString() );
prevCount++;
String newCount = (prevCount) + "";
list.set( indexOfElement, newCount );
continue;
}

list.add( temp );
list.add( "1" );
}

Vector result = new Vector();

for( int i=1; i<list.size(); i+=2 ){
result.add( list.get(i) );
}

//System.out.println( result );
return result;
}

public int getLovePer(){
Vector count = getCount();
if( count.size() == 1 ){
String result = count.get(0).toString() + "";
return Integer.parseInt(result);
}

if( count.size() == 2 ){
String result = count.get(0).toString() + count.get(1).toString();
return Integer.parseInt(result);
}

do{
Vector sub = new Vector();
int size = count.size() / 2;
//System.out.println( count.size() / 2 );
for( int i=0; i<size; i++ ){
String newC = ( Integer.parseInt( count.get(i).toString() ) + Integer.parseInt( count.get( count.size() - 1 - i ).toString() ) ) + "";

if( newC.length() == 2 )
{
sub.add( (newC.charAt(0) + "") );
sub.add( (newC.charAt(1) + "") );
}else{
sub.add( newC );
}
}

if( (size*2) != count.size() )
sub.add( count.get(size) );

count = new Vector();
count = sub;
//System.out.println( count );
}while( count.size() != 2 );

String result = count.get(0).toString() + count.get(1).toString();
return Integer.parseInt(result);
}

public int getLovePer( String name1, String name2 ){
String temp1 = this.name1;
String temp2 = this.name2;

setNames( name1, name2 );
int lPercentage = getLovePer();
setNames( temp1, temp2 );

return lPercentage;
}

public String toString(){
String result = "[ Love Percentage Between " + this.name1 + " And " + this.name2 + " is " + getLovePer() + "% ]";
return result;
}

public static void main(String[] args)
{
//System.out.println("Hello World!");
Love love = new Love();
if( args.length == 2 ){
love.setNames( args[0], args[1] );
System.out.println( "\n" + love + "\n" );
System.exit(0);
}else{
System.out.println( "\nUse With Proper usage, Find a sample FREINDSHIP Below\n java FriendShip name1 name2 \n" );
}
love.setNames( "krishna", "radha" );
System.out.println( "\n" + love + "\n" );
}
}

Thursday, March 09, 2006

The FriendShip Calculator

This site has been moved to http://www.99applications.com
To download code/application click the following link 99applications.com/java_programs and you can also find many c and c plus plus common programs in C & C++ section




Welcome to this great invention of Doctor Friend!

We all know that a name can tell a lot about a person. Names are not randomly chosen: they all have a meaning.
Doctor Friend knew this so he made another great invention just for the lonely you!

Sometimes you'd like to know if a relationship with someone could work out. Therefore Doctor Friend himself designed this great machine for you. With The Friendship Calculator you can calculate the probability of a successful relationship between two people. The Friendship Calculator is an affective way to get an impression of what the chances are on a relationship between two people.

This is just a fun application. Dont take it seriously.

Note: This is a funny logic in this testing if this example has caused any problems, please excuse me its only meant for fun!

Download API & Java Source Code For Friendship Calc here....

/**************************************************************************/
Java Program - Friendship Calculator
Author@ Krishnakanth Soni
Feedback@ sonikrishnakanth@gmail.com

Usage: java Friendship rama sita
/**************************************************************************/

Output Screen

import java.util.*;

class FriendShip
{
private String name1;
private String name2;

public void setFirstName( String name1 ){
this.name1 = name1.toUpperCase();
}

public void setSecondName( String name2 ){
this.name2 = name2.toUpperCase();
}

public void setNames( String name1, String name2 ){
this.name1 = name1.toUpperCase();
this.name2 = name2.toUpperCase();
}

private Vector getCount(){
Vector list = new Vector();
String friendShip = "FRIENDSHIP";
String name1 = this.name1;
String name2 = this.name2;
for( int i=0; i<name1.length(); i++ ){
String temp = name1.charAt(i) + "";

if( list.contains(temp) ){
int indexOfElement = list.indexOf( temp );
int prevCount = Integer.parseInt( list.get(++indexOfElement).toString() );
prevCount++;
String newCount = (prevCount) + "";
list.set( indexOfElement, newCount );
continue;
}

list.add( temp );
list.add( "1" );
}

for( int i=0; i<name2.length(); i++ ){
String temp = name2.charAt(i) + "";

if( list.contains(temp) ){
int indexOfElement = list.indexOf( temp );
int prevCount = Integer.parseInt( list.get(++indexOfElement).toString() );
prevCount++;
String newCount = (prevCount) + "";
list.set( indexOfElement, newCount );
continue;
}

list.add( temp );
list.add( "1" );
}

for( int i=0; i<friendShip.length(); i++ ){
String temp = friendShip.charAt(i) + "";

if( list.contains(temp) ){
int indexOfElement = list.indexOf( temp );
int prevCount = Integer.parseInt( list.get(++indexOfElement).toString() );
prevCount++;
String newCount = (prevCount) + "";
list.set( indexOfElement, newCount );
continue;
}

list.add( temp );
list.add( "1" );
}

Vector result = new Vector();

for( int i=1; i<list.size(); i+=2 ){
result.add( list.get(i) );
}

//System.out.println( result );
return result;
}

public int getFriendShipPer(){
Vector count = getCount();
if( count.size() == 1 ){
String result = count.get(0).toString() + "";
return Integer.parseInt(result);
}

if( count.size() == 2 ){
String result = count.get(0).toString() + count.get(1).toString();
return Integer.parseInt(result);
}

do{
Vector sub = new Vector();
int size = count.size() / 2;
//System.out.println( count.size() / 2 );
for( int i=0; i<size; i++ ){
String newC = ( Integer.parseInt( count.get(i).toString() ) + Integer.parseInt( count.get( count.size() - 1 - i ).toString() ) ) + "";

if( newC.length() == 2 )
{
sub.add( (newC.charAt(0) + "") );
sub.add( (newC.charAt(1) + "") );
}else{
sub.add( newC );
}
}

if( (size*2) != count.size() )
sub.add( count.get(size) );

count = new Vector();
count = sub;
//System.out.println( count );
}while( count.size() != 2 );

String result = count.get(0).toString() + count.get(1).toString();
return Integer.parseInt(result);
}

public int getFriendShipPer( String name1, String name2 ){
String temp1 = this.name1;
String temp2 = this.name2;

setNames( name1, name2 );
int fPercentage = getFriendShipPer();
setNames( temp1, temp2 );

return fPercentage;
}

public String toString(){
String result = "[ Friendship Percentage Between " + this.name1 + " And " + this.name2 + " is " + getFriendShipPer() + "% ]";
return result;
}

public static void main(String[] args)
{
//System.out.println("Hello World!");
FriendShip fs = new FriendShip();
if( args.length == 2 ){
fs.setNames( args[0], args[1] );
System.out.println( "\n" + fs.toString() + "\n" );
System.exit(0);
}else{
System.out.println( "\nUse With Proper usage, Find a sample FREINDSHIP Below\n java FriendShip name1 name2 \n" );
}
fs.setNames( "krishna", "radha" );
System.out.println( "\n" + fs.toString() + "\n" );
}
}

Home..