O'Reilly logo

Dart: Scalable Application Development by Ivo Balbaert, Sergey Akopkokhyants, Davy Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Structuring a game project

Board games, for the greater part, have the same structure; what the user sees (the view) is a surface containing a grid of cells (model classes) that can be of different shapes. Along with a few utility classes to choose a color at random, this constitutes a solid base to build a board game. With his experience in building game projects, Dzenan Ridjanovic has extracted this game structure in the boarding project, which can be found at https://github.com/dzenanr/boarding.

How to do it...

Download the game project as a zip from the preceding URL, unzip it, and open it in Dart Editor. The code that is the starting part of a new board game can be found in the lib folder; the library that is boarding (in boarding.dart) imports ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required