cschaf / battleship-extreme Goto Github PK
View Code? Open in Web Editor NEWAn Battleship adoption with special rules
An Battleship adoption with special rules
We need a decision for make trun input for CLI. If a user can retype his shooting cooridnates when he inputs invalid characters.
-add event classes
-add transfarable objects
-add listener interfaces
After disconnect, the serverconnectionpanel should be shown, so that the client can connect to the server again
-use ship radius to calculate the required board size
000X??XX
-Make Game class serializable
When a client has pressed the refesh button, the new correct gamelist will send by the server. But at the client site arrives a wrong list, seems like the last gameList
Dont know why, couldt be some synchronizing issue...
-necessary for loading a game in the gui, since the game can be saved at any time
(1) make turn
(2) save game
(3) exit
instead of throwing a FieldOccupiedException the placeShip-method should return false, if a field is already occupied
-update settings panel witch field name, disable AI (only Human players allowed on network)
When the game will closed while the gameloop we get this Exception:
Exception in thread "main" java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:862)
at java.util.Scanner.next(Scanner.java:1371)
at de.hsbremen.battleshipextreme.ConsoleGame.readInteger(Main.java:480)
at de.hsbremen.battleshipextreme.ConsoleGame.readIntegerWithMinMax(Main.java:489)
at de.hsbremen.battleshipextreme.ConsoleGame.readCoordinates(Main.java:500)
at de.hsbremen.battleshipextreme.ConsoleGame.attackManually(Main.java:364)
at de.hsbremen.battleshipextreme.ConsoleGame.makePlayerTurn(Main.java:336)
at de.hsbremen.battleshipextreme.ConsoleGame.gameLoop(Main.java:292)
at de.hsbremen.battleshipextreme.ConsoleGame.(Main.java:37)
at de.hsbremen.battleshipextreme.Main.main(Main.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
The possible input of max ai players should be dependant on the number of human players.
Example:
Max Players = 8
Output: select number of human players (0-8)
Input: 6
Output: select number of ai players(0-2)
The AI-Player sometimes gets caught in an infinite loop when placing ships, if the board is relatively small.
Solution: implement counter that resets the field, if its number is too high.
-set name to the enemy dropdown
The shoot method of the ship class gets a board as parameter for example in shoot method. Better is to give it only the fiels to shoot at.
The process of place ships must changed for multiplayer. Maybe after connect to game, the server gives u an playernmumber (1-6), then u can place your ships and send die ready shipboard to the server. Then the server sends you an request to wait, until all player have been set their ships. After that he sends a "game ready to start" to all client. Only the first player can interact with his gui, All otder client cant do anything, till the turn of the player befor is finished.
-updatePlayer/EnemyBoard
-update ShipLabels
-update chatlog
-update gamelog
In local game the combox will be enabled but in network game that doesnt work.
AIPlayer class is sufficient
-not enough / too many players
-board too small
XML String-Ressource Files
-private methods for placeShip method to improve readability
Informations in the planing phase for UML diagrams
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.