Skip to content

Instantly share code, notes, and snippets.

@fabulousduck
Created May 27, 2019 15:25
Show Gist options
  • Save fabulousduck/a3cd5b8049a7f6c74e31e516c9cba045 to your computer and use it in GitHub Desktop.
Save fabulousduck/a3cd5b8049a7f6c74e31e516c9cba045 to your computer and use it in GitHub Desktop.
asdasdasd
public void move(String dir) {
Node currentNode = this.head;
String currentDir = dir;
while(currentNode != null) {
currentNode.dir = currentDir; //set the dir of the previous
currentDir = currentNode.dir; //set the currentDir so the next one in line can use it
currentNode.block.moveBlockDir(currentNode.dir); //move the block of the body part on the frame
currentNode = currentNode.next; //set the next so we can get the next node in the linked list
}
}
public void move(String dir) {
Node currentNode = this.head;
String currentDir = dir;
while(currentNode != null) {
currentNode.dir = currentDir; //set the dir of the previous
currentDir = currentNode.dir; //set the currentDir so the next one in line can use it
currentNode.block.moveBlockDir(currentNode.dir); //move the block of the body part on the frame
currentNode = currentNode.next; //set the next so we can get the next node in the linked list
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment