@danpost, thank you for the explanation. If I wanted to have all the the 26 letters in 1 row, what would the code be like? do I just delete "(i%13)" and "(i/13)" from the code?
so like this: addObject(letters[i] = new Letter(i), 24+38, 510+30;
thank you!
I don't really understand this part of the code, could you please explain it?
word = words.nextWord();
int baseX = getWidth()/2 - word.length() * 18 + 9;
bg.setColor(Color.black);
for (int i=0; i<word.length(); i++) {
bg.fillRect(baseX+36*i, getHeight()-10, 24, 3);
what is baseX?
when I write this, private GreenfootImage getLetterImage("A",java.awt.Color.black)
a message saying "illegal start of type" keeps popping up. how do I fix it?
also, in the method "return new GreenfootImage("A", 36, black, null);" what does the number 36 represent?
Also,
so I would need 26 getLetterImage methods for all 26 letters of the alphabet?
eg. getLetterImage("A", java.awt.Color.black);
getLetterImage("B", java.awt.Color.black);
getLetterImage("C", java.awt.Color.black);
etc
thanks
2014/5/24
Hangman
2014/5/24
Hangman
2014/5/20
Hangman
2014/5/19
Hangman
2014/5/19
Hangman
2014/5/16
Hangman
2014/5/16
Hangman
2014/5/14
Hangman
2014/5/14
Hangman