Пример #1
0
 function testFnC()
 {
     $this->assertEquals(2, Wumpus::fnC());
     $this->assertEquals(3, Wumpus::fnC());
     $this->assertEquals(1, Wumpus::fnC());
     $this->assertEquals(1, Wumpus::fnC());
     $this->assertEquals(2, Wumpus::fnC());
     $this->assertEquals(4, Wumpus::fnC());
     $this->assertEquals(2, Wumpus::fnC());
     $this->assertEquals(1, Wumpus::fnC());
     $this->assertEquals(3, Wumpus::fnC());
     $this->assertEquals(1, Wumpus::fnC());
 }
Пример #2
0
 private static function returnFromGosub()
 {
     if (empty(self::$returnLine)) {
         self::$nextLine = 1151;
     } else {
         self::$nextLine = array_pop(self::$returnLine);
     }
 }
Пример #3
0
<?php

require_once 'Wumpus.php';
Wumpus::main();