Preview

Minesweeper

Satisfactory Essays
Open Document
Open Document
300 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Minesweeper
import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.event.InputEvent; import java.io.DataInputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; import java.util.Random;

import javax.swing.Action; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.JToggleButton; import javax.swing.JToolBar;

public class Minesweeper extends JFrame {

private int coloane = 10; private int linii = 10; private static final long serialVersionUID = 1L;
// arata care casute sunt bombe si care nu. boolean jBombs[][] = new boolean[linii][coloane];
// arata care casute au fost descoperite. boolean jShown[][] = new boolean[linii][coloane];
// informatii despre casutele inconjuratoare. int jCells[][] = new int[linii][coloane]; private int currX, currY = 0; JToggleButton jButtons[] = new JToggleButton[coloane*linii]; private JPanel jPanel = null; private JToolBar jToolBar = null; private JPanel jContentPane = null; private JButton jBtnNewGame = null; private JButton jBtnSave = null; private JButton jBtnReluare = null; private JProgressBar jProgressBar = null; int bombsCount = 0; int ToateBifate = 0; //constructor public Minesweeper() { super(); initialize(); }

private void initialize() { this.setSize(500, 550); this.setContentPane(getJPanel()); this.setTitle("Minesweeper"); this.setVisible(true); } private JPanel getJPanel() { if (jPanel == null) { jPanel = new JPanel(); jPanel.setLayout(new BorderLayout()); jPanel.add(getJToolBar(), BorderLayout.NORTH); jPanel.add(getJContentPane(), BorderLayout.CENTER); jPanel.add(getJProgressBar(), BorderLayout.SOUTH); } return jPanel; }

private JToolBar getJToolBar() { if (jToolBar == null) {

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Lead mining of Phoenixville and Chester Counties began about 1808. In 1850, the first discovery of mining in the district started, and the discovery of ore was approximately along the Mine Run about one-half mile northwest of present Audubon village. Similarly, zinc utilized derived from a mixture located about the Perkiomen and Franklin Furnace in N.J. This mining activity in the district can be deduce that the alloy of zinc ore mining process lead to the modern discovery of copper and other essential minerals that constitute the Phoenixville…

    • 89 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    drawing511

    • 329 Words
    • 10 Pages

    User 0.. * Friend 1 UserID (key) 0 ..* FriendID(key) 1 UserID1 UserID2 Date 1 Password…

    • 329 Words
    • 10 Pages
    Satisfactory Essays
  • Powerful Essays

    Mgmt 1

    • 1217 Words
    • 5 Pages

    Based upon stakeholder interviews the purpose for the HRIS system is to improve productivity, improve communication with potential employees, improve recruitment of qualified candidates, improve payroll efficiency processes, and improve overall Human Resource processes.…

    • 1217 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    Megastat

    • 6791 Words
    • 28 Pages

    Getting Started with MegaStat J. B. Orris Butler University Copyright 2002 by J. B. Orris ® Table of Contents 1. Basic Procedures............................................................................................................ 2 Buttons ........................................................................................................................... 3 Data Selection ................................................................................................................ 3 Data Labels ....................................................................................................................…

    • 6791 Words
    • 28 Pages
    Powerful Essays
  • Good Essays

    Miner Cycle Deck

    • 904 Words
    • 4 Pages

    Today I will show you how to play a miner cycle deck in clash royale. The miner cycle deck is a good deck that requires a lot of skill to use. The deck is (shows up on screen) miner, goblin barrel, zap, goblins, fire spirits, ice spirit, princess, mini pekka and it has a 2.5 elixir average cost. The deck is a really fast paced deck that requires a lot of skill and instinct. So let's get on how to use it. First of all this deck has like 999 offensive combinations and you should instinctively know how to use most of them. Ok, so the main offensive combinations you will use are miner and or the mini pekka, then the goblin barrel/goblins/fire spirits/ice spirit. Also, for this deck you need to keep putting pressure offensively to keep the other…

    • 904 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Mk411

    • 1913 Words
    • 8 Pages

    3. A service is defined as any act or performance that one party can offer to another that is essentially intangible and does not result in the ownership of anything. (TRUE)…

    • 1913 Words
    • 8 Pages
    Satisfactory Essays
  • Good Essays

    Code Talker

    • 696 Words
    • 2 Pages

    Code Talker is a novel by Joseph Bruchac. Bruchac is an American writer who focuses his literary efforts towards works about the native people of North America. He has written several stories, books, and poetry about Native Americans and Anglo Americans in the northeast United States. Joseph Bruchac not only writes about the native people of North America but also has ties within his own lineage with the people and cultures he writes about. Bruchac is of Abenaki, a tribe from the New England area, decent. Bruchac wrote this piece to draw attention to the pivotal role the Native Navajo tribe had in the Second World War.…

    • 696 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Wpmallet

    • 635 Words
    • 3 Pages

    Here is the Mission Statement requested which will be used in your Business Strategy for your new enterprise operating the Pita Pit Franchise here in Fredericton, New Brunswick.…

    • 635 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Mineko Case Study

    • 148 Words
    • 1 Page

    I think Mineko learned about how to protect herself from bad men and she learned how to sacrifice certain things to become the best or have the life she wants. I also think she learned how to use money wisely, as it says on page. 258. I believe she decided to close the Gion Kobu in pursuit of her own interests because she said herself after Mother Sakaguchi died, she lost all interest of the Gion Kobu lifestyle and was just fed up with the entire system. (Page. 284) I don’t think I would have done the same, I mean if I was fed up with the system and Gion Kobu I would retire, but I wouldn’t close the Gion Kobu just because I didn’t like it. I would let the other geishas continue to live in the okiya and do their thing. I would just step…

    • 148 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Code Talker

    • 520 Words
    • 3 Pages

    I. Chester Nez, an original Navajo Code Talker and the last surviving of the original 29, was born in a shack at a place currently called Oak Canyon. Nez does not know exactly when he was born, but roughly around 1921, which makes him currently 92 years old. Nez was only 18 years old when the United States Marines came to his school in Arizona one day in 1942 to recruit him as a Navajo Code Talker. Nez is perfect to write this piece, because Nez experienced being a Navajo Code Talker first-handedly, which makes this book a direct primary source. Nez wrote this book because he felt that there was a need to express and show how helpful the Navajo Code Talkers were at interpreting the unbreakable code.…

    • 520 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Rainmaker

    • 651 Words
    • 3 Pages

    Dennis Kucinich once said, “Everyone should have health insurance? I say everyone should have health care. I'm not selling insurance.” I believe every individual should have health care insurance, where they are wealthy, or in poverty level. After watching the movie “Rainmaker”, I realized how health insurance could save a life. As for an insurance company like the Great Benefit, they must have not had a loved one who needed health coverage so desperately to try and save themselves from death. The Great Benefit was quite like a fraud company. They collect money from individuals and families who have applied and use the money on useless things, rather than trying to save a life. They would pay employees a large amount of money to resign and keep shut about how they insurance company works. Out of about 11,000 applicants, more than 9,000 were denied coverage, preventing Donnie Ray from getting a life-saving bone marrow transplant. In section U of the Great Benefit’s policy, they stated that they offer bone marrow transplants as it is one of their priorities. With this, I learned never to be involved in an insurance company that commits fraudulent actions. I learned to always be take my career seriously because if one mistake is made, I will pay a price that is more than how much I gained with the mistakes I made. I learned to report any inappropriate actions that I witness, even if I am an employee of the same company. Never write false statements, letters, or forge signatures. Never take confidential paper work home as there can be serious consequences. But especially, never collect a patient or applicant’s money especially when that is all they have to save themselves or their loved ones. The “Rainmaker” taught me that because an insurance company collected money from applicants without giving what they paid for, the company loses and eventually has to pay back what they collected, then an additional thousand, or even millions of dollars. Donny…

    • 651 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Dumpster Diver

    • 851 Words
    • 3 Pages

    Throughout life, everyone faces hardships. Whether you are faced with illness or disease, poverty, or anything that can cause a problem within your everyday life, no one gets out without going through something rough. Examples of a hardship are shown in the reading “My Daily Dives in the Dumpster” by Lars Eighner. The author tells us about his personal experience of being homeless and the constant struggle to search for things like food and other necessities just to stay alive. The average person complains about pointless things everyday like how they look ugly in an outfit, or their hair didn’t come out the way they wanted it to, or they don’t like the food that is being served to them; just think about someone like the author of this passage who has nothing and still manages to keep a positive attitude. Be grateful for what you do have, and pray for the ones who struggle.…

    • 851 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Tools

    • 361 Words
    • 2 Pages

    No words found in this wordlist when searching for hsizn. No direct (one word) anagrams for hsizn found in this word list ...…

    • 361 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    This case demonstrates the requirement for complete alignment of values and philosophy with respect to the work system, rewards, human resource flow, and employee influence in order for strategic human resources management to work and be effective. Furthermore, SHRM is a system that evolves, rather than being implemented, from underlying fundamental values that appeals to and fulfills the self-concepts of all employees and requires transformational leaders to tie individuals' self concepts to organizational mission. Pacific Mines Limited and in particular Brian Boydell failed to properly align organizational mission with implementation strategies, and this was exacerbated by the lack of leadership and performance measures. To best understand what went wrong at Pacific Mines, we must examine the organization, its system, its leaders, and situational factors more closely.…

    • 3797 Words
    • 16 Pages
    Powerful Essays
  • Better Essays

    PROJECT TOPIC : SMALL AND MEDIUM SCALE ENTERPRISES DEVELOPMENT IN NIGERIA (A Case Study of Cassava Processing Industry)…

    • 1429 Words
    • 6 Pages
    Better Essays