Skip to content

A C# Windows Forms version of the classic Battleship game. Players place ships on a grid and take turns trying to sink each other’s fleet. Simple interface with visual feedback for each hit or miss.

License

Notifications You must be signed in to change notification settings

aggsakellariou/Battleship

Repository files navigation

Battleship Game

A classic Battleship game implemented using Windows Forms (C#). The game allows players to place ships on a grid and engage in turn-based battles against an opponent.

Table of Contents

Features

  • Turn-based gameplay where two players can compete.
  • Interactive grid for ship placement.
  • Visual feedback when a ship is hit or missed.
  • Simple and intuitive user interface using Windows Forms.
  • Scoring system to track wins and losses.

Requirements

  • Visual Studio 2019 (or later) with .NET Framework.
  • Windows operating system.
  • .NET Framework 4.7.2 or higher.

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/aggsakellariou/battleship-game.git
  2. Open the solution file (Game1.sln) using Visual Studio.

  3. Restore the NuGet packages and build the solution:

    • In Visual Studio, go to Tools > NuGet Package Manager > Restore NuGet Packages.
    • Then build the solution using Build > Build Solution or press Ctrl + Shift + B.
  4. Run the game by pressing F5 or selecting Debug > Start Debugging.

Usage

  • Start the game from the home screen.
  • Place your ships on the grid by selecting locations.
  • Take turns with an opponent to fire at enemy coordinates.
  • The game ends when all of one player's ships are destroyed.

About

A C# Windows Forms version of the classic Battleship game. Players place ships on a grid and take turns trying to sink each other’s fleet. Simple interface with visual feedback for each hit or miss.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages