Most efficient algorithm to determine if a path of same coloured nodes can be found between two nodes of a graph of muti-coloured nodes
<p>Apologies if the title is quite confusing.</p>

<p>I am writing the "Risk" boardgame in Java where the <a href="http://i.imgur.com/Kwup0x8.png" rel="nofollow">map</a> is a node graph made up of nodes of several colours. I need to write an algorithm which determines if a path (along the solid blank lines) can be found between two nodes, where all nodes between the given two nodes, inclusive, are all of the same colour (the colours of the smaller inner circles, not the larger conitnent coloured circles). </p>

<p>For example, in the given image above:</p>

<ul>
<li><p>E Africa to Ural is a valid path (E Africa > Middle East > Afghanistan > Ural are all yellow nodes).</p></li>
<li><p>E Africa to Peru is not (N Africa breaks the path of yellow nodes).</p></li>
</ul>

<p>At each node, I am able to check the colour of all of its adjacent nodes, move onto one of these adjacent nodes and repeat. What would be the most efficient way to determine if such a path exists?</p>

<p>Thank you for any help in advance.</p>