hey, i am doing a sterling game java program. its a simple card game where you draw 1 card and add the number to your previous card. i made the program but i need an arraylist to check the previous card drawn to see if you get the number twice in a row.
my program so far:
import java.util.*;
import javax.swing.*;
public class sterling {
public sterling() {
super();
}...
User Profile
Collapse
-
i basically need help getting started, like setting up the array/game board...i can pretty much take care of the rest... -
penny pitch anyone?
i am trying to make a penny pitch game. the sum is returned at the end of the game and the player has 2 options: toss and quit. the program does this when the toss option is clicked: generates two random numbers from teh row n column toss, add number at this position to the running total, and displays the board replacing the numbers with P's where pennies land.
here is what the board looks like
1 1 1 1 1 1 1... -
this is what i have done
package prime;
public class Prime {
public static void main(String[] args) {
int i,j,p;
for(i=2;i<=1000 ;i++)
{
p = 0;
for(j=2;j<=i/2;j++)
{
if(i%j == 0)
{
p = 1;
break;
}
}
if(p == 0)
System.out.prin tln(i);...Leave a comment:
-
urgent sieve of eratossthenes prime #'s
alright i need some help making a program that displays all the prime number from 1-1000. i can make one but i cant make one with arrays. need help!
No activity results to display
Show More
Leave a comment: