Package battleship
Class Main
java.lang.Object
battleship.Main
public class Main
extends java.lang.Object
Main class
Given arguments are importants, please give attention to
parseArgs(String[])
about this-
Field Summary
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
view
-
game
-
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
main
public static void main(java.lang.String[] args) -
parseArgs
private static void parseArgs(java.lang.String[] args) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationExceptionRead and parse launch arguments.
launch arguments need to follow this syntax:<player1_instance> <player2_instance> [nogui]
<arg> -> mandatory parameter
[arg] -> optional parameter
player_instance values are: "Human" or "Random"
nogui to launch the game in terminal or nothing to launch in graphical interface- Parameters:
args
- launch arguments- Throws:
java.lang.NoSuchMethodException
- reflect exceptionjava.lang.IllegalAccessException
- reflect exceptionjava.lang.reflect.InvocationTargetException
- reflect exceptionjava.lang.InstantiationException
- reflect exception
-