bomber man game part-1
 

package bomberman;

import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import java.util.Random;

public class Gamev1 extends JPanel implements Runnable
{
Random randomGenerator = new Random();
Thread mainthrd;
public JFrame myframe;
boolean running=true;
int width=400,height=400;
public static int ROW=20,COL=20;
/** relative path for files */
public static String RP = "./";
BomberMap map;
Gamev1(JFrame jf)
{
    myframe=jf;
    map=new BomberMap(this,ROW,COL,3,3);
    mainthrd=new Thread(this);
    try
    {
    mainthrd.start();
    }catch(Exception e){        System.out.println(e);System.exit(0);}
    setFocusable(true);
}
public void paintComponent(Graphics g)
{
    super.paintComponent(g);
    Graphics2D g2d=(Graphics2D)g;
    g2d.setBackground(Color.yellow);
    g2d.clearRect(0,0,width,height);
    g2d.setColor(Color.green);
    map.draw(g2d);
}
public void run()
{
    while(true)
    {
    repaint();
    try
    {
        Thread.sleep(100);
    }
    catch(Exception e){}
    }
}

public static void main(String []args)
{
    JFrame window=new JFrame();
    window.setTitle("Bomber Game v1");
    window.setBackground(Color.BLUE);
    window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    window.getContentPane().add(new Gamev1(window));
    window.setSize(800,600);
    window.setLocationRelativeTo(null);
    window.setFocusable(true);
    window.setVisible(true);
}

}

share on whatapp
1948 Views

Comments

151.249.164.95Hello friends! I am an official representative of private company which deals with all kinds of written work (essay, coursework, dissertation, presentation, report, etc) in short time. We are ready to offer a free accomplishment of written work hoping for further cooperation and honest feedback about our service. Send your work topics to our email: discount@edu-paper.com. This offer has limited quantities!!!
188.213.49.157We describe the difference between a compact camera, a superzoom camera, DSLR camera small system cameras. Buying a new camera can be a daunting task, not least due to the helpful options available. What Photographic Camera runs through several things you should consider when buying a camera, as well as the main types of digicam available that will help you get a camera best suited to your demands. Compact cameras under 100 tend to be simple, no-frills models, which are perfectly capable of taking pictures without the extra bells and whistles. Often they are operated by AA batteries as opposed to rechargeable lithium-ion types, these deplete their charge quickly so arent very reasonably priced. A better solution is to get some rechargeable batteries plus a charger while this is initially more expensive, such batteries provide you with the best performance and is used time and again. More: http://makingupcodes.com/story.php?title=visit-this-link http://www.soleermetico.com/inclusiveyouthwork/index.php?title=How_ToThe_Reason_WhyGet_Choose_The_Right_DSLR_Camera_For_You
maggieCoipt@essay-top.biz 151.249.164.95Hello friends! I am an official representative of private company which deals with all kinds of written work (essay, coursework, dissertation, presentation, report, etc) in short time. We are ready to offer a free accomplishment of written work hoping for further cooperation and honest feedback about our service. Send your work topics to our email: discount@edu-paper.com. This offer has limited quantities!!! Details on our website: https://top-essay.biz
crazyadsprofitscra@mail.ru 91.121.87.126One of the largest problems with getting consumers to your site using paid search engine marketing strategies like Google is the fact that you often want to spend lots of cash to get visitors on to the site. In the following paragraphs I want to show you how you can save some money & massively increase your profits should you be buying traffic. A modern day businessman possess a website, and there should have traffic. An online business website is perhaps a store, if no visitors will drop by, your products in no way be bought. It is of vital importance that traffic must be present. You'll find two ways of getting traffic, the free method as well as the paid means. The former is good, but messy is optimal. However, there are conditions to be followed, should your person to help buy website traffic. Incredibly condition to become met is, caution. In buying traffic option is not that comfortable and easy. Article directories are another way to increase web traffic. Write several interesting articles about your niche and use them to pre-sell your visitor. Hand calculators take associated with the resources box locate of your article to advertise your own website. These kinds of fishing methods can generate website traffic and can be useful grow traffic to your website, in the same time producing contents for your prospects. It isn't difficult to perform a full blown campaign having a sophisticated set of tools. Targeted Targeted web traffic. With wish of targeted traffic you get leads related to your niche and start converting your leads in time (usually in hours). But there are few important things. There are many sites selling traffic and it really is not in order to decide where to buy for. A company that claims their readers are ALL unique visitors (meaning a particular visitor will visit your own website once for the entire duration of one's campaign). Split tests are a good idea to boost amount of clicks on ones ads. An individual add words or change the sequence of your ads, an individual possibly increase your ads click percentage by 10%,50%, first know the reason why testing different ads is a important course of action. pay per click youtube
eileenvew@edu-paper.com 151.249.164.95Hello friends! I am an official representative of private company which deals with all kinds of written work (essay, coursework, dissertation, presentation, report, etc) in short time. We are ready to offer a free accomplishment of written work hoping for further cooperation and honest feedback about our service. This offer has limited quantities!!! Details on our website: https://stud-trust.biz
 
 
Private Policy   Terms of Service   4922