TheMainClass - public static void main(String args) {...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/******************************************************************************* * Discription: A program that takes a deck of cards and deals them * to four players. Tis is done using a Linked List * and nodes. ******************************************************************************/ import java.util.Scanner; i public class TheMainClass { /************************************************************************** * main() - Driver method * Creates a game and loops till play = false * @param args **************************************************************************/
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public static void main(String args) { boolean play; String playAgain; Scanner scan = new Scanner(; do { new Game(); // Create new Game() // Ask if you would like to play again. System.out.println("Would you like to play again? (y/n)"); // Gets response in lower case playAgain = scan.nextLine().toLowerCase(); playAgain.trim(); // Trim spaces if(playAgain.equals("yes") || playAgain.equals("y")){ play = true; } else { play = false; } } while(play == true); } }...
View Full Document

This note was uploaded on 10/19/2010 for the course CS 161 taught by Professor Wallace during the Fall '08 term at Oregon State.

Ask a homework question - tutors are online