Hallo! Ich muss das Spiel Minesweeper in Java programmieren. Da ich nicht so gut beim Programmieren bin, habe ich keine Idee, wie ich überhaupt anfangen soll.
Die Angabe lautet so:
Stick to the following format:
Sample input Sample output
(from file) (to System.out)
4 4 Field: 1
*... *100
.... 2210
.*.. 1*10
.... 1110
3 5 Field: 2
**... **100
..... 33200
.*... 1*100
0 0 22
Additionally, your programm shall implement the following interface, where the return value of the method minesweep shall be the sum of all integers in the output fields (for the example above, this is 22):
import java.io.File;
public interface Assignment1 {
public long minesweep(File inputfile);
}
Note: do not use the Java 'package' statement.
Wie sollte ich anfangen oder was sollte ich grundsätzlich machen?
Die Angabe lautet so:
Stick to the following format:
Sample input Sample output
(from file) (to System.out)
4 4 Field: 1
*... *100
.... 2210
.*.. 1*10
.... 1110
3 5 Field: 2
**... **100
..... 33200
.*... 1*100
0 0 22
Additionally, your programm shall implement the following interface, where the return value of the method minesweep shall be the sum of all integers in the output fields (for the example above, this is 22):
import java.io.File;
public interface Assignment1 {
public long minesweep(File inputfile);
}
Note: do not use the Java 'package' statement.
Wie sollte ich anfangen oder was sollte ich grundsätzlich machen?