![]() ![]() ![]() The computer must make moves which lead to the goal. The problems begin when the computer solves the game. In this case, we notify the user and reset the game. It is also possible that no more moves are possible and the goal isn't reached. All we have to do is to validate the user move and check if he has reached the goal. Writing the code for playing the game is simple. The frog with an 'R' can move from right to left for one position or for two positions, if it jumps the frog with an 'L'. The frog with an 'L' can move from left to right for one position or for two positions if it jumps the frog with an 'R'.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |