|It is currently Tue Mar 19, 2024 5:56 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka


Blog Links

Blog Stats
4Total Entries
3Total Comments

Search Blogs


Random Blog Entry
Just need to complete my program for snake game by behumanizer on Wed Aug 17, 2011 8:17 am
Program below is working i just don't know what to do for the algorithm on keyevents for right,left,up and down
The code like y+=10; is just my assumption for the snake movement.....
I believe below the path.reset() code has to be change since stack is being use...
Can anyone help me program to run correctly?


/***
* PROVIDE THE MISSING CODE in the keyPressed() method
* in order to move the 'snake' around the interface
* by pressing:
*
* --> cursor keys
* --> CTRL-Z to 'undo' last move
* --> CTRL-Y to 'redo' past/last move
*/

package midterms;

import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import javax.swing.*;
import java.util.*;
import javax.swing.border.*;



public class Snakes extends JPanel implements KeyListener {
final static long serialVersionUID = 1;
final private int WIDTH = 600;
final private int HEIGHT = 400;

LinkedList<Point> snake = new LinkedList<Point>();
Stack<Point> undo = new...

[ Continued ]

Feed Recent Blog Entries
BizTalk Server Services by Microsoft Gold Certified Company by JohnnyCash on Thu Nov 22, 2012 9:40 am
BizTalk is a powerful software developed by Microsoft to bring all the enterprise activities on single platform. It offers high-end interactive and sharing features for internal and external users. Microsoft...

[ Continued ]

Just need to complete my program for snake game by behumanizer on Wed Aug 17, 2011 8:17 am
Program below is working i just don't know what to do for the algorithm on keyevents for right,left,up and down
The code like y+=10; is just my assumption for the snake movement........


[ Continued ]

how to add multiple clients to the server in java? by artigautam on Sun May 08, 2011 5:10 pm
I ve to add 2 clients to the server,chatting between these clients will be through the server.but after running these following files only Cframe1 got connected to server but second client i.e. Clientframe1...

[ Continued ]

pls help me IMP URGENT abt compression in java by tanmay005 on Mon Apr 04, 2011 11:15 am
i am tanmay from india studying in final year computer engineering
my final year mini project is "Multimedia file compressor using netbeans"
we are facing many problems in implementing diff algos...

[ Continued ]

Can someone help? by cscalkin on Mon Apr 04, 2011 2:57 am
I need to create a Java program that:

Takes as input a rooted tree T and a node c of T and converts T to another tree with the same set of node adjacency but now rooted at v.

any suggestions to start...

[ Continued ]

Feed Recent Comments
There are no blog entries.

All times are UTC [ DST ]


cron






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com