Asignment: #89 Playing BabyBlackJack

Code

 /// Name: Sean Harrison
    /// Period: 7
    /// Program name: BabyBlackJack
    /// File Name: BabyBlackJack.java
    /// Date Finished: 2/19/2016
    

import java.util.Random;
public class BabyBlackJack
{
    public static void main( String[] args )
    {
    int PlayerValue1, PlayerValue2, DealerValue1, DealerValue2, PlayerTotal, DealerTotal;
    System.out.println( " Let's play some Blackjack. " );
    DealerTotal = 0;
    PlayerTotal = 0;
    
    Random r = new Random();
    PlayerValue1 = 1 + r.nextInt(10);
    PlayerValue2 = 1 + r.nextInt(10);
    DealerValue1 = 1 + r.nextInt(10);
    DealerValue2 = 1 + r.nextInt(10);
    PlayerTotal = PlayerValue1 + PlayerValue2;
    DealerTotal = DealerValue1 + DealerValue2;
    
    
    System.out.println ( "You drew a " + PlayerValue1 + " and " + PlayerValue2 + " . ");
    System.out.println( " Your total is " + PlayerTotal + " . " );
    
    System.out.println();
    System.out.println( " The dealer has a " + DealerValue1 + " and " + DealerValue2 + " . ");
    System.out.println( " The Dealer's total is " + DealerTotal + " . " );
    
    if ( PlayerTotal >= DealerTotal )
    {
        System.out.println( " You win! " );
    }
    else 
    {
        System.out.println( " You Loose! " );
    }
    }
}
 

Picture of the output

Assignment 89