if(e.getSource() == UpButton) {
kickBall("up");
}
else if(e.getSource() == mvDBtn){
kickBall("down");
}
else if(e.getSource() == MvleftBtn){
kickBall("right");
}
else if(e.getSource() == MvLbutton) {
kickBall("left");
}
if(e.getSource() == runBtn) {
timer1();
}
}
public void kickBall(String a) {
if(a == "right") {
//how to move
}
else if(a == "left") {
//how to move
}
else if(a == "up") {
//how to move
}
else if(a == "down") {
//how to move
}
I have a 13*16 grid layout and i want move a player(character).is it possible to move it pixel wise or should it moved a grid cell at a time.