private void setEnd(int loc, Level level)
 {
     level.setEnd(getPos(level.getWidth(), level.getHeight(), loc));
 }