Giter Club home page Giter Club logo

bowling's Introduction

Introduction
------------

This is a simple Bowling ScoreBoard application written in Java. 

The application has a core module and different "client" modules used to talk to the core game. The rationale behind this is to show how it is possible to have a single model and multiple clients that use different technologies to get the same result.

Modules
-------

The following modules ara available:

- bowling-api > This is a REST API used to play the game. Is not complete, but it lets you play a full bowling game. 

- bowling-cli > This is a command line interface client used to play the game. 

- bowling-core > This is the main module; it is where the magic happens. All business rules are enforced and executed in this module.

Setup
-----

In order to compile this, you will need Gradle (www.gradle.org).

Once you have Gradle installed, you will have to:

1. cd into bowling
2. gradle build eclipse

This will compile all the modules of the application, and will also generate the Eclipse project files so it can be easily imported.

REST API
--------

In order to play a game using the REST API, you will have to have the bowling-api module running in a servlet container of your choice (Jetty is a nice candidate).

Once you have it running, you can execute the following operations:

- POST /bowlingLane > creates a new game
- POST /bowlingLane/players with body {"name":"player name"} > adds a player named "player name" to the game
- POST /bowlingLane/{bowlingLaneId}/start > starts the game
- POST /bowlingLane/{bowlingLaneId}/droppins/{numberOfPins} > drops {numberOfPins} for the current player

As you can see the REST API is quite simple, but it shows how can a different client -and technology- can be used to play the same game.

Command Line
------------

If you wish to execute the command line interface, and you have already built the app, you can do the following:

- cd bowling-app/bowling-cli/build/libs
- java -jar bowling-cli-1.0.jar

bowling's People

Contributors

jmnunezizu avatar

Stargazers

 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.