title: Looking for a more elegant solution to move character
body: <p>Trying to move my character across the terminal on a checker-style board. I'm sure there is a more elegant way to write this code, but I'm having a brain-fart on how to do so.</p>
  
  <pre><code>// move your character.
  public void moveYou(String wasd, You person) {
      if (wasd.equals("w")) {
          // swaps ground in front of you with you.
          ground[person.getX()][person.getY()] = ground[person.getX() - 1][person.getY()];
          // replaces you with ground above you.
          ground[person.getX() - 1][person.getY()] = person;
          person.setXandY(person.getX() - 1, person.getY());
          person.setDir("[ ^ ]");
      } else if (wasd.equals("s")) {
          ground[person.getX()][person.getY()] = ground[person.getX() + 1][person.getY()];
          ground[person.getX() + 1][person.getY()] = person;
          person.setXandY(person.getX() + 1, person.getY());
          person.setDir("[ v ]");
      } else if (wasd.equals("a")) {
          ground[person.getX()][person.getY()] = ground[person.getX()][person.getY() - 1];
          ground[person.getX()][person.getY() - 1] = person;
          person.setXandY(person.getX(), person.getY() - 1);
          person.setDir("[ &lt; ]");
      } else if (wasd.equals("d")) {
          ground[person.getX()][person.getY()] = ground[person.getX()][person.getY() + 1];
          ground[person.getX()][person.getY() + 1] = person;
          person.setXandY(person.getX(), person.getY() + 1);
          person.setDir("[ &gt; ]");
      }
      printMap();
  }
  </code></pre>