Micropolis
power.cpp File Reference

Manages power distribution in the Micropolis game. More...

#include "micropolis.h"
#include "text.h"

Go to the source code of this file.

Variables

static const Quad COAL_POWER_STRENGTH = 700L
 
static const Quad NUCLEAR_POWER_STRENGTH = 2000L
 

Detailed Description

Manages power distribution in the Micropolis game.

This file contains functions for scanning the game map to distribute power from power plants to other structures. It utilizes a power stack to track and update the power status of tiles. The file includes constants for the power strength of coal and nuclear power plants, and functions to test for conductive tiles, scan the map for power distribution, and manipulate the power stack.

Definition in file power.cpp.

Variable Documentation

◆ COAL_POWER_STRENGTH

const Quad COAL_POWER_STRENGTH = 700L
static

Number of tiles that a coal power plant can supply power to.

Definition at line 86 of file power.cpp.

Referenced by Micropolis::doPowerScan().

◆ NUCLEAR_POWER_STRENGTH

const Quad NUCLEAR_POWER_STRENGTH = 2000L
static

Number of tiles that a nuclear power plant can supply power to.

Definition at line 89 of file power.cpp.

Referenced by Micropolis::doPowerScan().