<?php
abstract class Animal{
	protected $x;
	protected $y;
	protected $icon;

	public function __construct($coordinateX, $coordinateY, $symbol){
		$this->x = $coordinateX;
		$this->y = $coordinateY;
		$this->icon = $symbol;
	}
	public function getCoordinateX(){
		return $this->x;
	}
	public function getCoordinateY(){
		return $this->y;
	}
	public function getIcon(){
		return $this->icon;
	}
}

class Mouse extends Animal{

}


class GameField{
	protected $field;

	public function __construct($height, $width){
		$this->field = array_fill(0, $height, array_fill(0, $width, " . "));
	}
	public function printField(){
		foreach($this->field as $value){
			foreach($value as $dot){
				echo $dot;
			}
			echo "\n";
		}
	}
	public function aquireMouse(Mouse $mice){
		$x = $mice->getCoordinateX();
		$y = $mice->getCoordinateY();
		$this->field[$x][$y]=$mice->getIcon();
	}
}



$test = new GameField(20, 20);

$mouse1 = new Mouse(3, 15, " 1 ");
$test->aquireMouse($mouse1);
$test->printField();