Git Product home page Git Product logo

battleship-extreme's People

Contributors

cschaf avatar mueller-jan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

battleship-extreme's Issues

CLI make turn Input

We need a decision for make trun input for CLI. If a user can retype his shooting cooridnates when he inputs invalid characters.

Add server classes

-add event classes
-add transfarable objects
-add listener interfaces

Gamelist sending/receiving error

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...

Main Loop CLI

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)

improve game creation in cli

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)

AI player: infinite loop in placeShips-method

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.

Ship shoot logic dependencies

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.

Add process of shipplacement and shooting over network

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.