package com.github.dtschust.zork; import com.github.dtschust.zork.objects.ZorkObject; /* Status conditions*/ public class ZorkConditionStatus extends ZorkCondition { private final String status; public ZorkConditionStatus(String status, String object) { super(object); this.status = status; } @Override public boolean evaluate(ZorkGame game) { ZorkObject tested = game.getListThroughLookup(ZorkObject.class, object).get(object); return tested != null && tested.isStatusEqualTo(status); } }