All pastes #269003 Raw Edit

Something

public text v1 · immutable
·published 2006-12-06 05:28 UTC
rendered paste body
public class CrapsGame
{
	private static int point;
	private Dice dice1;
	private Dice dice2;

	public CrapsGame()
	{
		point = -1;
		dice1 = new Dice(6);
		dice2 = new Dice(6);
	}
	
	public int rollDice()
	{
		int sides1 = dice1.roll();
		int sides2 = dice2.roll();
		return sides1+sides2;
		System.out.println(sides1 + sides2);
	}
	
	public void play()
	{
		point = rollDice();
		if(point == 7 || point == 11)
		{
			System.out.println("wiNneR");
			return;
		}
		else if(point == 2 || point == 3 || point == 12 )
		{
			System.out.println("loseR");
			return;
		}
		else
		{
			boolean booleanVariable = true;
			do 
			{
				int roll = rollDice();
				
			if(roll==point)
			{
				System.out.println("you win");
				booleanVariable = false;
			}
			else if(roll == 7)
			{
				System.out.println("you lOsT");
				booleanVariable = false;
			}
			
			}while(booleanVariable);
		}

	}
}



ERRORS ARE:
CrapsGame.java:19: unreachable statement
                System.out.println(sides1 + sides2);

\CrapsGame.java:20: missing return statement
        }
        ^
2 errors

Process completed.