GithubHelp home page GithubHelp logo

peronchichino / c_battleshipgame Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 25 KB

Text based Battleship game made with C with 4 difficulties, and simple .txt file based profile creation/loading

C 100.00%
battleship battleship-game c game

c_battleshipgame's Introduction

Battleship Project: This project is a fully playable Battleship game with 4 difficulties. The difficulties range from easy, to medium, to hard, to ultra, with a 5x5, a 7x7, a 10x10 and 13x13 playing field respectively. The game has a variety of ships and ship sizes depending on the chosen difficulty. The player is able to place their own ships in any way they want without problem and is playing against a pc who does the same. In order to simulate the ship placement of the actual Battleships game that was popularized with its 10x10 playing field, the PC places its ships in any direction and in any proximity to its own ships in order to confuse the player.

Compilation:

  1. "firstscreen.txt" is needed in order to print the startscreen and continue with the progression of the game

Execution:

  1. If all necessary files are in the same folder as the main.c then the program can be started
  2. User inputs expected:
    • For loading profile or play as guest:
      • Y or y
      • N or n
    • For profile loading/creation:
      • C or c
      • G or g
      • any keys for naming or loading of specific profile
    • For ships:
      • Carrier 1x5: c
      • Battleship 1x4: b
      • Submarine 1x3: s
      • Destroyer 1x2: d
    • For coordinates:
      • a,a; b,b; etc..
    • For directions:
      • 1, 2, 3, 4

c_battleshipgame's People

Contributors

peronchichino 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.