how to move with a key stroke

PImage ship;
PImage iceberg;

void setup() {
  size(758,403);
  background(#43B3ED);

  // Images of the game
  ship = loadImage("ShipObject.png");
  iceberg= loadImage("iceberg_object.png");
}

void draw() {
  image(ship, 0, 52);
  image(iceberg,250,52);
}

how do I move the ship with the "W" "A" "D" keys?

Answers

Sign In or Register to comment.