<?php class Battlefield { public $height; public $width; public $totalTurns; const EMPTYCELL = " . "; //пустая ячейка на поле, не занятая живностью const TAKENCELL = " _ "; //использую константу для недопущения спавна на одно место. public function __construct($height, $width, $totalTurns) { $this->height = $height; $this->width = $width; $this->totalTurns = $totalTurns; } //добавление новых животных в массив животных с рандомным указанием их стартовой позиции public $animalList = []; public function addAnimal(Animal $animal) { $this->animalList[] = $animal; $animal->setMap($this); for ($i = 0; $i <= 100; $i++) { if ($this->arrayField[$y][$x] == Battlefield::EMPTYCELL) { $animal->y = $y; $animal->x = $x; $this->arrayField[$y][$x] = Battlefield::TAKENCELL; break; } } } //удаляем животное из базы игры. public function removeAnimal(Animal $deadAnimal) { foreach($this->animalList as $key => $animal){ if($animal === $deadAnimal) { } } } //создание массива массивов - визуальное поле игровое, короче public $arrayField = []; public function setField() { for ($i = 0; $i <= $this->height; $i++) { for ($j = 0; $j <= $this->width; $j++) { $this->arrayField[$i][] = Battlefield::EMPTYCELL; } } } //заполняю поле живностью public function fillFieldWithAnimals() { foreach ($this->animalList as $animal) { $this->arrayField[$animal->y][$animal->x] = $animal->sign; } } //печать текущего состояния поля public function printField() { for ($i = 0; $i <= $this->height; $i++) { foreach ($this->arrayField[$i] as $place) { print $place; } print PHP_EOL; } } //возможность походить куда-либо, первый ход - остаться на месте, всегда доступен { foreach ($arrayMove as $i => $move) { if ($this->arrayField[$move->y][$move->x] != Battlefield::EMPTYCELL AND $i != 0) { } } else { } } return $arrayMove; } //высчитать расстояние между двумя объектами public static function getDistance($y, $x, $y2, $x2) { if($distanceY>=$distanceX){ return $distanceY; } else { return $distanceX; } } //механизм поедания мыши public function eating(Cat $cat, Mouse $mouse) { $mouse->map->arrayField[$mouse->y][$mouse->x] = $cat->altSign; $cat->map->arrayField[$cat->y][$cat->x] = Battlefield::EMPTYCELL; $cat->y = $mouse->y; $cat->x = $mouse->x; self::removeAnimal($mouse); $cat->isAsleep = TRUE; $cat->killed++; } public function findNearestAnimal(Animal $centreAnimal, $id) { $nearestCat = NULL; $nearestMouse = NULL; $nearestDog = NULL; $minDistance1 = INF; $minDistance2 = INF; $minDistance3 = INF; foreach ($this->animalList as $animal) { if ($animal instanceof Cat AND $animal != $centreAnimal) { $distance = self::getDistance($animal->y, $animal->x, $centreAnimal->y, $centreAnimal->x); if ($distance <= $centreAnimal->los AND $distance < $minDistance1) { $minDistance1 = $distance; $nearestCat = $animal; } } if($animal instanceof Mouse AND $animal != $centreAnimal) { $distance = self::getDistance($animal->y, $animal->x, $centreAnimal->y, $centreAnimal->x); if ($distance <= $centreAnimal->los AND $distance < $minDistance2) { $minDistance2 = $distance; $nearestMouse = $animal; } } if($animal instanceof Dog AND $animal != $centreAnimal) { $distance = self::getDistance($animal->y, $animal->x, $centreAnimal->y, $centreAnimal->x); if ($distance <= $centreAnimal->los AND $distance < $minDistance3) { $minDistance3 = $distance; $nearestDog = $animal; } } } switch($id): case 1: return $nearestMouse; break; case 2: return $nearestCat; break; case 3: return $nearestDog; break; default: return NULL; break; endswitch; } //измеряю расстояние до границ поля public function measureDistanceToEdges($y, $x) { $distanceY = 0; $distanceX = 0; if($y >= $this->height/2) { $distanceY = $this->height - $y; } else { $distanceY = $y - 1; } if($x >= $this->width/2) { $distanceX = $this->width - $x; } else { $distanceX = $x - 1; } $edgeDisntances = [ "y" => $distanceY, "x" => $distanceX ]; return $edgeDisntances; } //выбираем лучший ход, когда мышь почуяла кошку и пытается спастись. public function pickTheBestChoice(Mouse $mouse, Cat $cat, Movement $move) { $movePoints = 0; //смотрю, чтоб новая позиция увеличила расстояние меж мышью и котофеем //т.к. это оче важно даю 30 поинтов $currentDistance = self::getDistance($mouse->y, $mouse->x, $cat->y, $cat->x); $newDistance = self::getDistance($move->y, $move->x, $cat->y, $cat->x); if($newDistance > $currentDistance) { $movePoints += 50; } if($newDistance < $currentDistance) { $movePoints += 0; } //смотрю, чтоб новая позиция была подальше от краёв и углов. //если дальше, даю 10 баллов $currentEdgeDistance = self::measureDistanceToEdges($mouse->y, $mouse->x); $newEdgeDistance = self::measureDistanceToEdges($move->y, $move->x); //даю поинты за то, чтоб мышь шла наискось (т.к. стояние наискось может иметь то же расстояние, //что и на одной линии, но поймать сложнее. Иными словами, мышь ПЕТЛЯЕТ if($move->y != $cat->y AND $move->x != $cat->x) { $movePoints += 15; } //даю оче много поинтов за то, чтоб прижаться к псу, ЕСЛИ он рядом. // НЕ задаю целью мышек бегать за псом. $nearestDog = $mouse->map->findNearestAnimal($mouse, 3); if($nearestDog != NULL) { $newDistanceToTheDog = self::getDistance($move->y, $move->x, $nearestDog->y, $nearestDog->x); if ($newDistanceToTheDog == 1) { $movePoints += 70; } } return $movePoints; } //выбираем лучший ход для кошки. Тут незамысловато: //дистанция должна сокращаться, отдаём предпочтение тому ходу, что //выведет нас на одну линию с добычей. //также боимся собаки, не встаём на ближайшую клетку с ней // //если расстояние = 1, то включается код ДЗЕРО - уничтожить мышь одним прыжком //и заканчиваем функцию. public function huntDown(Cat $cat, Mouse $mouse, Movement $move) { $movePoints = 0; $codeZero = -1; $nearestDog = $cat->map->findNearestAnimal($cat, 3); $distanceBetweenDogAndMouse = self::getDistance($mouse->y, $mouse->x, $nearestDog->y, $nearestDog->x); if($nearestDog != NULL){ $newDistanceToTheDog = self::getDistance($move->y, $move->x, $nearestDog->y, $nearestDog->x); } else { $newDistanceToTheDog = INF; } $nearestFriendMouse = $mouse->map->findNearestAnimal($mouse, 1); if($nearestFriendMouse != NULL) { $distanceToFriendMouse = self::getDistance($nearestFriendMouse->y, $nearestFriendMouse->x, $mouse->y, $mouse->x ); } else { $distanceToFriendMouse = INF; } $currentDistance = self::getDistance($cat->y, $cat->x, $mouse->y, $mouse->x); if($currentDistance == 1 AND $distanceBetweenDogAndMouse > 1 AND $distanceToFriendMouse != 1){ return $codeZero; } $newDistance = self::getDistance($move->y, $move->x, $mouse->y, $mouse->x); if($newDistance < $currentDistance) { $movePoints += 40; } if($move->y == $mouse->y OR $move->x == $mouse->x) { $movePoints += 10; } if($newDistanceToTheDog == 1){ $movePoints -= 100; } return $movePoints; } public function letTheGameBegin() { $this->fillFieldWithAnimals(); for ($i = 0; $i <= $this->totalTurns; $i++) { $this->printField(); echo PHP_EOL; echo "Dogs 'team': " . PHP_EOL; foreach ($this->animalList as $animal) { if ($animal instanceof Dog) { echo $animal . PHP_EOL . $animal->go(); } } echo PHP_EOL; echo "Mice team: " . PHP_EOL; foreach ($this->animalList as $animal) { if($animal instanceof Mouse){ echo $animal . PHP_EOL; $animal->go(); $animal->turnsAlive++; } } echo PHP_EOL; echo "Cats team: " . PHP_EOL; foreach ($this->animalList as $animal) { if($animal instanceof Cat){ echo $animal; if($animal->isAsleep == TRUE){ echo " ". $animal->name . " is sleeping at the moment." . PHP_EOL; } else { echo PHP_EOL; } $animal->go(); } } echo PHP_EOL; } } } class Movement { public $x; public $y; public function __construct($y, $x){ $this->y = $y; $this->x = $x; } } abstract class Animal { public $name; //имя public $x; //координата по ширине public $y; //по высоте public $map; //аналог объекта $field, только для животных public $sign; //значок на карте public $los; //обзор abstract public function go(); abstract public function moves(); public static function create(){ } //для вывода статистики под полем игры public function __toString() { . "'s position: " . "Y: ". $this->y . " X: ". $this->x . "."; } public function __construct($name) { $this->name = $name; } //добыть карту животного, то же, что и field, только относительно животного буду называть её map. //то есть $animal->map это та же хуйня, что и $field и можно обращаться к переменным класса Battlefield public function setMap(Battlefield $field) { $this->map = $field; } //совершить ход. Тут идёт работа с визуальным массивом игрового поля + обновляем свои координаты public function makeMove(Movement $move) { $this->map->arrayField[$this->y][$this->x] = Battlefield::EMPTYCELL; $this->map->arrayField[$move->y][$move->x] = $this->sign; $this->y = $move->y; $this->x = $move->x; } } class Mouse extends Animal { public $sign = " m "; //решил не задавать жёстко поле зрения, чтоб можно было каждой прописывать своё, ////делая "слеповатых" мышей public $turnsAlive = 0; public function __toString() { return parent::__toString() . " Alive for " . $this->turnsAlive . " turns."; } //конструктор, добавляю поле зрения public function __construct($name, $los) { parent::__construct($name); $this->los = $los; } //возможные базовые ходы public function moves() { $move1 = new Movement($this->y, $this->x); $move2 = new Movement($this->y + 1, $this->x); $move3 = new Movement($this->y - 1, $this->x); $move4 = new Movement($this->y, $this->x + 1); $move5 = new Movement($this->y, $this->x - 1); return $arrayMove; //на выходе массив с возможными ходами, не выходящими за рамки игрового поля } //обобщающая функция для передвижения, сделал для краткости //суть: мышь ходит так - через свою функцию makeBestMove, куда берёт аргументом //массив из всех ходов из функции moves() public function go() { $this->makeBestMove($this->moves()); } //функция, которая решает, какой ход из всех доступных совершить { //проверяю, вообще можно ли ходить туда-то, т.е. свободна ли ячейка. $arrayMove = $this->map->getPossibilityOfMovement($arrayMove); //ищу ближайшую кошку в обзоре, если её нет, то мышь спокойно идёт, куда хочет. //если есть в поле зрения котофей, то запускаю функцию по оценке следующего хода. $nearestCat = $this->map->findNearestAnimal($this, 2); switch($nearestCat): case NULL: break; case !NULL: $maxPoints = -INF; foreach($arrayMove as $move) { $points = $this->map->pickTheBestChoice($this, $nearestCat, $move); if($points > $maxPoints) { $maxPoints = $points; $finalMove = $move; } } break; endswitch; $this->makeMove($finalMove); } } class Cat extends Animal { public $sign = " K "; public $altSign = " @ "; //альтернативный значок public $los = INF; public $isAsleep = FALSE; public $tireLevel = 0; //счётчики для сна public $daysSlept = 0; public $killed = 0; public function __toString() { return parent::__toString() . "Has killed " . $this->killed . " mice."; } //обобщающая функция ходьбы для кота. Принцип тот же, что и у мыхана, только проверяем усталость public function go() { //пробуждаемся if($this->daysSlept == 1){ $this->isAsleep = FALSE; $this->tireLevel = 0; $this->daysSlept = 0; $this->map->arrayField[$this->y][$this->x] = $this->sign; } //сам ход, если спим - считаем дни, если нет - ходим. if($this->isAsleep == TRUE){ $this->tireLevel = 0; $this->daysSlept++; $this->map->arrayField[$this->y][$this->x] = $this->altSign; } else { $this->makeBestMove($this->moves()); $this->tireLevel++; } //проверяем усталость, если 8, то ложимся спать if($this->tireLevel == 8){ $this->isAsleep = TRUE; $this->tireLevel = 0; $this->map->arrayField[$this->y][$this->x] = $this->altSign; } } public function moves() { $move1 = new Movement($this->y, $this->x); $move2 = new Movement($this->y + 1, $this->x); $move3 = new Movement($this->y - 1, $this->x); $move4 = new Movement($this->y, $this->x + 1); $move5 = new Movement($this->y, $this->x - 1); $move6 = new Movement($this->y + 1, $this->x + 1); $move7 = new Movement($this->y - 1, $this->x - 1); $move8 = new Movement($this->y + 1, $this->x - 1); $move9 = new Movement($this->y - 1, $this->x + 1); return $arrayMove; } //выбираем лучший ход кота. Т.к. он видит всё, то ему проще. Проверяем, свободна ли клетка для ходьбы, //ищем ближайщего мыхана и бежим к нему. //если расстояние меж ними = 1, то жрём. { $arrayMove = $this->map->getPossibilityOfMovement($arrayMove); $nearestMouse = $this->map->findNearestAnimal($this, 1); if($nearestMouse == NULL){ } else { $maxPoints = -INF; foreach ($arrayMove as $move) { $points = $this->map->huntDown($this, $nearestMouse, $move); if ($points == -1) { //активируем код ДЗЕРО $this->map->eating($this, $nearestMouse); return; } elseif ($points > $maxPoints) { $maxPoints = $points; $finalMove = $move; } } } $this->makeMove($finalMove); } } class Dog extends Animal { public $los = INF; //пусть будет public $sign = " D "; public $saying = [ "Just wandering around.", "Being a dog.", "Has no idea what he's doing.", "Being blind to mice problems.", "Just being a dog.", "Chasing a bird in the sky", " ", " ", " ", " ", "Barking at a tree.", "Has done nothing so far." ]; public function __toString() { } public function go() { $this->makeBestMove($this->moves()); } public function moves() { $move1 = new Movement($this->y, $this->x); $move2 = new Movement($this->y + 2, $this->x); $move3 = new Movement($this->y - 2, $this->x); $move4 = new Movement($this->y, $this->x + 2); $move5 = new Movement($this->y, $this->x - 2); $move6 = new Movement($this->y + 2, $this->x + 2); $move7 = new Movement($this->y - 2, $this->x - 2); $move8 = new Movement($this->y + 2, $this->x - 2); $move9 = new Movement($this->y - 2, $this->x + 2); return $arrayMove; } //лучший ход для пса - рандомный в свободную клетку. Если таковых нет - стоять на месте. { $arrayMove = $this->map->getPossibilityOfMovement($arrayMove); } $this->makeMove($finalMove); } } $field = new Battlefield(11,11, 30); $field->setField(); $mouse1 = new Mouse("Dorothy", 4); $mouse2 = new Mouse("Benedicta", 4); $mouse3 = new Mouse("Roberta", 4); $mouse5 = new Mouse("Stevie Wonder", 1); $mouse5->sign = " s "; $mouse6 = new Mouse("Gerthrude", 4); $mouse7 = new Mouse("Gwyneth", 4); $dog1 = new Dog("Stephan"); $cat1 = new Cat("Mew"); $cat2 = new Cat("Mr. Whiskers "); $cat3 = new Cat("Alexander Anderson"); $field->addAnimal($mouse1); $field->addAnimal($mouse2); $field->addAnimal($mouse3); $field->addAnimal($mouse5); $field->addAnimal($mouse6); $field->addAnimal($mouse7); $field->addAnimal($dog1); $field->addAnimal($cat1); $field->addAnimal($cat2); $field->addAnimal($cat3); $field->letTheGameBegin();
Standard input is empty
. . . . . . . . . . . . m . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . m . . . K . . . . . . . . . . . . . . . . m K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . s . . . . . K . . . . . . . m . Dogs 'team': D. Stephan's position: Y: 2 X: 3. Being blind to mice problems. Mice team: m. Dorothy's position: Y: 11 X: 10. Alive for 0 turns. m. Benedicta's position: Y: 5 X: 7. Alive for 0 turns. m. Roberta's position: Y: 6 X: 4. Alive for 0 turns. s. Stevie Wonder's position: Y: 10 X: 8. Alive for 0 turns. m. Gerthrude's position: Y: 1 X: 0. Alive for 0 turns. m. Gwyneth's position: Y: 8 X: 1. Alive for 0 turns. Cats team: K. Mew's position: Y: 8 X: 2.Has killed 0 mice. K. Mr. Whiskers 's position: Y: 11 X: 2.Has killed 0 mice. K. Alexander Anderson's position: Y: 6 X: 8.Has killed 0 mice. . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . m K . . . . . . . . . m . . . . . . . . . . . . . . . . . . m K . . . . . . . . . . . . . . . . . . . . . . . . K . . . . s . . m . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 4 X: 1. Being blind to mice problems. Mice team: m. Dorothy's position: Y: 10 X: 10. Alive for 1 turns. m. Benedicta's position: Y: 5 X: 6. Alive for 1 turns. m. Roberta's position: Y: 6 X: 5. Alive for 1 turns. s. Stevie Wonder's position: Y: 10 X: 7. Alive for 1 turns. m. Gerthrude's position: Y: 2 X: 0. Alive for 1 turns. m. Gwyneth's position: Y: 8 X: 0. Alive for 1 turns. Cats team: K. Mew's position: Y: 8 X: 1.Has killed 0 mice. K. Mr. Whiskers 's position: Y: 10 X: 2.Has killed 0 mice. K. Alexander Anderson's position: Y: 5 X: 7.Has killed 0 mice. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . . . . . . . D . . . . . . . . . . . . . m K . . . . . . . . . m . . . . . . . @ . . . . . . . . . . . . . . . . . . . . . . . . . K . . . . . . . . . . . . . . . . . . . . . . . . . . . . s . . m . Dogs 'team': D. Stephan's position: Y: 4 X: 3. Mice team: m. Dorothy's position: Y: 11 X: 10. Alive for 2 turns. m. Benedicta's position: Y: 5 X: 5. Alive for 2 turns. m. Roberta's position: Y: 6 X: 4. Alive for 2 turns. s. Stevie Wonder's position: Y: 11 X: 7. Alive for 2 turns. m. Gerthrude's position: Y: 3 X: 0. Alive for 2 turns. Cats team: K. Mew's position: Y: 7 X: 0.Has killed 1 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 9 X: 2.Has killed 0 mice. K. Alexander Anderson's position: Y: 5 X: 6.Has killed 0 mice. . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m K . . . . . . . . . D m . . . . . . . @ . . . . . . . . . . . . . K . . . . . . . . . . . . . . . . . . . . . . . . . . . . s . . . . . . . . . . . . . . . m Dogs 'team': D. Stephan's position: Y: 6 X: 3. Has no idea what he's doing. Mice team: m. Dorothy's position: Y: 11 X: 11. Alive for 3 turns. m. Benedicta's position: Y: 5 X: 4. Alive for 3 turns. m. Roberta's position: Y: 6 X: 4. Alive for 3 turns. s. Stevie Wonder's position: Y: 10 X: 7. Alive for 3 turns. m. Gerthrude's position: Y: 2 X: 0. Alive for 3 turns. Cats team: K. Mew's position: Y: 7 X: 0.Has killed 1 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 8 X: 2.Has killed 0 mice. K. Alexander Anderson's position: Y: 5 X: 5.Has killed 0 mice. . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m K . . . . . . . . K . . . . . . . . . . . . . K m . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . s . . m . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 8 X: 1. Being blind to mice problems. Mice team: m. Dorothy's position: Y: 10 X: 11. Alive for 4 turns. m. Benedicta's position: Y: 5 X: 3. Alive for 4 turns. m. Roberta's position: Y: 7 X: 4. Alive for 4 turns. s. Stevie Wonder's position: Y: 10 X: 8. Alive for 4 turns. m. Gerthrude's position: Y: 2 X: 0. Alive for 4 turns. Cats team: K. Mew's position: Y: 6 X: 1.Has killed 1 mice. K. Mr. Whiskers 's position: Y: 7 X: 3.Has killed 0 mice. K. Alexander Anderson's position: Y: 5 X: 4.Has killed 0 mice. . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . . . K K . . . . . . . . . . . . . . . . . . . . . D m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . s . . . Dogs 'team': D. Stephan's position: Y: 8 X: 3. Mice team: m. Dorothy's position: Y: 10 X: 11. Alive for 5 turns. m. Roberta's position: Y: 8 X: 4. Alive for 5 turns. s. Stevie Wonder's position: Y: 11 X: 8. Alive for 5 turns. m. Gerthrude's position: Y: 1 X: 0. Alive for 5 turns. Cats team: K. Mew's position: Y: 5 X: 2.Has killed 2 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 6 X: 4.Has killed 0 mice. K. Alexander Anderson's position: Y: 6 X: 5.Has killed 0 mice. m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . . . . . . . . . . . . . . . K K . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . . . . . D . . . . . . . . . . . . . . . s . m Dogs 'team': D. Stephan's position: Y: 10 X: 5. Mice team: m. Dorothy's position: Y: 11 X: 11. Alive for 6 turns. m. Roberta's position: Y: 9 X: 4. Alive for 6 turns. s. Stevie Wonder's position: Y: 11 X: 9. Alive for 6 turns. m. Gerthrude's position: Y: 0 X: 0. Alive for 6 turns. Cats team: K. Mew's position: Y: 5 X: 2.Has killed 2 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 7 X: 4.Has killed 0 mice. K. Alexander Anderson's position: Y: 7 X: 5.Has killed 0 mice. . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K . K . . . . . . . . . . . . . . . . . . . . . . D m K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . s . . m Dogs 'team': D. Stephan's position: Y: 8 X: 3. Barking at a tree. Mice team: m. Dorothy's position: Y: 11 X: 11. Alive for 7 turns. m. Roberta's position: Y: 8 X: 4. Alive for 7 turns. s. Stevie Wonder's position: Y: 11 X: 8. Alive for 7 turns. m. Gerthrude's position: Y: 0 X: 1. Alive for 7 turns. Cats team: K. Mew's position: Y: 6 X: 2.Has killed 2 mice. K. Mr. Whiskers 's position: Y: 6 X: 4.Has killed 0 mice. K. Alexander Anderson's position: Y: 8 X: 5.Has killed 0 mice. m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K . @ . . . . . . . . . . . @ . . . . . . . . . . . m . . . . . . . . . . . . D . . s . . m . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 10 X: 5. Has done nothing so far. Mice team: m. Dorothy's position: Y: 10 X: 11. Alive for 8 turns. m. Roberta's position: Y: 9 X: 4. Alive for 8 turns. s. Stevie Wonder's position: Y: 10 X: 8. Alive for 8 turns. m. Gerthrude's position: Y: 0 X: 0. Alive for 8 turns. Cats team: K. Mew's position: Y: 7 X: 2.Has killed 2 mice. K. Mr. Whiskers 's position: Y: 7 X: 4.Has killed 0 mice. Mr. Whiskers is sleeping at the moment. K. Alexander Anderson's position: Y: 8 X: 4.Has killed 0 mice. Alexander Anderson is sleeping at the moment. m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . K . @ . . D . . . . . . . . . . . . . . . . . . . . m . . . . . m . . . . . . . . . s . . . Dogs 'team': D. Stephan's position: Y: 8 X: 7. Chasing a bird in the sky Mice team: m. Dorothy's position: Y: 10 X: 10. Alive for 9 turns. m. Roberta's position: Y: 10 X: 4. Alive for 9 turns. s. Stevie Wonder's position: Y: 11 X: 8. Alive for 9 turns. m. Gerthrude's position: Y: 0 X: 0. Alive for 9 turns. Cats team: K. Mew's position: Y: 8 X: 2.Has killed 2 mice. K. Mr. Whiskers 's position: Y: 7 X: 4.Has killed 0 mice. Mr. Whiskers is sleeping at the moment. K. Alexander Anderson's position: Y: 8 X: 4.Has killed 0 mice. Alexander Anderson is sleeping at the moment. . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K . K . . . . . . . . . . . K . . . . . . . . . . . m . . s D . . . . . . . . . . . . m . Dogs 'team': D. Stephan's position: Y: 10 X: 9. Barking at a tree. Mice team: m. Dorothy's position: Y: 11 X: 10. Alive for 10 turns. m. Roberta's position: Y: 10 X: 5. Alive for 10 turns. s. Stevie Wonder's position: Y: 10 X: 8. Alive for 10 turns. m. Gerthrude's position: Y: 1 X: 0. Alive for 10 turns. Cats team: K. Mew's position: Y: 8 X: 3.Has killed 2 mice. K. Mr. Whiskers 's position: Y: 8 X: 5.Has killed 0 mice. K. Alexander Anderson's position: Y: 9 X: 5.Has killed 0 mice. . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . K . . K . . . . . . . . . . K . s . . . . . . . . . m . . . . . m Dogs 'team': D. Stephan's position: Y: 8 X: 9. Being blind to mice problems. Mice team: m. Dorothy's position: Y: 11 X: 11. Alive for 11 turns. m. Roberta's position: Y: 11 X: 5. Alive for 11 turns. s. Stevie Wonder's position: Y: 10 X: 7. Alive for 11 turns. m. Gerthrude's position: Y: 2 X: 0. Alive for 11 turns. Cats team: K. Mew's position: Y: 9 X: 3.Has killed 2 mice. K. Mr. Whiskers 's position: Y: 9 X: 6.Has killed 0 mice. K. Alexander Anderson's position: Y: 10 X: 5.Has killed 0 mice. . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K . . . . . . . . . . . . . K . . D . m . . . . . K m s . . . . Dogs 'team': D. Stephan's position: Y: 10 X: 9. Just being a dog. Mice team: m. Dorothy's position: Y: 10 X: 11. Alive for 12 turns. m. Roberta's position: Y: 11 X: 6. Alive for 12 turns. s. Stevie Wonder's position: Y: 11 X: 7. Alive for 12 turns. m. Gerthrude's position: Y: 1 X: 0. Alive for 12 turns. Cats team: K. Mew's position: Y: 9 X: 4.Has killed 2 mice. K. Mr. Whiskers 's position: Y: 10 X: 6.Has killed 0 mice. K. Alexander Anderson's position: Y: 11 X: 5.Has killed 0 mice. . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K . . . . . m . . . . . K . D . . . . . . . . . K m . s . . . Dogs 'team': D. Stephan's position: Y: 10 X: 7. Just wandering around. Mice team: m. Dorothy's position: Y: 9 X: 11. Alive for 13 turns. m. Roberta's position: Y: 11 X: 6. Alive for 13 turns. s. Stevie Wonder's position: Y: 11 X: 8. Alive for 13 turns. m. Gerthrude's position: Y: 1 X: 1. Alive for 13 turns. Cats team: K. Mew's position: Y: 10 X: 5.Has killed 2 mice. K. Mr. Whiskers 's position: Y: 9 X: 5.Has killed 0 mice. K. Alexander Anderson's position: Y: 11 X: 5.Has killed 0 mice. . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . m . . . . . . . K . . . . . . . . . . K @ m s . . . Dogs 'team': D. Stephan's position: Y: 8 X: 9. Being a dog. Mice team: m. Dorothy's position: Y: 9 X: 10. Alive for 14 turns. m. Roberta's position: Y: 11 X: 7. Alive for 14 turns. s. Stevie Wonder's position: Y: 11 X: 8. Alive for 14 turns. m. Gerthrude's position: Y: 1 X: 0. Alive for 14 turns. Cats team: K. Mew's position: Y: 11 X: 6.Has killed 2 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 10 X: 6.Has killed 0 mice. K. Alexander Anderson's position: Y: 11 X: 5.Has killed 0 mice. . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . K K m s . . . . . . . . . @ . . . . . Dogs 'team': D. Stephan's position: Y: 6 X: 11. Has no idea what he's doing. Mice team: m. Dorothy's position: Y: 9 X: 11. Alive for 15 turns. m. Roberta's position: Y: 10 X: 7. Alive for 15 turns. s. Stevie Wonder's position: Y: 10 X: 8. Alive for 15 turns. m. Gerthrude's position: Y: 2 X: 0. Alive for 15 turns. Cats team: K. Mew's position: Y: 11 X: 6.Has killed 2 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 10 X: 6.Has killed 0 mice. K. Alexander Anderson's position: Y: 10 X: 5.Has killed 0 mice. . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . @ . . . . . . . . . . K K . s . m . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 8 X: 9. Mice team: m. Dorothy's position: Y: 10 X: 11. Alive for 16 turns. s. Stevie Wonder's position: Y: 10 X: 9. Alive for 16 turns. m. Gerthrude's position: Y: 1 X: 0. Alive for 16 turns. Cats team: K. Mew's position: Y: 10 X: 7.Has killed 2 mice. K. Mr. Whiskers 's position: Y: 9 X: 7.Has killed 1 mice. Mr. Whiskers is sleeping at the moment. K. Alexander Anderson's position: Y: 10 X: 6.Has killed 0 mice. m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . m . . . . . . . @ @ . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 6 X: 7. Being a dog. Mice team: m. Dorothy's position: Y: 9 X: 11. Alive for 17 turns. m. Gerthrude's position: Y: 0 X: 0. Alive for 17 turns. Cats team: K. Mew's position: Y: 10 X: 8.Has killed 3 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 9 X: 7.Has killed 1 mice. Mr. Whiskers is sleeping at the moment. K. Alexander Anderson's position: Y: 10 X: 7.Has killed 0 mice. Alexander Anderson is sleeping at the moment. . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K . . m . . . . . . . . . . . . . . . . . . . @ @ . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 4 X: 5. Has no idea what he's doing. Mice team: m. Dorothy's position: Y: 8 X: 11. Alive for 18 turns. m. Gerthrude's position: Y: 1 X: 0. Alive for 18 turns. Cats team: K. Mew's position: Y: 10 X: 8.Has killed 3 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 8 X: 8.Has killed 1 mice. K. Alexander Anderson's position: Y: 10 X: 7.Has killed 0 mice. Alexander Anderson is sleeping at the moment. . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . K . m . . . . . . . . . . . . . . . . . . . . . K . . . . . . . . . . K . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 6 X: 7. Has done nothing so far. Mice team: m. Dorothy's position: Y: 7 X: 11. Alive for 19 turns. m. Gerthrude's position: Y: 2 X: 0. Alive for 19 turns. Cats team: K. Mew's position: Y: 9 X: 9.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 7 X: 9.Has killed 1 mice. K. Alexander Anderson's position: Y: 10 X: 8.Has killed 0 mice. . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . K m . . . . . . . . . . . . . . . . . . . . . K . . . . . . . . . . K . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 6 X: 5. Mice team: m. Dorothy's position: Y: 6 X: 11. Alive for 20 turns. m. Gerthrude's position: Y: 1 X: 0. Alive for 20 turns. Cats team: K. Mew's position: Y: 8 X: 9.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 6 X: 10.Has killed 1 mice. K. Alexander Anderson's position: Y: 9 X: 8.Has killed 0 mice. . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . K @ . . . . . . . . K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 6 X: 7. Mice team: m. Gerthrude's position: Y: 1 X: 1. Alive for 21 turns. Cats team: K. Mew's position: Y: 7 X: 10.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 7 X: 11.Has killed 2 mice. Mr. Whiskers is sleeping at the moment. K. Alexander Anderson's position: Y: 8 X: 8.Has killed 0 mice. . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K . @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 4 X: 9. Mice team: m. Gerthrude's position: Y: 1 X: 2. Alive for 22 turns. Cats team: K. Mew's position: Y: 7 X: 9.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 7 X: 11.Has killed 2 mice. Mr. Whiskers is sleeping at the moment. K. Alexander Anderson's position: Y: 7 X: 8.Has killed 0 mice. . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . K K . . . . . . . . . K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 6 X: 7. Mice team: m. Gerthrude's position: Y: 1 X: 2. Alive for 23 turns. Cats team: K. Mew's position: Y: 7 X: 9.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 7 X: 10.Has killed 2 mice. K. Alexander Anderson's position: Y: 8 X: 8.Has killed 0 mice. . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K . . . . . . . . . K . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 8 X: 9. Mice team: m. Gerthrude's position: Y: 1 X: 2. Alive for 24 turns. Cats team: K. Mew's position: Y: 6 X: 8.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 6 X: 9.Has killed 2 mice. K. Alexander Anderson's position: Y: 7 X: 7.Has killed 0 mice. . . . . . . . . . . . . . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 10 X: 7. Just wandering around. Mice team: m. Gerthrude's position: Y: 2 X: 2. Alive for 25 turns. Cats team: K. Mew's position: Y: 6 X: 7.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 6 X: 8.Has killed 2 mice. K. Alexander Anderson's position: Y: 6 X: 6.Has killed 0 mice. . . . . . . . . . . . . . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ @ . . . . . . . . . . . . K . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 8 X: 5. Just being a dog. Mice team: m. Gerthrude's position: Y: 1 X: 2. Alive for 26 turns. Cats team: K. Mew's position: Y: 5 X: 6.Has killed 3 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 6 X: 7.Has killed 2 mice. K. Alexander Anderson's position: Y: 5 X: 5.Has killed 0 mice. Alexander Anderson is sleeping at the moment. . . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ @ K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 8 X: 7. Mice team: m. Gerthrude's position: Y: 0 X: 2. Alive for 27 turns. Cats team: K. Mew's position: Y: 5 X: 6.Has killed 3 mice. Mew is sleeping at the moment. K. Mr. Whiskers 's position: Y: 5 X: 7.Has killed 2 mice. K. Alexander Anderson's position: Y: 5 X: 5.Has killed 0 mice. Alexander Anderson is sleeping at the moment. . m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K . . . . . . . . . . . . K . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 6 X: 9. Barking at a tree. Mice team: m. Gerthrude's position: Y: 0 X: 1. Alive for 28 turns. Cats team: K. Mew's position: Y: 4 X: 5.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 5 X: 6.Has killed 2 mice. K. Alexander Anderson's position: Y: 4 X: 4.Has killed 0 mice. m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K . . . . . . . . . . . . . . . . . . . . . . . . K . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 6 X: 7. Mice team: m. Gerthrude's position: Y: 0 X: 0. Alive for 29 turns. Cats team: K. Mew's position: Y: 3 X: 4.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 5 X: 5.Has killed 2 mice. K. Alexander Anderson's position: Y: 3 X: 3.Has killed 0 mice. . . . . . . . . . . . . m . . . . . . . . . . . . . . K . . . . . . . . . . K . . . . . . . . . . . . . . . . D . . . . . . . . @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dogs 'team': D. Stephan's position: Y: 4 X: 7. Mice team: m. Gerthrude's position: Y: 1 X: 0. Alive for 30 turns. Cats team: K. Mew's position: Y: 2 X: 3.Has killed 3 mice. K. Mr. Whiskers 's position: Y: 5 X: 4.Has killed 2 mice. Mr. Whiskers is sleeping at the moment. K. Alexander Anderson's position: Y: 3 X: 2.Has killed 0 mice.