I was playing white pieces. Black King was in position E6 so I moved a white bishop to f7 and black King took my bishop by moving to E6. So far everything is good, but then later in the game I had White King in H1 corner surrounded by pawns in G2 ,H2 and a knight in G1 then he proceeds to take my G2 pawn and black wins. How come black King was able to my bishop but I couldn't take his by moving my king to G2?