Giter Club home page Giter Club logo

nbattleshipcodingcontest's Introduction

Build

Battleship Coding Contest

Introduction

The purpose of this project is to teach people how to program in C# and .NET. It does this in two ways:

  1. Beginners can learn the basics of C# by programming computer players for the classical Battleship game. In a class, each student can write her own player and afterwards they can check whose player is the best.

  2. Advanced programmers can take a look at the implementation of the underlying runtime which is also written in C# and .NET. Trainers can use the sample to demonstrate various C# and .NET features working in a larger, non-trivial code base.

History

The history of this projects goes back many years. At that time, a group of developers at the company cubido wanted to demonstrate the capabilities of ASP.NET and Silverlight to customers. I (Rainer Stropek) was one of them. We implemented a coding challenge that we called C# Pirates. It allowed people to write and upload computer players for Battleship. In a rich GUI, players could play against each other and a leaderboard was continuously filled. The overall winners were awarded with gifts.

This project is a complete rewrite and works differently from the original C# Pirates. However, the basic idea of allowing people to write computer players for Battleship in C# has remained the same. Here is a list of workshops and courses in which it was used:

Did you use this project in one of your workshops or courses? Please add it to the list above by sending a pull request.

Documentation

See project wiki.

nbattleshipcodingcontest's People

Contributors

rstropek avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nbattleshipcodingcontest's Issues

Add "Sunken Ship" Logic

Currently, the Battleship Coding Contest logic does only support square contents Water, Ship, and HitShip. A ship that is sunken should be marked as SunkenShip so that computer players can do additional optimizations based on that information.

Build a stateful computer player

There are already some stateless demo computer players (see NBattleshipCodingContest.Players). We need a sample player storing state in properties between shots. State can be stored in member variables of the player's class.

It would be important to have unit tests for the demo player (NBattleshipCodingContest.Players.Tests project) and that the player is described in a Wiki page.

Separate hosting process per player

Currently, there is a hosting process per battle (i.e. two players playing against each other). We need to change that to one hosting process per player so that players cannot interfere.

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.