giovabattelli / server-battleship

Play a game of battleship against the AI in the repository's server with your own AI. Information (such as setup of the ships on your AI's board and shots being made towards the server AI's board) is parsed and serialized using Java's Jackson library when your computer and the server communicate with each other.
0 stars 0 forks source link

Make the default port used to be 6969, instead of accepting the port from Driver.java in args[1] #3

Open giovabattelli opened 19 hours ago

trysherpa[bot] commented 19 hours ago

Please note, Sherpa may occasionally provide incomplete or inaccurate information. Always verify critical details and double-check suggested changes before implementation.

Problem Summary

The issue requires changing the default port used by the application to 6969 instead of accepting the port from Driver.java through args[1].

Relevant Files

Guidance on Required Changes

Driver.java

Summary

To address the issue, you should modify the Driver.java file to use a default port of 6969 when the port is not specified in the command-line arguments. This involves updating the main method to include a conditional check for the presence of the port argument and setting a default value if it is absent. The end goal is to ensure the application can run without requiring a port argument, defaulting to 6969 when necessary.