Computer Science Canada

Connect Four Helped Need BADLY

Author:  GoVikingsGo [ Mon Jan 16, 2006 9:55 am ]
Post subject:  Connect Four Helped Need BADLY

Back again, um I need to use the arrow keys to move the circle thingy and to drop it into the slot. Does anyone know how to use the arrow keys? I know i have to use a key pressed or ley typed event but I dont know the syntax of these commands. All help would be appreciated. By the way I am working in Console! Thanks alot

Author:  wtd [ Mon Jan 16, 2006 1:26 pm ]
Post subject: 

Google "how to use keylistener site:java.sun.com".

Author:  Dan [ Mon Jan 16, 2006 2:59 pm ]
Post subject: 

If you are working only in the console then the arrow keys maynot be your best bet. I whould sugested asking the user to enter an number for the col to drop it in. It whould be easyer to code and to use. I am not shure how a keylistener whould work for the console since you ushely can not use the console like you whould turing where u can have graficks and updating of the screen. Unless of corse you are using some crazy API like ready to progame then things just get more complicated and harder to help with.

Author:  GoVikingsGo [ Mon Jan 16, 2006 4:03 pm ]
Post subject: 

Quote:

Google "how to use keylistener site:java.sun.com".


You dont know or wanna know how many times i read this but I am working in CONSOLE. Thx Anyways

Quote:

If you are working only in the console then the arrow keys maynot be your best bet. I whould sugested asking the user to enter an number for the col to drop it in. It whould be easyer to code and to use. I am not shure how a keylistener whould work for the console since you ushely can not use the console like you whould turing where u can have graficks and updating of the screen. Unless of corse you are using some crazy API like ready to progame then things just get more complicated and harder to help with.




U know i might just do that it would make it ten times easier for me. By the way I am using Ready to Program. Thx both of u

Author:  wtd [ Mon Jan 16, 2006 7:38 pm ]
Post subject: 

GoVikingsGo wrote:
Quote:

Google "how to use keylistener site:java.sun.com".


You dont know or wanna know how many times i read this but I am working in CONSOLE. Thx Anyways

Quote:

If you are working only in the console then the arrow keys maynot be your best bet. I whould sugested asking the user to enter an number for the col to drop it in. It whould be easyer to code and to use. I am not shure how a keylistener whould work for the console since you ushely can not use the console like you whould turing where u can have graficks and updating of the screen. Unless of corse you are using some crazy API like ready to progame then things just get more complicated and harder to help with.




U know i might just do that it would make it ten times easier for me. By the way I am using Ready to Program. Thx both of u


You can use all of standard Java 1.4.2 from within Ready To Program.

Author:  Dan [ Mon Jan 16, 2006 9:12 pm ]
Post subject: 

If you are using Ready To Program it is a hole difrent sotry. Since if u are using there API the console is not realy the console and there API has lots of comands that are only for there "console". Unfonty i do not know the RTP API nor do i have a copy of it (please do not send one as this whould be in vaition of copy right law).

But WTD is right, the keylistener should work fine in RTP. If you could post some of your atmeptes at geting it to work we whould be able to help you more.

Author:  Hikaru79 [ Mon Jan 16, 2006 9:20 pm ]
Post subject: 

HSA Console has its own wonky API, for everything from graphics to ActionEvents. Nobody here knows it, or will learn it. (Not because we're stupid -- because HSA Console is stupid). So you can either a) Not use Console, but rather Swing or JApplet or b) Use the API ref at the back of the yellow Java textbook that Holt should have given you.

Author:  GoVikingsGo [ Tue Jan 17, 2006 8:57 am ]
Post subject: 

woooosh right over my head

Quote:

Use the API ref at the back of the yellow Java textbook that Holt should have given you.


I DONT HAVE THIS

but what is API?


I am going to use the number anyways to input coordinates thanks...[/quote]

Author:  wtd [ Tue Jan 17, 2006 12:12 pm ]
Post subject: 

Application Programming Interface.


: