[Test] //copyのテスト public void test_copy_color() { puyopuyo test_target = new puyopuyo(); test_target.init(); test_target.set_color(0, 1); test_target.set_color(1, 2); puyopuyo copy_obj = new puyopuyo(); copy_obj.copy_color(test_target); for (int i = 0; i < 2; i++) { int color = copy_obj.get_color(i); Assert.AreEqual(color, i + 1); } }
public void test_fix() { GameField test_target = new GameField(); test_target.init(); puyopuyo test_puyo = new puyopuyo(); test_puyo.init(); test_puyo.set_position(0, 1, 0); test_puyo.set_position(1, 1, 1); test_puyo.set_color(0, 2); test_puyo.set_color(1, 3); test_target.fix(test_puyo); Assert.AreEqual(2, test_target.get_value(1, 0)); Assert.AreEqual(3, test_target.get_value(1, 1)); Assert.AreEqual(1, test_target.get_state()); }
//update next public void update_next() { m_puyopuyo.set_color(0, getRandom()); m_puyopuyo.set_color(1, getRandom()); }