Weekly outline

  • General

  • Getting Started with LUA

    • Open Minecraft EDU Launcher from your desktop
    • Start Minecraft EDU ** NOT MINECRAFT
    • Launch
    • Type your name & select Single Player
    • Create New World & play in Creative Mode
  • If Statements

    • Learn the format of an if statement in LUA and Java
    • Write a program to check the fuel in your turtle, and refuel IF necessary
    • Write your own programs using IF statements
    • Logical operators: "and" , "or", "not"
  • Learning JAVA with Greenfoot

    Now, we will begin to apply the concepts that we learned from Lua to typing real Java code. Greenfoot is a free program that will help us run our code.

    Helpful methods:

    move(# of pixels); //moves actor to the right if # is positive, and left if # is negative

    turn(# of degrees); //turns clockwise if # is positive, and counterclockwise if # is negative

    Greenfoot.isKeyDown("keyName"); //checks if key is pressed

    isAtEdge();   //accepts no parameters - checks if actor is at edge

    setRotation(# of degrees); //sets a character to turn to a specified angle

    isTouching(actor.class); // checks to see if actor is touching a specified actor on the stage

    removeTouching(actor.class); //removes specified actor from the stage

    Greenfoot.getRandomNumber(int); //gets random number between 0 and int

    STRINGS

    //a string is a type of object that consists of a sequence of characters i.e. a word or a sentence 

    System.out.print("Hello World");

    //prints Hello World to the terminal window

    System.out.println("Hello World");

    //prints Hello World to the terminal window and then starts a new line 

    + //THE CONCATENATOR 'adds' strings and other objects together

    Special Characters

    New line character: \n

    tab character: \t