Giter Site home page Giter Site logo

pang's Introduction

elixir-pdx/pang


#Overview

The goal here is to simulate an N-way game of ping pong.

The rules are as follows:

  1. Each game must have 2 or more players before starting.
  2. When a player enters a game they serve their own ball to a random opponent.
  3. When an opponent hits a ball to a player, the player has a 33% chance of missing.
    1. If they miss, then they notify the ball's owner, and the opponent who hit it to them scores a point, and the owner again serves their ball into play.
    2. If they hit, then the ball hurls at lightspeed into the unsuspecting court of another random player.
  4. The first player to 11 points wins a match.
  5. The first player to win 5 maches wins the game.

Prerequisites:


#Getting Started

###Clone this repository.

$ cd ~/Repositories
$ git clone https://github.com/elixir-pdx/pang.git
$ cd pang

#Hacking

You may find it helpful to play with your code in Elixir's iex interactive console. If you want to do that and autoload the console session with your code then you can do the following from the project root:

$ iex -S mix

That will make sure that you're running iex inside your project's build environment.

#Building

To compile your project simply run this from the project root:

$ mix compile

#Testing

To run the test suite defined in test/pang.exs then run this from the project root:

$ mix test

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.