Skip to content

hiwafeizi/Battle-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BattleC - Battleship Game

Overview

BattleC is a C++ implementation of the classic Battleship game where a human player competes against an AI agent, A. Smith. The game is played on two 10x10 grids, following traditional Battleship rules. Players aim to sink all of their opponent's ships to win.

To play, simply run the Battle_C.exe file.


Features

  1. Interactive Gameplay:

    • Human vs. AI.
    • Real-time scoring and ship tracking.
    • Side-by-side board display for clear visibility.
  2. AI Logic:

    • HUNT Mode: Randomly searches for ships using a checkerboard pattern.
    • TARGET Mode: Focuses on adjacent cells after hitting a ship.
  3. Game Mechanics:

    • Tracks player and AI moves.
    • Displays a final scoreboard with moves and ships destroyed.

How to Play

  1. Run Battle_C.exe.
  2. Place your ships by entering coordinates (e.g., A5) and orientation (H or V).
  3. Take turns attacking coordinates.
  4. Win by sinking all of the opponent's ships.

Future Improvements

  • Add multiplayer mode.
  • Implement advanced AI strategies.
  • Enhance visuals with a graphical interface.

Developer: Hiwa
Language: C++
File to Run: Battle_C.exe

Enjoy the game! 😊

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors