yay last min uni work part 2.... I need help

How come so many courses have coursework over the Christmas period? All I am sat here doing is revision for my exams this week, all coursework was done throughout the previous 2months.
 
Welshy said:
use of singular.. see bold notation..

Rossmac said:
How come so many courses have coursework over the Christmas period? All I am sat here doing is revision for my exams this week, all coursework was done throughout the previous 2months.
My entire first semester of year 2 is coursework based. Ive done some halfway through and now ive been hit with my 6 assignments at the end. We dont get the exam period either.. that is free.. which is nice.. but ultimately i would prefer to not have to hand in 6 assignments across 2 weeks with 4 in the second week. Although, if you work through christmas you can get 3 done with a reasonable amount of time for xmas day and new years etc, which is what ive done.
 
I'm about to get assignments like this 3 times a week. :(
If assignment 1 is anything to go by, there's a long semester ahead.
I need a java buddy:( (an object orientated one though ;) )
 
gord said:
compare numerical values of assignments.. see post above
yes, i had a single assignment to do, so i used the word ASSIGNMENT, what is your point?

Edit: As i consider myself relatively good with java, at least when compared to most people (who seem to hate it), feel free to gimme a bell if you need a hand. Might not be the best idea to advertise that fact in a thread that i dont agree with, but hey :p
 
Last edited:
Just want to echo what has already been said really.

Basically the idea of a 2D array will fit this perfectly.

Remember, you can randomise numbers from anything to anything. Therefore you can make the computer randomise x and y.

There are loads of tutorials on the net. Look for 2D arrays, randomising numbers. That should get you a good start. Good luck. Email me if you need any help. Or post on the forum.
 
Gord: apologising to you completely mate. A friend just pointed out that you must have meant you had more than one assignment to do, i thought you were trying to correct my spelling or something :confused:

Again, apologies :o
 
Sigh, I dont know how im so bad at Java.... Been sitting here an hour and still can't work out how to make grid2 show the data from grid one in the grid sections that user picks.... Sigh
 
Welshy said:
Gord: apologising to you completely mate. A friend just pointed out that you must have meant you had more than one assignment to do, i thought you were trying to correct my spelling or something :confused:

Again, apologies :o
heh.. no worries :) my cryptic wording didnt help.
 
jcb33 said:
Sigh, I dont know how im so bad at Java.... Been sitting here an hour and still can't work out how to make grid2 show the data from grid one in the grid sections that user picks.... Sigh

Lets say the user inputs an x and y value, we'll call these inputX and inputY. grid1 is the grid you've stored the treasure in, and grid2 is the grid being displayed. Dont forget to take one away from the values the user inputs as arrays start at 0.
Code:
if (grid1[inputX - 1][inputY - 1] != '')
{
    grid2[inputX - 1][inputY - 1] = grid1[inputX - 1][inputY - 1];
}
else
    grid2[inputX - 1][inputY - 1] = '';
As simple as that really, if im following what you want to do correctly.
 
Welshy said:
Lets say the user inputs an x and y value, we'll call these inputX and inputY. grid1 is the grid you've stored the treasure in, and grid2 is the grid being displayed. Dont forget to take one away from the values the user inputs as arrays start at 0.
Code:
if (grid1[inputX - 1][inputY - 1] != '')
{
    grid2[inputX - 1][inputY - 1] = grid1[inputX - 1][inputY - 1];
}
else
    grid2[inputX - 1][inputY - 1] = '';
As simple as that really, if im following what you want to do correctly.
 
Last edited:
Rossmac said:
JCB - my friends dad designed that logo, random fact.

Anyways, if you want to send me your code so far? I could have a look and help you out a bit if needed.

Send it to [email protected]
I have added you on msn, if you can get online? Would realy apreciate the help!
 
With a lot (Although he says not) Of help from Rossmac I now have a program that is somewhat functional that is the user can put in a guess and it will be displayed if they hit treasure or not!

Now I have to:

Make the treasure be placed randomly, and looking at random numbers im realy not sure how to do this, especialy not sure how to make sure specific treasure is placed randomly and correctly, e.g a sword that is 3 grid places large needs to be placed in a row, not broken into 3 different bits..... any help there would be great!

Need to make the computer give the user 5 random guesses of its own no idea how again as of the above problems

Need to assign values to the items of treasure and give a score at the end, im currently working on setting up a score table but it just spams it before the user inputs a guess meaning its not doing its job.... not sure how to fix that

and I need to create a replay option
 
Right, reading between the lines I think you are trying to display the grid once and update this. Instead of this try printing a new grid after every guess.

Edit: Making the computer generate random guesses will be very similar code to placing treasure randomly surely?
 
Last edited:
Back
Top Bottom