Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Pedro Gilbert   on May 16 In Java Category.

  
Question Answered By: Ayaz Hashmi   on May 16

Sorry, I should have made it clearer. The red section is only there
to test the code  used to work out the color  of the pixel (i.e so i
can see the change from red to black). In the finished game the
background will be all black. The idea  is that before the head of
the tail is moved on a pixel, the pixel that will be colored yellow
(to form the head) is tested to see what color it is. if its the
background color then all is ok. If its not then there has been a
collision (either with itself, or with another player). my code
however claims the same color of R0 G0 B0 no matter what! something
is amiss!

As for the lack of OO and the deprecated methods:

yeah I realise it aint coded too hotly. I just quickly hacked it
down to get a game going, the main aspect of the project will be the
addition of the AI but cheers for the advice, I will look up
processKeyEvent().

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Image/Graphics color Or get search suggestion and latest updates.


Tagged: