Skip to content

Commit

Permalink
Merge pull request #246 from PixPanz/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
EricWM612 authored Feb 8, 2020
2 parents 099b9ef + a35b758 commit cdb38a9
Show file tree
Hide file tree
Showing 134 changed files with 6,420 additions and 650 deletions.
Binary file added .temp/city_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .temp/city_front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .temp/city_road.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .temp/loading_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .temp/location_mountain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .temp/location_plains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/DisasterousGameRules/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 208a62099f5da6bb1d5e4b41cbdcbbb5
config: 899d8a2c620a65c1461c8c480b8526f0
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file.
104 changes: 34 additions & 70 deletions docs/DisasterousGameRules/API.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>API &mdash; Byte-le Royale 0.0.1 documentation</title>
<title>API &mdash; Byte-le-Royale 2020 9 documentation</title>



Expand All @@ -25,6 +25,7 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/accordion.js"></script>

<script type="text/javascript" src="_static/js/theme.js"></script>

Expand All @@ -33,6 +34,7 @@

<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/accordion.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head>
Expand All @@ -48,7 +50,7 @@



<a href="index.html" class="icon icon-home"> Byte-le Royale
<a href="index.html" class="icon icon-home"> Byte-le-Royale 2020



Expand All @@ -57,6 +59,10 @@



<div class="version">
Version 1.0
</div>




Expand All @@ -78,67 +84,25 @@



<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">API</a><ul>
<li><a class="reference internal" href="#action">Action</a><ul>
<li><a class="reference internal" href="#object-type">object_type</a></li>
<li><a class="reference internal" href="#add-effort-self-action-amount">add_effort(self, action, amount)</a></li>
<li><a class="reference internal" href="#clear-actions-self">clear_actions(self)</a></li>
<li><a class="reference internal" href="#delete-index-actions-self-index">delete_index_actions(self, index)</a></li>
<li><a class="reference internal" href="#get-allocation-list-self">get_allocation_list(self)</a></li>
<li><a class="reference internal" href="#get-decree-self">get_decree(self)</a></li>
<li><a class="reference internal" href="#set-decree-self-decree">set_decree(self, decree)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#building">Building</a><ul>
<li><a class="reference internal" href="#building-type">building_type</a></li>
<li><a class="reference internal" href="#id1">object_type</a></li>
<li><a class="reference internal" href="#level">level</a></li>
<li><a class="reference internal" href="#effort-remaining">effort_remaining</a></li>
</ul>
</li>
<li><a class="reference internal" href="#city">City</a><ul>
<li><a class="reference internal" href="#city-name">city_name</a></li>
<li><a class="reference internal" href="#city-type">city_type</a></li>
<li><a class="reference internal" href="#id2">object_type</a></li>
<li><a class="reference internal" href="#structure">structure</a></li>
<li><a class="reference internal" href="#max-structure">max_structure</a></li>
<li><a class="reference internal" href="#population">population</a></li>
<li><a class="reference internal" href="#gold">gold</a></li>
<li><a class="reference internal" href="#sensors">sensors</a></li>
<li><a class="reference internal" href="#buildings">buildings</a></li>
<li><a class="reference internal" href="#id3">level</a></li>
<li><a class="reference internal" href="#id4">effort_remaining</a></li>
</ul>
</li>
<li><a class="reference internal" href="#disaster">Disaster</a><ul>
<li><a class="reference internal" href="#status">status</a></li>
<li><a class="reference internal" href="#type">type</a></li>
<li><a class="reference internal" href="#population-damage">population_damage</a></li>
<li><a class="reference internal" href="#structure-damage">structure_damage</a></li>
<li><a class="reference internal" href="#id5">object_type</a></li>
<li><a class="reference internal" href="#id6">level</a></li>
</ul>
</li>
<li><a class="reference internal" href="#lastingdisaster">LastingDisaster</a><ul>
<li><a class="reference internal" href="#newly-spawned">newly_spawned</a></li>
<li><a class="reference internal" href="#initial-effort">initial_effort</a></li>
<li><a class="reference internal" href="#id7">effort_remaining</a></li>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://www.twitch.tv/ndsu_acm">Twitch</a></li>
<li class="toctree-l1"><a class="reference external" href="http://forum.royale.ndacm.org">Forum</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org">Website/Schedule</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/getting_started.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/buildings.html">Buildings</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/city.html">City</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/decrees.html">Decrees</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/disasters.html">Disasters</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/effort.html">Effort</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/sensors.html">Sensors</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/turn.html">Turn</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/upgrades.html">Upgrades</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/API.html">API</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/common_errors.html">Common Errors</a></li>
<li class="toctree-l1"><a class="reference external" href="https://royale.ndacm.org/DisasterousGameRules/visualizer">Visualizer</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sensor">Sensor</a><ul>
<li><a class="reference internal" href="#sensor-type">sensor_type</a></li>
<li><a class="reference internal" href="#id8">object_type</a></li>
<li><a class="reference internal" href="#id9">level</a></li>
<li><a class="reference internal" href="#id10">effort_remaining</a></li>
<li><a class="reference internal" href="#sensor-results">sensor_results</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>



