Skip to content

tfuxu/floodit

Repository files navigation

Flood It

Challenge yourself with this simple, yet addictive strategy game, where you need to flood-it as efficiently as you can!


screenshot-1

Flood It is a game with the simple premise of flooding the entire board with one color in the least amount of moves possible. It's based on the original Flood-It! by Lab Pixies archived in Wayback Machine

How to install:

You can install Flood It in many ways, here are some listed:

1. Official Flatpak package:

Download on Flathub

2. Alternative package distributions:

Warning

Although some of the methods listed here may be maintained by the Flood It maintainers, these methods are not officially supported and issues related to packaging in them should be reported outside this project's bug tracker.

Packaging status

3. Install from source:

If you don't find any other options appealing to you, then you can always compile code on your machine from source and install it that way. For more information, check out How to build section.

How can I contribute?

  1. Read GNOME Code of Conduct
  2. Fork this repository: https://github.com/tfuxu/floodit/fork
  3. Clone your fork: git clone https://github.com/👁️you👁️/floodit.git
  4. Create a local branch with your changes: git checkout -b new-thingies
  5. When changing stuff in Python, try to follow PEP8
  6. Commit your changes: git commit
  7. Push the changes to fork: git push origin new-thingies
  8. Create a new pull request

How to build:

GNOME Builder:

This is the easiest way of building Flood It if you want to build it as a Flatpak package. Highly recommended, but probably not for everyone, as GNOME Builder and Flatpak can be quite resource hungry.

Important

Building with GNOME Builder isn't currently supported. If you need to build a Flatpak package, see the Flatpak Builder section.

  1. Download GNOME Builder.
  2. In Builder, click the Clone Repository button at the bottom, using https://github.com/tfuxu/floodit.git as the URL.
  3. Click the Build button at the top once the project is loaded.

Flatpak Builder:

Prerequisites:

  • Flatpak Builder flatpak-builder
  • GNOME SDK runtime org.gnome.Sdk//47
  • GNOME Platform runtime org.gnome.Platform//47

Install required runtimes:

flatpak install org.gnome.Sdk//47 org.gnome.Platform//47

Building Instructions:

User installation
git clone https://github.com/tfuxu/floodit.git
cd floodit
flatpak-builder --install --user --force-clean repo/ build-aux/flatpak/io.github.tfuxu.floodit.json
System installation
git clone https://github.com/tfuxu/floodit.git
cd floodit
flatpak-builder --install --system --force-clean repo/ build-aux/flatpak/io.github.tfuxu.floodit.json

Meson Build System:

Prerequisites:

The following packages are required to build this project:

  • Golang >= 1.22 go
  • Gtk4 >= 4.14 gtk4
  • Libadwaita >= 1.5 libadwaita
  • Meson meson
  • Ninja ninja-build

Building Instructions:

Global installation
git clone https://github.com/tfuxu/floodit.git
cd floodit
meson setup builddir
meson configure builddir -Dprefix=/usr/local
ninja -C builddir install
Local build (for testing and development purposes)
git clone https://github.com/tfuxu/floodit.git
cd floodit
meson setup builddir
meson configure builddir -Dprefix="$(pwd)/builddir" -Dbuildtype=debug
ninja -C builddir install
meson devenv -C builddir ./bin/floodit

Note

During testing and development, as a convenience, you can use the local.sh script to quickly rebuild local builds.

License

GPLv3 logo This repository is licensed under the terms of the GNU GPLv3 license. You can find a copy of the license in the COPYING file.

Inspirations/Resources:

I've got an idea to create Flood It after playing Flood on SerenityOS.

Some parts of the backend code used to generate and flood board are based on code from Open Flood and The FloodIt! game example made by Otfried Cheong.

I also read explanations of Flood fill algorithm implementations to better understand the process of board filling in game.

The general structure of this project is based on my Gotk4 Go + Meson project template.