Code Monkey home page Code Monkey logo

sea-battle's Introduction

Sea battle

Hi✋ This is a modest implementation of the famous game "Sea Battle" in the Kotlin programming language.

The program has three activity windows:

  • Initial activity⭐: Contains buttons to go to placing ships on the boards. Reset ship settings button. Also a button to start the game.
  • Place ships on board activity⚓ (appears once for each player in one game session): There are ships on one half, and a board on the other. And the ships need to be dragged to the right places on the board (there are all the rules for placing ships, so it will not work to place the ship according to the rules). Additionally, the activity has a dialog box that appears when the activity appears and is designed to retrieve the player's name.
  • Battle activity⚔️: Contains the game boards of the players on both sides. Players take turns clicking on the cells of the opponent's board where, in their opinion, the ship is located. If the ship is hit, the player selects the cell again and so on until they miss. When any player's ships are completely destroyed, the game ends and a dialog box appears with the winner and a button to return to the main menu.

This application uses Data Binding to establish a relationship between user interface elements and model data. This makes it possible to automatically synchronize data changes with the visual representation, simplifying the code and improving its readability and maintainability.


Thank you for checking out the initial version of the game! Your reviews will be very valuable to improve my knowledge🙂

sea-battle's People

Contributors

yatsenkom avatar

Watchers

 avatar

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.