function markov_chain_game = Snakes_and_Ladders_builder( board_size,starts,finishes)
%SNAKES_AND_LADDERS_BUILDER builds a snakes and ladders Markov Chain game

markov_chain_game=zeros(board_size);

for i=1:board_size-6
    markov_chain_game(i,i+1:i+6)=1/6;
end

markov_chain_game(board_size-5,board_size-4:board_size-1)=1/6;
markov_chain_game(board_size-5,board_size)=2/6;

markov_chain_game(board_size-4,board_size-3:board_size-1)=1/6;
markov_chain_game(board_size-4,board_size)=3/6;

markov_chain_game(board_size-3,board_size-2:board_size-1)=1/6;
markov_chain_game(board_size-3,board_size)=4/6;

markov_chain_game(board_size-2,board_size-1)=1/6;
markov_chain_game(board_size-2,board_size)=5/6;

markov_chain_game(board_size-1,board_size)=1;

markov_chain_game(board_size,board_size)=1;

for i=1:board_size
    for j=1:length(starts)
        if markov_chain_game(i,starts(j))~=0
            markov_chain_game(i,starts(j))=0;
            markov_chain_game(i,finishes(j))=...
                markov_chain_game(i,finishes(j))+1/6;
        end
    end
end





end

