Field - package sjm; /* * Project Simple Java Minesweeper *...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
package sjm; /** * Project Simple Java Minesweeper * @author Laurens Van Keer | www.LaVaKe.be * @version 1.1 */ /** * Field is part of the "Simple Java Minesweeper" (SJM) application. * * This class represents one square in a minefield. * A Field can contain a mine or not. * Each Field has neighbours: the surrounding mines (horizontal, vertical and diagonal). * Only the content of the Field is visible to the player. */ public class Field { p /** * The "mine" variable is * false if the field is safe, * true if the field contains a mine. */ private boolean mine; p /** * The content of a field can be a. .. * "?" - indicating an unknown field * "F" - a flagged field * "M" - a mine * a number ranging from 0 to 8 - indicating the number of surrounding mines */ private String content; p /** * The integer "neighbours" indicates the number of surrounding mines. */ private int neighbours; p /** * Field constructor. * Every Field initially contains no mine.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/25/2010 for the course CIS CIS3023 taught by Professor Seema during the Spring '10 term at Florida College.

Page1 / 3

Field - package sjm; /* * Project Simple Java Minesweeper *...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online