<?php
class World {
...
public function move($from, $to) {
...
//$this->map = array_fill(0, $x, array_fill(0, $y, ''));
$this->map[$to['x']][$to['y']] = $this->map[$from['x']][$from['y']];
$this->map[$from['x']][$from['y']] = '';
}
...
}
PD9waHAKY2xhc3MgV29ybGQgewoKLi4uCgoKcHVibGljIGZ1bmN0aW9uIG1vdmUoJGZyb20sICR0bykgewoJLi4uCgkKCS8vJHRoaXMtPm1hcCA9IGFycmF5X2ZpbGwoMCwgJHgsIGFycmF5X2ZpbGwoMCwgJHksICcnKSk7CgkkdGhpcy0+bWFwWyR0b1sneCddXVskdG9bJ3knXV0gPSAkdGhpcy0+bWFwWyRmcm9tWyd4J11dWyRmcm9tWyd5J11dOwoJJHRoaXMtPm1hcFskZnJvbVsneCddXVskZnJvbVsneSddXSA9ICcnOwp9CgouLi4KfQ==