Giter VIP home page Giter VIP logo

battleship's Introduction

Battleship

Project shows simulation of Battleship game between two players. "AI" creates and sets ships on the board randomly. The game engine runs the game and shot randomly betweeen players. If it shoot succesfully (hit the ship or ship's part) the next shots will be in around of this area. When element (ship or ship's part) hit, then change color to red. Every shot is notice on the board using '*' sign. The "AI" never selects the same point again. In GlobalRules class you can declare maximum quantity of each-elements ships. In InitClass whereas you can set Rows,Columns and personalize player's UI.

Projekt symulacji gry w Statki pomiędzy dwoma graczami. "SI" tworzy i umieszcza statki losowo na planszy. Silnik gry prowadzi grę i wykonuje losowe strzały w jednego i drugiego gracza. Jeśli trafi on celnie w punkt (statek lub jego część) to następny strzał zostanie wykonany dookoła tego punktu. Kiedy element (statek lub jego część) zostaje zestrzelona to zmienia on kolor na czerwony. Każdy oddany strzał zostaje zaznaczony znakiem '*'. "SI" nigdy nie wykona strzału w ten sam punkt. W klasie GLobalRules można ustawić maksymalną ilość poszczególnych statków. W InitialClass natomiast można ustawić ilość wierszy i kolumn oraz ustawić kolorystyke UI gracza.

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.