src/Log.java
//Declare move method for the log
Declare move method for the log
Declare move method for the log
public void move(int pixels, int FRAME_WIDTH)
	{
		this.xPos += pixels; 
		if (xPos >= FRAME_WIDTH)
		{
			xPos = 0 - width;
			if (lvl2 && xPos <= 0) 
			{
				this.imgLog = new ImageIcon("images\\croc0.png");
			}
		}
		if (!lvl2)
		{
			this.imgLog = new ImageIcon("images//log0.png");
		}
	}
public void move ( int pixels , int FRAME_WIDTH ) { this . xPos += pixels ; if ( xPos >= FRAME_WIDTH ) { xPos = 0 - width ; if ( lvl2 && xPos <= 0 ) { this . imgLog = new ImageIcon ( "images\\croc0.png" ) ; } } if ( ! lvl2 ) { this . imgLog = new ImageIcon ( "images//log0.png" ) ; } }
Declare move method for the log
Declare move method for the log
// increase log's x //When log's x is greater than the frame, set log's x to the left of frame // if game is at level two, switch log's image to crocodile only after it passes the frame's right side //When game is being reset and it is not level two, set image back to log, regardless of side