user2042: [Title "White to move"]
[fen "8/p3k3/1p2b2p/2pBPpp1/7P/P1P1K1P1/2P5/8 w - - 0 1"]

Computer played 1.c4?after which I played 1...Bxd5!and the pawn endgame was lost for White. I wonder if there was a way for Black to win this game, with best play from both sides?

user2042: It seems that member Dag Oskar Madsen was right, ...Kd7!, cutting off the White bishop's access to c8, is the winning idea. The only trap Black must evade is to lose the bishop after ...Ba2. Below is my analysis: 
[Title "White to move"]
[fen "8/p3k3/1p2b2p/2pBPpp1/7P/P1P1K1P1/2P5/8 w - - 0 1"]

1.Bb7 $8 { Every other move lose the pawn on e5. } ( 1.c4? Bxd5 2.cxd5 b5!-+ ) 1...Kd7! { As member Dag Oskar Madsen pointed out, this move offers best winning chances because it cuts of bishop's access to c8 square. Now when Black bishop moves White will not be able to stop Black king to reach e6 and the e5 pawn will fall. } 2.Kd3 b5! ( 2...Ba2 3.hxg5 hxg5 4.c4 Ke6 5.a4! Kxe5 6.Kc3 f4 7.gxf4+ Kxf4 8.Bd5 $8 g4 9.Kb2 Bxc4 10.Bxc4 Ke4 11.Kc3 g3= ) 3.Ke3 $8 { Otherwise Black plays Bc4+ and gets time to play Ke6, winning the e5 pawn and with it the game. } Bc4 4.Ba6 Ke6 5.hxg5 hxg5 6.a4 Kxe5 7.Kf2 { There is no need to fear axb5 because White can not keep that pawn in the long run because his bishop is badly placed. White will need to reposition the bishop in order to fight Black passed pawn, after which Black bishop takes the b5 pawn. } Ke4 8.axb5 Ke5 9.Kf3 Bd5+ 10.Ke2 Be4 11.Ke3 Bxc2 $17


2042: <pre><code>[Title "White to move"]
[fen "8/p3k3/1p2b2p/2pBPpp1/7P/P1P1K1P1/2P5/8 w - - 0 1"]
</code></pre>

<p>Computer played <code>1.c4?</code>after which I played <code>1...Bxd5!</code>and the pawn endgame was lost for White. I wonder if there was a way for Black to win this game, with best play from both sides?</p>
 2042: <p>It seems that member <em>Dag Oskar Madsen</em> was right, <code>...Kd7!</code>, cutting off the White bishop's access to <code>c8</code>, is the winning idea. The only trap Black must evade is to lose the bishop after <code>...Ba2</code>. Below is my analysis: </p>

<pre><code>[Title "White to move"]
[fen "8/p3k3/1p2b2p/2pBPpp1/7P/P1P1K1P1/2P5/8 w - - 0 1"]

1.Bb7 $8 { Every other move lose the pawn on e5. } ( 1.c4? Bxd5 2.cxd5 b5!-+ ) 1...Kd7! { As member Dag Oskar Madsen pointed out, this move offers best winning chances because it cuts of bishop's access to c8 square. Now when Black bishop moves White will not be able to stop Black king to reach e6 and the e5 pawn will fall. } 2.Kd3 b5! ( 2...Ba2 3.hxg5 hxg5 4.c4 Ke6 5.a4! Kxe5 6.Kc3 f4 7.gxf4+ Kxf4 8.Bd5 $8 g4 9.Kb2 Bxc4 10.Bxc4 Ke4 11.Kc3 g3= ) 3.Ke3 $8 { Otherwise Black plays Bc4+ and gets time to play Ke6, winning the e5 pawn and with it the game. } Bc4 4.Ba6 Ke6 5.hxg5 hxg5 6.a4 Kxe5 7.Kf2 { There is no need to fear axb5 because White can not keep that pawn in the long run because his bishop is badly placed. White will need to reposition the bishop in order to fight Black passed pawn, after which Black bishop takes the b5 pawn. } Ke4 8.axb5 Ke5 9.Kf3 Bd5+ 10.Ke2 Be4 11.Ke3 Bxc2 $17
</code></pre>
