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.

Class Based OOP in Dart PRO

The Dart programming language uses classes and interfaces similarly to Java, C# and PHP. Dart supports single inheritance similarly to Java, C# and PHP. Dart supports multiple interfaces implementation similarly to Java, C# and PHP. As in Java and in C# every class inherits (by default) from the Object class. The classes can have public and private members. The public accessibility is the default one. Dart supports a special shorthand syntax for accessing class properties, similarly to properties in C#.

class Rectangle
{
  double _width;
  double _height;
  Rectangle(double w,double h)
  {
    width = w;
    height = h;
  }
  get width => _width;
  set width(size) => (size>0)?_width=size:_width=10.0;
  get height => _height;
  set height(size) => (size>0)?_height=size:_height=10.0;
  area() => width * height;
  perimeter() => 2*(width+height);
}

main()
{
  var ob = new Rectangle(3.2,4.4);
  ob.width = 20.2;
  ob.height = -4.1;
  var area = ob.area();
  print("area is $area");
}

The following video clip overviews this code sample, shows its execution 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