Game Instructions

Tap a tile to toggle its color. When a tile changes nearby tiles may change as well. Each move affect multiple tiles. The target is to turn all tiles into yellow in the fewest steps possible.

Press 'j' to show/hide the game. Press 'i' to show/hide the instructions. Press 't' to show/hide the top score table.

Steps: 0

Top Scores

Name Steps
Press J to toggle the game, I to toggle instructions, and T to toggle the top scores

Congratulations!

You solved the puzzle in 0 steps!

Success!

Score submitted successfully!

Error

Failed to submit score. Please try again.

Scala Expressions Evaluation PRO

When creating a variable using val or var and assigning the value of an expression into it the expression is evaluated when the variable is created. When creating a function using def and assigning the value of an expression to it the expression is evaluated when calling the function.

object Program {
  def main(args: Array[String]):Unit =
  {
    var a = 3
    var b = 4
    var c = 5
    val e1 = if (b>a) "spiderman" else "wonderwoman"
    var e2 = if (b>a) "spiderman" else "wonderwoman"
    def e3 = if (b>a) "spiderman" else "wonderwoman"
    a = 7
    println(e1)
    println(e2)
    println(e3)
  }
}

The following video clip goes over this code sample and explains it.

Share:

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Update cookies preferences