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.

Data Classes in Python

As of Python 3.7, we will be able to mark the class we define with the @dataclass decorator. Doing so, the newly defined class will be a data class (similarly to Data Class in Kotlin). As with Kotlin, the main outcome of having our class defined as a data class is having auto-generated methods, such as __init__, __repr__ and few others.

from dataclasses import dataclass

@dataclass()
class X:
a:any = 10
b:int = 2

x = X(2,5)

print(x)

The output of running this code snippet will be the following:

X(a=2, b=5)

You can find detailed information about this new capability at https://www.python.org/dev/peps/pep-0557/.

Share:

The Beauty of Code

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

Update cookies preferences