Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Created October 26, 2016 04:07
Show Gist options
  • Select an option

  • Save zeroeth/9f6a4504e3234f27a6a564984c59ebd0 to your computer and use it in GitHub Desktop.

Select an option

Save zeroeth/9f6a4504e3234f27a6a564984c59ebd0 to your computer and use it in GitHub Desktop.
weeb
direction = Randperm(4);
jump_distance = Randperm(2);
switch direction
case 1
xpos = xpos;
ypos = ypos + jump_distance;
case 2
xpos = xpos;
ypos = ypos - jump_distance;
case 3
xpos = xpos - jump_distance;
ypos = ypos;
case 4
xpos = xpos + jump_distance;
ypos = ypos;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment