Git Product home page Git Product logo

trekbattles's Introduction

TrekBattles - a C# .Net Console Uni Assignment

20/20 mark - September 2013

This assignment was focused around battles between between two fleets of space ships (inspired by Star Trek). Two files in a special format would be read in, and the result of the battle would be printed out to the console. See fleet1.txt and fleet2.txt. There were also complicated logic around the ordering of firing between the two fleets.

This was my first time using C#, ended up with full marks :)

File format

The file format from the assignment spec is as follows:

  • The first line will contain the name of the fleet. This is a string.
  • The second line will contain the number of ships in the fleet. An integer >= 1.
  • Each ship will be listed after that. Ships are defined by 6 pieces of information, each on a separate line
  1. Ship Class name. A string.
  2. Shield Strength. An integer >= 1.
  3. Regeneration Rate. An integer >= 1 and <= Shield Strength.
  4. Hull Strength. An integer >= 1.
  5. Weapon Base Damage. An integer >= 1.
  6. Weapon Random Damage. An integer >= 1.
  7. There are no blank lines in the file except after the last ship has been listed.

Restrictions for this assignment

  • Could only use Arrays
  • No Lists or Linq
  • Could only use what was covered in class at the time the assignment was released

trekbattles's People

Contributors

jezzay avatar

Watchers

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