public void setPosition(GameObject obj) { Chessman cm = obj.GetComponent <Chessman>(); positions[cm.getXBoard(), cm.getYBoard()] = obj; }