1..00..1…1.1….0..1..0..11..0…0

Bineroo Gameplay

Analysis of the requirements

The core element of the game is a grid.

Grid on Android
  • 0 (represented by a white circle ⚪️ )
  • 1 (represented by a black circle ⚫️)
  • Empty (represented by an empty circle with a red border)

Let’s code

First, start by creating a new Flutter project

  • A value represented by a String of a unique character with one of the following possibilities “0”, “1”, “.”
  • A mutable state represented by a bool
  • A position represented by an int equals the index of the tile within the grid String
  • A callback function represented by a dynamic type var that will be called every time a mutable tile is changed

Bonus: How to convert a stateless widget to stateful with key shortcuts

  • its initial value
  • its current value
  • its solution

Test and Fix

Flutter and all its tooling ecosystem are very graphical so when it comes to testing, I always favor building a simple app to embed my widget and see how they behave rather than using unit test code. I know it is not great for automated CI/CD pipeline but for the time being, it will be just fine.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store