</div>
Expand All @@ -151,7 +115,7 @@
<nav class="wy-nav-top" aria-label="top navigation">

<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Byte-le Royale</a>
<a href="index.html">Byte-le-Royale 2020</a>

</nav>

Expand Down Expand Up @@ -274,12 +238,12 @@ <h2>Building<a class="headerlink" href="#building" title="Permalink to this head
<h3>building_type<a class="headerlink" href="#building-type" title="Permalink to this headline"></a></h3>
<p>The type of the current building, of BuildingType. This can be one of six different buildings.</p>
<ul class="simple">
<li><p>instant_decree_booster</p></li>
<li><p>lasting_decree_booster</p></li>
<li><p>everything_booster</p></li>
<li><p>wealth_booster</p></li>
<li><p>population_booster</p></li>
<li><p>structure_booster</p></li>
<li><p>police_station</p></li>
<li><p>gelato_shop</p></li>
<li><p>big_canoe</p></li>
<li><p>mint</p></li>
<li><p>billboard</p></li>
<li><p>printer</p></li>
</ul>
</div>
<div class="section" id="id1">
Expand Down Expand Up @@ -428,7 +392,7 @@ <h3>sensor_results<a class="headerlink" href="#sensor-results" title="Permalink

<div role="contentinfo">
<p>
&copy; Copyright 2019, 2020
&copy; Copyright 2019-2020, NDSU ACM

</p>
</div>
Expand Down
12 changes: 6 additions & 6 deletions docs/DisasterousGameRules/_sources/API.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ The decree parameter will only accept values from the DecreeType enum:
## Building
#### building_type
The type of the current building, of BuildingType. This can be one of six different buildings.
* instant_decree_booster
* lasting_decree_booster
* everything_booster
* wealth_booster
* population_booster
* structure_booster
* police_station
* gelato_shop
* big_canoe
* mint
* billboard
* printer

#### object_type
Backend value that distinguishes different objects apart from each other (city, sensors, buildings, etc.)
Expand Down
60 changes: 24 additions & 36 deletions docs/DisasterousGameRules/_sources/buildings.md.txt
Original file line number Diff line number Diff line change
@@ -1,71 +1,59 @@
# Buildings
Buildings can be constructed in your city to improve your city's functionality. Buildings can improve decrees, wealth, population, and structure. Without upgrading them, they sit as empty spots on your city. To build them, allocate effort to one of the buildings in `city.buildings`. However, buildings also require gold equal to the required effort to upgrade. Once the required amount of effort and gold required to upgrade is reached, the building will be upgraded.

For example, if you wanted to allocate effort to the Instant Decree Booster, you would type `actions.add_effort(city.buildings[BuildingType.instant_decree_booster], amount)`. For more information on allocating effort, see [Effort](effort.html).
For example, if you wanted to allocate effort to the Instant Decree Booster, you would type `actions.add_effort(city.buildings[BuildingType.police_station], amount)`. For more information on allocating effort, see [Effort](effort.html).

