Skip to content

eugene-matvejev/typescript-battleship

Repository files navigation

master heroku
compilation
< Circle CI > TSC build build
< Circle CI > LESSC build build
coverage
< codecov.io > coverage coverage

Battleship Game GUI on vanilla TypeScript

GUI for Battleship Game API, DEMO

THIS IS SPARE TIME PROJECT, WORK IN PROGRESS! HIGHLY EXPERIMENTAL!!!

project purpose:

  • try out "cutting edge" technologies and approaches such as TypeScript, ES6, Service Workers and Continuous Integration|Deployment
  • try out single-page-application [SPA] aproach
  • try out cross-browser requests
  • deliver preview about my technical knowledge before the job interview

game cheat-code:

purpose: easier manual testing

  • AI player have only one ship, which is one-cell ship which and located at B2 cell
    • if you will hit B2 cell - you will win

workflow

  • new functionality is added into master branch only by pull requests
  • result of each pull request is ready-to-use release, using Continuous Delivery principles
  • pull requests are named using semantic visioning
  • gitflow
    • master branch: stable, contains release-ready source
    • heroku branch: reflects current deployed app at heroku (prototype of Continuous Delivery|Deployment)
    • prototype_* branches contains new idea [merged pull request of prototype branch is always next major version release]
    • pull requests follows semantic vesion

technology side

software requirements

  • TypeScript 2.0+ Compiler [TSC]
  • LESS Compiler
  • node.js v6.9+
  • npm v3.8+ or yarn v0.21+

key technologies

  • TypeScript 2.0
  • JavaScript ES6 [ECMAScript6]
  • LESS
  • CSS3
  • DefinitelyTyped
  • Twitter Bootstrap 3
  • jQuery 2
  • yarn
  • npm

used patterns

  • MVC
  • Builder
  • Delegation
  • Registry
  • Event Dispatcher
  • Dependency Injection

how to use

how to install [for development]

  • $ npm install or if you have yarn installed locally - $ yarn install will fetch local, and global dependencies
    • node.js LESS compiler [lessc]
    • node.js lite server
  • src/js/configuration.storage.ts contains settings for the webapp

static mode

  • $ npm run generate:all - will compile project css|configs|js from the sources

how to execute tests

  • WIP

/etc/hosts

127.0.0.1        game-gui-vanilla-typescript.game.local
::1              game-gui-vanilla-typescript.game.local

apache virtual host config

<VirtualHost 127.0.0.1:80 ::1:80>
    DocumentRoot "%PROJECT_ROOT_DIRECTORY%/web"
    ErrorLog "%PROJECT_ROOT_DIRECTORY%/var/logs/apache_log"

    ServerName game-gui-vanilla-typescript.game.local
    ServerAlias game-gui-vanilla-typescript.game.local

    <Directory "%PROJECT_ROOT_DIRECTORY%/web">
        AllowOverride All
        Order Allow,Deny
        Allow from All

        Require all granted
    </Directory>
</VirtualHost>

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •