http://connect4web.azurewebsites.net/
To implement a lightweight algorithm of the classic Connect Four game satisfying unit and acceptance tests, exposed with a simple REST API and visualised in a SPA web front-end.
- .NET 4.6.1
- C# 6.0
- ASP.NET MVC5 / WEB API2
- Owin
- Autofac
- Serilog/Seq
- NUnit
- Aurelia (routing, templating, binding)
- ES6/2015
- NPM and JSPM package managers
- Gulp
- Bootstrap
- Animate.CSS
- Backstretch
The SPA design removes page reloads and helps makes API interactions fast and responsive.
ASP.NET sessions (tracked via cookies) retain the state of the player's board even with a full page refresh and single page application reboot. This elapses when the session times-out or the application pool is recycled. The board state is discarded when a game concludes via a win or a draw.
Serilog has been added to the Owin middleware for Web API 2, with a sink to a configurable Seq instance (http://localhost:5341 by default). All API requests will be logged including any enrich properties.
To assist debugging and testing, the board can be visualised in a debug watch window:
- Selectable board dimensions on landing page.
- Integrate Swagger for API testing and self-documentation.
- Front-end Javascript unit tests.
- Responsive layout.
- Port to ASP.NET Core.
git clone https://github.com/Craigology/connect4web
- Build solution in VS2015.
- Run tests (requires ReSharper or other test runner support for NUnit).
- Install NPM with NodeJS or Chocolatey.
- From command prompt (assumes NPM is in %PATH%):
cd src/Connect4.Web
npm install
npm install -g jspm
jspm install -y
npm install -g gulp
gulp build
- Debug/launch site in VS2015.