$adv->aflags &= $bit ^ -1; return $adv->aflags; } function atro(Adv $adv, $bit) { $adv->aflags |= $bit; return $adv->aflags; } // Slots for room make_slot('RVAL', 0); // Value for entering make_slot('RGLOBAL', gval('STAR_BITS')); // Globals for room flagword(...['RSEENBIT', 'RLIGHTBIT', 'RLANDBIT', 'RWATERBIT', 'RAIRBIT', 'RSACREDBIT', 'RFILLBIT', 'RMUNGBIT', 'RBUCKBIT', 'RHOUSEBIT', 'RENDGAME', 'RNWALLBIT']); // SFLAGs of a SYNTAX flagword(...['SFLIP', 'SDRIVER']); /** * Test a bit in the SFLAGs slot of a SYNTAX * * @param Itafroma\Zork\Struc\Syntax $s The syntax to test * @param int $bit The bit to test * @return boolean FALSE if bit is set, TRUE otherwise */ function strnn(Syntax $s, $bit) { return ($bit & $s->sflags) !== 0; } /** * Retrieves an object property. * * @param Itafroma\Zork\Struc\StrucInterface $o The object to access.
/** * Test Itafroma\Zork\flagword() with too many flags. * * @covers ::Itafroma\Zork\flagword * @dataProvider flagOverflowProvider * @expectedException Itafroma\Zork\Exception\FlagwordException */ public function testFlagwordOverflow($flags) { flagword(...$flags); }