Skip to content

2D game Sea battle for Android. Kotlin programming language.

License

Notifications You must be signed in to change notification settings

mksyats/sea-battle

Repository files navigation

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🙂

About

2D game Sea battle for Android. Kotlin programming language.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages