テストコードの記述
place_pieceのテスト
# 概要: コマの配置メソッドを担保する
# 期待値: 入力した値に応じてコマが配置されること
def test_place_piece
end実装例
# 概要: コマの配置メソッドを担保する
# 期待値: 入力した値に応じてコマが配置されること
def test_place_piece
board = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
place_piece(board, 1, 0, 0)
assert_equal 1, board[0][0]
board = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
place_piece(board, 2, 1, 1)
assert_equal 2, board[1][1]
endget_oppnent_playerのテスト
実装例
win?のテスト
実装例
can_plase_piece?のテスト
実装例
continue?のテスト
実装例
gets_piece_locationのテスト
実装例
最終更新