mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Stardew Valley: implement new game (#1455)
* Stardew Valley Archipelago implementation * fix breaking changes * - Added and Updated Documentation for the game * Removed fun * Remove entire idea of step, due to possible inconsistency with the main AP core * Commented out the desired steps, fix renaming after rebase * Fixed wording * tests now passes on 3.8 * run flake8 * remove dependency so apworld work again * remove dependency for real * - Fix Formatting in the Game Page - Removed disabled Option Descriptions for Entrance Randomizer - Improved Game Page's description of the Arcade Machine buffs - Trimmed down the text on the Options page for Arcade Machines, so that it is smaller * - Removed blankspace * remove player field * remove None check in options * document the scripts * fix pytest warning * use importlib.resources.files * fix * add version requirement to importlib_resources * remove __init__.py from data folder * increment data version * let the __init__.py for 3.9 * use sorted() instead of list() * replace frozenset from fish_data with tuples * remove dependency on pytest * - Add a bit of text to the guide to tell them about how to redeem some received items * - Added a comment about which mod version to use * change single quotes for double quotes * Minimum client version both ways * Changed version number to be more specific. The mod will handle deciding --------- Co-authored-by: Alex Gilbert <alexgilbert@yahoo.com>
This commit is contained in:
52
worlds/stardew_valley/test/TestLogicSimplification.py
Normal file
52
worlds/stardew_valley/test/TestLogicSimplification.py
Normal file
@@ -0,0 +1,52 @@
|
||||
import unittest
|
||||
|
||||
from .. import _True
|
||||
from ..logic import _Received, _Has, _False, _And, _Or
|
||||
|
||||
|
||||
class TestLogicSimplification(unittest.TestCase):
|
||||
def test_simplify_true_in_and(self):
|
||||
rules = {
|
||||
"Wood": _True(),
|
||||
"Rock": _True(),
|
||||
}
|
||||
summer = _Received("Summer", 0, 1)
|
||||
assert (_Has("Wood", rules) & summer & _Has("Rock", rules)).simplify() == summer
|
||||
|
||||
def test_simplify_false_in_or(self):
|
||||
rules = {
|
||||
"Wood": _False(),
|
||||
"Rock": _False(),
|
||||
}
|
||||
summer = _Received("Summer", 0, 1)
|
||||
assert (_Has("Wood", rules) | summer | _Has("Rock", rules)).simplify() == summer
|
||||
|
||||
def test_simplify_and_in_and(self):
|
||||
rule = _And(_And(_Received("Summer", 0, 1), _Received("Fall", 0, 1)),
|
||||
_And(_Received("Winter", 0, 1), _Received("Spring", 0, 1)))
|
||||
assert rule.simplify() == _And(_Received("Summer", 0, 1), _Received("Fall", 0, 1), _Received("Winter", 0, 1),
|
||||
_Received("Spring", 0, 1))
|
||||
|
||||
def test_simplify_duplicated_and(self):
|
||||
rule = _And(_And(_Received("Summer", 0, 1), _Received("Fall", 0, 1)),
|
||||
_And(_Received("Summer", 0, 1), _Received("Fall", 0, 1)))
|
||||
assert rule.simplify() == _And(_Received("Summer", 0, 1), _Received("Fall", 0, 1))
|
||||
|
||||
def test_simplify_or_in_or(self):
|
||||
rule = _Or(_Or(_Received("Summer", 0, 1), _Received("Fall", 0, 1)),
|
||||
_Or(_Received("Winter", 0, 1), _Received("Spring", 0, 1)))
|
||||
assert rule.simplify() == _Or(_Received("Summer", 0, 1), _Received("Fall", 0, 1), _Received("Winter", 0, 1),
|
||||
_Received("Spring", 0, 1))
|
||||
|
||||
def test_simplify_duplicated_or(self):
|
||||
rule = _And(_Or(_Received("Summer", 0, 1), _Received("Fall", 0, 1)),
|
||||
_Or(_Received("Summer", 0, 1), _Received("Fall", 0, 1)))
|
||||
assert rule.simplify() == _Or(_Received("Summer", 0, 1), _Received("Fall", 0, 1))
|
||||
|
||||
def test_simplify_true_in_or(self):
|
||||
rule = _Or(_True(), _Received("Summer", 0, 1))
|
||||
assert rule.simplify() == _True()
|
||||
|
||||
def test_simplify_false_in_and(self):
|
||||
rule = _And(_False(), _Received("Summer", 0, 1))
|
||||
assert rule.simplify() == _False()
|
||||
Reference in New Issue
Block a user