package server;


public class BombFactory implements Runnable{
	
	private Player player;
	private GameBoard board;
	
	BombFactory(Player player, GameBoard board){
		this.player = player;
		this.board = board;
	}

	@Override
	public void run() {
		// TODO Auto-generated method stub
		System.out.println("Bomb placed");
		int tempx, tempy;
		synchronized (board) {
			tempx = player.getXPosition();
			tempy = player.getYPosition();
			board.placeBombAndPlayer(player);
		}
		
		try {
			Thread.sleep(2000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("Bomb exploded");
		synchronized (board) {board.placeExplosion(tempx, tempy, player);}
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		synchronized (board) {
			board.removeExplosion(tempx, tempy, player);
			//player.setBombs(player.getBombs()+1);
		}
		//System.out.println(player.getBombs());
	}
}

@@ -351,16 +351,41 @@
 tempy;%0D%0A
+%09%09//int constx, consty;%0D%0A
 %09%09synchr
@@ -909,16 +909,379 @@
 ;%0D%0A%09%09%7D%0D%0A
+%09%09/*%0D%0A%09%09while(1)%7B%0D%0A%09%09%09constx = player.getXposition();%0D%0A%09%09%09consty = player.getYposition();%0D%0A%09%09%09if (constx == tempx && consty == tempy)%0D%0A%09%09%09%7B%0D%0A%09%09%09%09player.setLives(getLives() - 1);%0D%0A%09%09%09%09if(player.getLives() == 0)%0D%0A%09%09%09%09%7B%0D%0A%09%09%09%09%09System.out.println(%22The player has lost all lives. Game will terminate%22);%0D%0A%09%09%09%09%09//Begin termination sequence code.%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%7D%0D%0A%09%09%7D%0D%0A%09%09*/%0D%0A
 %09%09synchr

Update BombFactory.java