Skip to content

sunkuma/FinalProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

FinalProject

Project Title and purpose

One Paragraph of project description goes here

Difficulties or opportunities you encountered along the way.

The toughest part was...

Most interesting piece of your code and explanation for what it does.

void keyPressed() {
  if (keyCode == LEFT) {
    tree= tree.getLeft();
    System.out.println(tree.getValue());
    String s=(String)tree.getValue();
    fill(155);
    textSize(50);
  } else if (keyCode == RIGHT) {
    tree = tree.getRight();
    System.out.println(tree.getValue());
    String s=(String)tree.getValue();
    fill(155);
    textSize(50);
  } else if (tree.getLeft()==null&&tree.getRight()==null) {
    System.out.println(tree.getValue());
    tree=t.returnTree();
  }
}

This is the code that moves down the tree as decisions are made. It gets each value from both left and right and also casts the value to a String. If the progressions arrives at the leaf nodes, those values are printed.

Built With

Authors

  • Billie Thompson

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published