Skip to main content

Tile placement suggestions for the game Dorfromantik.

Project description

Dorfperfekt

Tile placement suggestions for the game Dorfromantik. With an emphasis on perfect tile placement, this software tool enables the player to play indefinitely (and achieve a massive score while doing so).

demo dorfperfekt demo dorfromantik map demo dorfromantik score

How It Works

The player inputs a six-character text string representing the next tile to be placed. Each valid placement is then evaluated by the solver according to the following (in order of precedence):

  1. How many tiles would be ruined by this placement? Less is better.
  2. Of the tiles encountered so far, how many would alternatively fit perfectly at this position? Less is better.
  3. Assuming this placement is made, consider each adjacent open position. Of the tiles encountered so far, how many would fit perfectly at that adjacent position? Take the minimum of all adjacent open positions. More is better.

The latter two computations will take a significant amount of time as the game progresses and more unique tiles are encountered. A threshold is set by the user so that the solver can be instructed to ignore rarer tiles.

Using the Application

Dorfperfekt displays an overall map of the board. Dark gray tiles are non-ruined placements and light gray tiles are ruined placements. After entering a tile definition string and pressing the solve button, the progress bar will increment and pressing the refresh button will overlay a heatmap of the possible moves onto the board. Green is better, red is worse, and white is neutral (or not yet evaluated).

Positions on the map can be clicked on. By clicking on a proposed position for your next placement, a view of the local terrain is generated. The tile to be placed is given a proposed best rotation but the user may use the rotate button to select an alternate rotation.

Existing tiles may also be clicked on such that they may be deleted or set as the origin to recenter the map of the board.

Tile Definitions

A tile is defined by a six-character text string where each character represents the edge terrains in clockwise order. If all edges of the tile are the same a single character may be used instead. Tile characters are deliberately selected to all be accessible from the left hand.

  • Grass, "g"
  • Forest, "f"
  • Ranch, "r" (ie. wheat/lavender fields)
  • Dwelling, "d" (ie. houses)
  • Water, "w" (ie. rivers)
  • Station, "s"
  • Train, "t"
  • Coast, "c" (ie. lakes)

Installation

From the command line, install with pip install dorfperfekt. The application can then be run from the command line with dorfperfekt.

Development

Setting up the software development environment is easy.

poetry install
poetry run pre-commit install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dorfperfekt-0.2.3.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dorfperfekt-0.2.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file dorfperfekt-0.2.3.tar.gz.

File metadata

  • Download URL: dorfperfekt-0.2.3.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.11.0 Windows/10

File hashes

Hashes for dorfperfekt-0.2.3.tar.gz
Algorithm Hash digest
SHA256 78a3603458fe4630398090a3df2e4671e5257cf3f341f62f0c742afeebd19f63
MD5 b37b82bf87ce546bbaeedc0307469116
BLAKE2b-256 02425fc0209dd7cbdfa17e33d80e2c80ad88ab3cd47cfcdb1364b8c6027054d1

See more details on using hashes here.

File details

Details for the file dorfperfekt-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: dorfperfekt-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.11.0 Windows/10

File hashes

Hashes for dorfperfekt-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8b4cff0e635ac211bf47cd2358c1ca2d3a4232276af4ca84c9612989cfe0c883
MD5 2038b3c4ac9877dfa746843fe2bcdc03
BLAKE2b-256 1cd345ec9ffebf32d0013a70b06ab1da91f17ad8d64f513f432c3dd7b29540f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page