編集し直します。パズルゲーム『倉庫番』を解くソフトを作ろうと思っているのですが、
class t_node { public ulong hash_key; // ノードのハッシュ値 public ulong before_hash_key; // 前のノードのハッシュ値 public static int[] box_pos = new int[BAGGAGE_MAX]; // 箱の位置 public int box_number; // 動かした箱の番号 public int man_pos; // プレイヤーがいる位置 public int step; // 歩数 public int state; // 既に探索したノードかどうか public int cost; // 現在位置のコスト(低いほどよい) } // 正解の手を探索 void playstep_search() { t_node nownode = new t_node(); // 現在の局面 t_node newnode = new t_node(); // 現在の局面から番人を一手動かしてみた局面 // 以下色々 }
としてnewnode.man_pos の値を変えても nownode.man_pos の値が変わらないようにしたいのですが、何か良い方法はないでしょうか?
回答6件
あなたの回答
tips
プレビュー