State representation
In the 8Puzzle the state of each step in the solution is an array of tiles. In the water jug it can be an array of jug levels [0,0]
You can replace tiles with jugs TILE tiles[ BOARD_WIDTH*BOARD_HEIGHT ]; int jug_levels[ 2 ];
State transitions