Skip to content

Interactive Java simulation of a desert water transport system, offering a gamified approach to learning programming and strategic thinking

Notifications You must be signed in to change notification settings

kopach-artem/Pipes_gods_of_jar

Repository files navigation

Pipes_gods_of_jar

Hun./Magyarul:

A sivatagban bonyolult csőrendszer szállítja a vizet a hegyi forrásokból a sivatagon túli városok ciszternáiba. A csőrendszer egyszerű csövekből és a csövekhez csatlakoztatott aktív elemekből (forrás, ciszterna, napelemes vízszivattyú stb.) épül fel. Egy szivattyúhoz több cső is csatlakoztatható, de a csatlakoztatható csövek száma az egyes szivattyúkra jellemző. Minden egyes szivattyú esetében a bejövő és a kimenő cső egyedileg választható ki, de egy szivattyúnak csak egyetlen bemenete és egyetlen kimenete lehet. A szivattyúhoz csatlakoztatott többi cső zárt. Véletlenszerűen előfordulhat, hogy egy szivattyú nem működik, és ebben az esetben a víz nem fog átfolyni a szivattyún. Minden szivattyú tartalmaz egy víztartályt, amelyet ideiglenes víztárolóként használnak, amikor a szivattyú a bejövő csőből a kimenő csőbe vizet továbbít. A szivattyú csak akkor tud vizet átadni, ha a kimenő csőnek van némi szabad kapacitása.

A csőrendszer bővíthető és cserélhető. A csövek elég rugalmasak ahhoz, hogy egyik végük leválasztható legyen egy aktív elemről, és egy másikhoz csatlakoztatható. A ciszternáknál rendszeresen új csöveket gyártanak. Egyik végük a ciszternához csatlakozik, a másik végük szabad. Ha egy csőnek szabad a vége, a csőbe juttatott víz a sivatagba folyik ki.

A csőrendszert vízvezeték-szerelők tartják karban. Ők tudják megjavítani az elromlott szivattyúkat, ők tudják beállítani a szivattyúk irányát, és ők tudják megjavítani a szivárgó csöveket is. Ha egy cső szivárog, a víz kifolyik, és nem jut víz a cső végére. A vízvezeték-szerelők feladata, hogy a forrásokból minél több vizet juttassanak a ciszternákba. A ciszternáknál gyártott csövekkel bővíthetik a rendszert, és új, szintén a ciszternáknál gyártott szivattyúkat is felvehetnek. Egy új szivattyút úgy lehet a cső közepébe illeszteni, hogy a csövet kettévágják, és a szabad végeket a szivattyúhoz csatlakoztatják.

A csőrendszeren szabotőrök is élnek. Ők meg tudják változtatni a szivattyúk irányát, és ki tudják lyukasztani a csöveket.

Mivel a sivatag veszélyes hely, a vízvezeték-szerelők és a szabotőrök csak a csöveken és a szivattyúkon mozoghatnak. A szivattyúknál az emberek megkerülhetik egymást, de a csöveken nem: egy csövön csak egy ember mehet végig.

A játékot két csapat játssza. Minden csapatban legalább két játékos van. A szabotőr csapat feladata, hogy minél több vizet szivárogtasson ki a csőrendszerből, a vízvezeték-szerelő csapat feladata, hogy minél több vizet juttasson a ciszternákba. A játékot az a csapat nyeri, amelyik a legtöbb vizet gyűjti össze.

Eng./Angolul:

In a desert a complex pipe system transfers water from the mountain springs to the cisterns of the cities beyond the desert. The pipe system is built from simple pipes and from active elements (spring, cistern, solar water pump, etc.) connected to the pipes. Multiple pipes can be connected to a pump, but the number of connectable pipes is specific to each pump. For each pump, the incoming and the outgoing pipe can be individually selected, but a pump can have only a single input and a single output. The other pipes connected to the pump are closed. At random times, a pump may go out of order, and in this case, the water will not flow through the pump. Each pump contains a water tank, which is used as a temporary reservoir when the pump transfers water from the incoming pipe to the outgoing pipe. The pump can transfer water only if the outgoing pipe has some free capacity.

The pipe system can be extended and can be changed. The pipes are flexible enough so that one of their ends can be disconnected from an active element and can be connected to another. New pipes are manufactured regularly at the cisterns. One of their ends is connected to a cistern the other end is free. When a pipe has a free end, water transferred into the pipe flows out to the desert.

The pipe system is maintained by plumbers. They can fix broken pumps, they can set the directions of the pumps, and they can fix leaking pipes, too. When a pipe is leaking, the water will spill out, and no water reaches the end of the pipe. The plumbers’ task is to transfer as much water as possible from the springs to the cisterns. They can extend the system with the pipes manufactured at the cisterns and they can also pick up new pumps also manufactured at the cisterns. A new pump can be inserted into the middle of a pipe by cutting the pipe in half and connecting the free ends to the pump.

There are also saboteurs living on the pipe system. They can change the directions of the pumps, and they can puncture pipes.

Since the desert is a dangerous place, the plumbers and saboteurs can only move on the pipes and the pumps. People can go around each other at the pumps, but they cannot go around each other on pipes: only a single person can go along a pipe.

The game is played by two teams. Each team has at least two players. The saboteur team’s task is to leak as much water as possible from the pipe system, the plumber team’s task is to transfer as much water as possible to the cisterns. The game is won by the team collecting the most amount of water.

About

Interactive Java simulation of a desert water transport system, offering a gamified approach to learning programming and strategic thinking

Topics

Resources

Stars

Watchers

Forks