There are 6 types of buildings:
- [Instant Decree Booster](#instant-decree-booster)
- [Lasting Decree Booster](#lasting-decree-booster)
- [Wealth Booster](#wealth-booster)
- [Population Booster](#population-booster)
- [Structure Booster](#structure-booster)
- [Everything Booster](#everything-booster)
- [Police Station](#police-station)
- [Gelato Shop](#gelato-shop)
- [Mint](#mint)
- [Billboard](#billboard)
- [3D Printer](#3d-printer)
- [Big Canoe](#big-canoe)


## Instant Decree Booster
Shown as the police station, this increases the effectiveness of your correctly guessed decrees for instant disasters by a multiplier that increases with each upgrade.
## Police Station
This increases the effectiveness of your correctly guessed decrees for instant disasters.

Level | Effort Required | Damage Mitigated
--- | --- | ---
Base | 0 | 50%
1 | 13800 | 55%
2 | 18100 | 62.5%
3 | 25300 | 75%
1 | 40750 | 75%

## Lasting Decree Booster
Shown as the gelato shop, this increases the effectiveness of your correctly guessed decrees for lasting disasters by a multiplier that increases with each upgrade.
## Gelato Shop
This increases the effectiveness of your correctly guessed decrees for lasting disasters.

Level | Effort Required | Damage Mitigated
--- | --- | ---
Base | 0 | 50%
1 | 12000 | 55%
2 | 15750 | 62.5%
3 | 22000 | 75%
1 | 35050 | 75%

## Wealth Booster
Shown as the bank, this gives you additional wealth by an amount that increases with each upgrade.
## Mint
This gives you additional wealth for free.

Level | Effort Required | Wealth Added
--- | --- | ---
1 | 9600 | 20
2 | 12600 | 40
3 | 17600 | 60
1 | 28440 | 150

## Population Booster
Shown as the billboard, this gives you additional population by an amount that increases with each upgrade. This does not increase your population above your structure level. This amount is added every turn.
## Billboard
This gives you additional population through tourism. This does not increase your population above your structure level. This amount is added every turn.

Level | Effort Required | Population Added
--- | --- | ---
1 | 9600 | 5
2 | 12600 | 15
3 | 17600 | 25
1 | 28440 | 25

## Structure Booster
Shown as the 3D printer, this gives you additional structure by an amount that increases with each upgrade. This does not increase your structure above your max structure level. This amount is added every turn.
## 3D Printer
Shown as the 3D printer, this gives you additional structure. This does not increase your structure above your max structure level. This amount is added every turn.

Level | Effort Required | Structure Added
--- | --- | ---
1 | 12000 | 5
2 | 15750 | 15
3 | 22000 | 25
1 | 35050 | 25

## Everything Booster
## Big Canoe
The big canoe. This beast gives you additional wealth, population, and structure. As with the population and structure boosters, population and structure will not be added past their max. However, structure is added first, so if population and structure are equal, they will increase at equal rates.

Level | Effort Required | Wealth Added | Population Added | Structure Added
--- | --- | --- | --- | ---
1 | 25000 | 20 | 10 | 10
2 | 35000 | 40 | 20 | 20
3 | 45000 | 60 | 30 | 30
1 | 80100 | 200 | 30 | 30


8 changes: 4 additions & 4 deletions docs/DisasterousGameRules/_sources/city.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Your city can start with different bonuses and advantages. This can be assigned
There are 6 kinds of cities to choose from:
* Healthy: Starts with population already up to structure, giving your city a headstart in allocating effort
* Sturdy: Starts with structure up to max structure, allowing you to focus on population.
* Invested: Start with 1500 gold.
* Invested: Start with 20000 gold.
* Pyrophobic: Upgrades the fire sensor to level 1.
* Popular: Upgrades the population booster building to level 1.
* Modern: Upgrades the city to level one.
Expand All @@ -26,6 +26,6 @@ While gold is automatically accumulated at a rate of 3 gold per turn, the max st
Level | Effort Cost | Max Structure
--- | --- | ---
Base | 0 | 200
1 | 20000 | 225
2 | 22500 | 275
3 | 27500 | 350
1 | 15000 | 225
2 | 16875 | 275
3 | 20625 | 350
1 change: 1 addition & 0 deletions docs/DisasterousGameRules/_sources/common_errors.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#####Attribute Error: `<object>` has no attribute '`<attribute>`'This error can occur if you try to call a value or method that does not exist for the given object. Make sure you're spelling the attribute properly, and check the [API](API.html) to make sure that the attribute actually exists.#####Game running at ? turns/s 1585af66-6e4a-4576-9367-66dcc850d5f2 failed to reply in time and has been droppedThis error will occur when your client runs out of time on a given turn to complete its turn. This often occurs when there are too many print statements, any infinite loops, or other time-delaying functions. #####My team\_name/city\_name/city\_type aren't appearing! What do I do?This error is probably caused by the corresponding function not appearing, or the function is being named incorrectly. Make sure the functions 'team\_name', 'city\_name', and 'city\_type' are being named properly and returned the values you want them to return.
Expand Down
7 changes: 4 additions & 3 deletions docs/DisasterousGameRules/_sources/effort.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ For example, if we wanted to generate population,
```python
actions.add_effort(ActionType.regain_population, amount)
```
If we wanted to upgrade an object, like the instant_decree_booster building,
If we wanted to upgrade an object, like the police station building,
```python
actions.add_effort(city.buildings[BuildingType.instant_decree_booster], amount)
actions.add_effort(city.buildings[BuildingType.police_station], amount)
```
If we wanted to allocate effort to put out a lasting disaster,
```python
actions.add_effort(disasters[0], amount)
ongoing_disaster; # Let ongoing_disaster be an ongoing disaster from the disasters list, like fire
actions.add_effort(ongoing_disaster, amount)
```

Note that the list of current disasters is provided by the take_turn disasters argument.
Expand Down
16 changes: 16 additions & 0 deletions docs/DisasterousGameRules/_sources/getting_started.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Getting Started

* First thing you should do is get acquainted with this documentation. It is your game manual!
* Next, download the .zip file [here](https://drive.google.com/uc?export=download&id=1MHCV_sHKObTQF9K9FlUa3WvtCCri8m4z) and extract it.
* Open a powershell window at that location by holding shift and right clicking in the extracted folder, then selecting "Open PowerShell window here."
* Ensure Python is installed correctly and at least version 3.7.
* Type `pipenv install -d` and wait for it to finish.
* Type `pipenv shell`.
* If your launcher is out of date, run `python ./launcher.pyz u` to get updates.
* Type `python ./launcher.pyz s` to enter the scrimmage command line.
* Type `r` to register your teamname. Follow on-screen instructions to enter it properly.
* This creates vID file in your folder. This is your team ID number. Do not lose this file! You can share it with your teammates so they may submit code and view stats too.
* Write your client code! You may edit the `my_client.py` file as you wish, or you may create any python file with "client" in the name.
* To test your client, use your PowerShell window (that is in the Pipenv shell) to run `python ./launcher.pyz generate` to create a new world, `python ./launcher.pyz run` to test your client, and `python ./launcher.pyz visualizer` to view the results of the last run.
* To submit your client, run `python ./launcher.pyz s` to enter the scrimmage command line, and use `s` to submit your code.
* You may also use the scrimmage command line to view the leaderboard and your stats.
21 changes: 19 additions & 2 deletions docs/DisasterousGameRules/_sources/index.md.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# Welcome to Byte-le Royale 2020!* [Introduction](intro.html)* [Decrees](decrees.html)* [Disasters](disasters.html)
* [Buildings](buildings.html)* [Effort](effort.html)* [Turn](turn.html) <--- please make (example on GitHub wiki)* [API](API.html)
# Welcome to Byte-le Royale 2020!

* [Twitch](https://www.twitch.tv/ndsu_acm)
* [Forum](http://forum.royale.ndacm.org)
* [Website/Schedule](https://royale.ndacm.org)

* [Introduction](intro.html)
* [Getting started](getting_started.html)
* [Buildings](buildings.html)
* [City](city.html)
* [Decrees](decrees.html)
* [Disasters](disasters.html)
* [Effort](effort.html)
* [Sensors](sensors.html)
* [Turn](turn.html)
* [Upgrades](upgrades.html)
* [API](API.html)
* [Common Errors](common_errors.html)
* [Visualizer](visualizer.md)
11 changes: 11 additions & 0 deletions docs/DisasterousGameRules/_sources/sensors.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Sensors
Sensors enable you to predict [disasters](disasters.html) before they happen. Correctly guessing which disaster will happen next can allow you to choose the correct [decree](decrees.html). There is a sensor for every disaster, and each one must be upgraded individually. The six sensors are named fire, tornado, blizzard, earthquake, monster, and ufo.

Weather can be difficult to predict. The likelihood that certain disasters will occur will not be completely accurate. You can upgrade your sensors by allocating [effort](effort.html) to the sensor. Upgrading your sensor will make the sensor more accurate by decreasing the range up and down that it can be wrong.

Level | Effort Cost | Sensor Inaccuracy Range
--- | --- | ---
Base | 0 | 100
1 | 4000 | 50
2 | 8500 | 20
3 | 13500 | 1
Loading

0 comments on commit cdb38a9

Please sign in to comment.